Skip to content

Commit

Permalink
feat(FEC-13420): support start and end time of video
Browse files Browse the repository at this point in the history
  • Loading branch information
lianbenjamin committed Oct 10, 2023
1 parent 010874d commit d6df683
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 1 deletion.
28 changes: 28 additions & 0 deletions docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,8 @@ var config = {
> captions?: Array<PKExternalCaptionObject>,
> thumbnails?: PKExternalThumbnailsConfig,
> startTime?: number
> seekFrom?: number
> clipTo?: number
> }
> ```
>
Expand Down Expand Up @@ -505,6 +507,32 @@ var config = {
> > > Note. `startTime` affects the ad playback, e.g. `startTime: 10` will skip ads scheduled until 10.
> > > <br>To force playing ads scheduled before `startTime`, need to configure the ads plugin.
> > > <br>For example with [IMA](https://github.com/kaltura/playkit-js-ima/blob/master/docs/api.md) plugin, set `adsRenderingSettings: {playAdsAfterTime: -1}`.
> >
> > ##
> >
> > ### sources.seekFrom
> >
> > ##### Type: `number`
> >
> > ##### Default: `-`
> >
> > ##### Description: Optional time, in seconds, to start the playback from, by cutting the video.
> >
> > Unlike `startTime`, this configuration will cut and omit the part of the video that is before the configured `seekFrom` value and will start from there.
> > This will affect the duration of the video.
> >
> > ##
> >
> > ### sources.clipTo
> >
> > ##### Type: `number`
> >
> > ##### Default: `-`
> >
> > ##### Description: Optional time, in seconds, to end the playback, by cutting the video.
> >
> > `clipTo` will cut and omit the part of the video that is after the configured value, and will end at this position.
> > This will affect the duration of the video.
>
> ##
>
Expand Down
4 changes: 3 additions & 1 deletion flow-typed/types/sources-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,7 @@ declare type PKSourcesConfigObject = {
duration?: number,
startTime?: number,
vr: ?Object,
imageSourceOptions?: ImageSourceOptions
imageSourceOptions?: ImageSourceOptions,
seekFrom?: number,
clipTo?: number
};

0 comments on commit d6df683

Please sign in to comment.