Skip to content

numbersprotocol/preview-video

Repository files navigation

@numbersprotocol/preview-video

Preview Video using native iOS, Android players

Install

npm install @numbersprotocol/preview-video
npx cap sync

API

echo(...)

echo(options: { value: string; }) => Promise<{ value: string; }>
Param Type
options { value: string; }

Returns: Promise<{ value: string; }>


create(...)

create(_args: CreatePreviewVideoArgs) => Promise<any>
Param Type
_args CreatePreviewVideoArgs

Returns: Promise<any>


destroy(...)

destroy(_args: DestroyPreviewVideoArgs) => Promise<any>
Param Type
_args DestroyPreviewVideoArgs

Returns: Promise<any>


onScroll(...)

onScroll(args: OnScrollArgs) => Promise<void>
Param Type
args OnScrollArgs

Interfaces

CreatePreviewVideoArgs

Prop Type
id string
src string
element HTMLElement
config PreviewVideoConfig

PreviewVideoConfig

Prop Type Description
width number Override width for native Video Player
height number Override height for native Video Player
x number Override absolute x coordinate position for native Video Player
y number Override absolute y coordinate position for native Video Player

DestroyPreviewVideoArgs

Prop Type
id string

OnScrollArgs

Prop Type
id string
previewVideoBounds { x: number; y: number; width: number; height: number; }