Skip to content

webCanvasVideoPoster — @gj-kit/expo-media

A public function from @gj-kit/expo-media/web. The signature below is taken directly from the 0.6.1 release declaration.

import { webCanvasVideoPoster } from '@gj-kit/expo-media/web';
/**
* 브라우저 canvas 기반 동영상 포스터 추출기(§5.6).
*
* ⚠ 실패는 전부 `null`이다 — 예외를 밖으로 내보내지 않는다. **포스터 실패가 동영상 업로드를
* 막지 않는다**는 것이 계약이고(§7.1), 그 정책의 절반이 여기(어댑터가 null을 준다),
* 나머지 절반이 코어(`resolvePoster`의 try/catch)에 있다.
*
* `document`는 주입 가능하지만 **호출 시점에** 해석한다. 생성 시점에 붙잡으면 SSR에서
* 모듈이 평가되는 순간의 `undefined`가 하이드레이션 이후까지 남는다(§8.5 케이스 H 계열의 함정).
*/
declare function webCanvasVideoPoster(input?: {
readonly document?: Document | undefined;
} | undefined): BinaryPosterAdapter;

This declaration is the source of truth for parameters, optionality, generics, return values, and public union/type contracts. Check the package golden path and this subpath’s import conditions for required environment, permission, and error boundaries before calling it.

  • Package: @gj-kit/expo-media
  • Version: 0.6.1
  • Public entry: ./web
  • Source: GitHub