From d6df683597047453b93add188c3e62c319a356e4 Mon Sep 17 00:00:00 2001 From: lianbenjamin <79077248+lianbenjamin@users.noreply.github.com> Date: Tue, 10 Oct 2023 16:25:12 +0300 Subject: [PATCH] feat(FEC-13420): support start and end time of video --- docs/configuration.md | 28 ++++++++++++++++++++++++++++ flow-typed/types/sources-config.js | 4 +++- 2 files changed, 31 insertions(+), 1 deletion(-) diff --git a/docs/configuration.md b/docs/configuration.md index 82551f535..9271e4221 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -167,6 +167,8 @@ var config = { > captions?: Array, > thumbnails?: PKExternalThumbnailsConfig, > startTime?: number +> seekFrom?: number +> clipTo?: number > } > ``` > @@ -505,6 +507,32 @@ var config = { > > > Note. `startTime` affects the ad playback, e.g. `startTime: 10` will skip ads scheduled until 10. > > >
To force playing ads scheduled before `startTime`, need to configure the ads plugin. > > >
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. > > ## > diff --git a/flow-typed/types/sources-config.js b/flow-typed/types/sources-config.js index 387d67899..95be48e63 100644 --- a/flow-typed/types/sources-config.js +++ b/flow-typed/types/sources-config.js @@ -15,5 +15,7 @@ declare type PKSourcesConfigObject = { duration?: number, startTime?: number, vr: ?Object, - imageSourceOptions?: ImageSourceOptions + imageSourceOptions?: ImageSourceOptions, + seekFrom?: number, + clipTo?: number };