UNPKG

sanity-plugin-mux-input

Version:

An input component that integrates Sanity Studio with Mux video encoding/hosting service.

10 lines (8 loc) 302 B
import type {VideoAssetDocument} from './types' export function getPlaybackId(asset: Pick<VideoAssetDocument, 'playbackId'>): string { if (!asset?.playbackId) { console.error('Asset is missing a playbackId', {asset}) throw new TypeError(`Missing playbackId`) } return asset.playbackId }