@gcorevideo/player 2.23.1 → 2.23.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/bottom-gear/bottomgear.ejs +5 -2
- package/dist/core.js +1 -1
- package/dist/index.css +1163 -1163
- package/dist/index.js +35 -11
- package/dist/player.d.ts +67 -53
- package/docs/api/{player.mediacontrol.putelement.md → player.clips.gettext.md} +10 -23
- package/docs/api/player.clips.md +14 -0
- package/docs/api/player.md +9 -0
- package/docs/api/player.mediacontrol.md +0 -14
- package/docs/api/player.poster.md +2 -10
- package/docs/api/player.posterpluginsettings.md +16 -0
- package/docs/api/player.thumbnails._constructor_.md +50 -0
- package/docs/api/player.thumbnails.md +73 -0
- package/docs/api/player.thumbnails.render.md +18 -0
- package/docs/api/player.thumbnailspluginsettings.md +4 -4
- package/lib/plugins/bottom-gear/BottomGear.d.ts +5 -2
- package/lib/plugins/bottom-gear/BottomGear.d.ts.map +1 -1
- package/lib/plugins/bottom-gear/BottomGear.js +33 -9
- package/package.json +1 -1
- package/src/plugins/bottom-gear/BottomGear.ts +35 -10
- package/src/plugins/bottom-gear/__tests__/BottomGear.test.ts +92 -55
- package/src/plugins/bottom-gear/__tests__/__snapshots__/BottomGear.test.ts.snap +4 -4
- package/temp/player.api.json +144 -70
- package/tsconfig.tsbuildinfo +1 -1
package/dist/index.js
CHANGED
|
@@ -43303,7 +43303,7 @@ class Player {
|
|
|
43303
43303
|
}
|
|
43304
43304
|
}
|
|
43305
43305
|
|
|
43306
|
-
var version$1 = "2.23.
|
|
43306
|
+
var version$1 = "2.23.2";
|
|
43307
43307
|
|
|
43308
43308
|
var packages = {
|
|
43309
43309
|
"node_modules/@clappr/core": {
|
|
@@ -45082,7 +45082,7 @@ class BigMuteButton extends UICorePlugin {
|
|
|
45082
45082
|
}
|
|
45083
45083
|
}
|
|
45084
45084
|
|
|
45085
|
-
const pluginHtml$5 = "<button class=\"media-control-button gplayer-lite-btn gcore-skin-button-color gear-icon\"
|
|
45085
|
+
const pluginHtml$5 = "<button class=\"media-control-button gplayer-lite-btn gcore-skin-button-color gear-icon\"\n id=\"gear-button\"\n aria-expanded=\"false\"\n aria-controls=\"gear-options\">\n <%= icon %>\n</button>\n<div class=\"gear-wrapper gcore-skin-bg-color\" id=\"gear-options-wrapper\">\n <ul class=\"gear-options-list\" id=\"gear-options\" role=\"menu\"></ul>\n</div>\n";
|
|
45086
45086
|
|
|
45087
45087
|
const gearIcon = "<svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <g clip-path=\"url(#clip0_660_1503)\">\n <path\n d=\"M19.14 12.94C19.18 12.64 19.2 12.33 19.2 12C19.2 11.68 19.18 11.36 19.13 11.06L21.16 9.47999C21.34 9.33999 21.39 9.06999 21.28 8.86999L19.36 5.54999C19.24 5.32999 18.99 5.25999 18.77 5.32999L16.38 6.28999C15.88 5.90999 15.35 5.58999 14.76 5.34999L14.4 2.80999C14.36 2.56999 14.16 2.39999 13.92 2.39999H10.08C9.83999 2.39999 9.64999 2.56999 9.60999 2.80999L9.24999 5.34999C8.65999 5.58999 8.11999 5.91999 7.62999 6.28999L5.23999 5.32999C5.01999 5.24999 4.76999 5.32999 4.64999 5.54999L2.73999 8.86999C2.61999 9.07999 2.65999 9.33999 2.85999 9.47999L4.88999 11.06C4.83999 11.36 4.79999 11.69 4.79999 12C4.79999 12.31 4.81999 12.64 4.86999 12.94L2.83999 14.52C2.65999 14.66 2.60999 14.93 2.71999 15.13L4.63999 18.45C4.75999 18.67 5.00999 18.74 5.22999 18.67L7.61999 17.71C8.11999 18.09 8.64999 18.41 9.23999 18.65L9.59999 21.19C9.64999 21.43 9.83999 21.6 10.08 21.6H13.92C14.16 21.6 14.36 21.43 14.39 21.19L14.75 18.65C15.34 18.41 15.88 18.09 16.37 17.71L18.76 18.67C18.98 18.75 19.23 18.67 19.35 18.45L21.27 15.13C21.39 14.91 21.34 14.66 21.15 14.52L19.14 12.94ZM12 15.6C10.02 15.6 8.39999 13.98 8.39999 12C8.39999 10.02 10.02 8.39999 12 8.39999C13.98 8.39999 15.6 10.02 15.6 12C15.6 13.98 13.98 15.6 12 15.6Z\"\n fill=\"#C9C9C9\"/>\n </g>\n <defs>\n <clipPath id=\"clip0_660_1503\">\n <rect width=\"24\" height=\"24\" fill=\"white\"/>\n </clipPath>\n </defs>\n</svg>\n";
|
|
45088
45088
|
|
|
@@ -45172,6 +45172,8 @@ var GearEvents;
|
|
|
45172
45172
|
*/
|
|
45173
45173
|
class BottomGear extends UICorePlugin {
|
|
45174
45174
|
hd = false;
|
|
45175
|
+
numItems = 0;
|
|
45176
|
+
collapsed = true;
|
|
45175
45177
|
/**
|
|
45176
45178
|
* @internal
|
|
45177
45179
|
*/
|
|
@@ -45204,7 +45206,7 @@ class BottomGear extends UICorePlugin {
|
|
|
45204
45206
|
*/
|
|
45205
45207
|
get events() {
|
|
45206
45208
|
return {
|
|
45207
|
-
'click #gear-button': '
|
|
45209
|
+
'click #gear-button': 'toggleMenu',
|
|
45208
45210
|
};
|
|
45209
45211
|
}
|
|
45210
45212
|
/**
|
|
@@ -45258,6 +45260,10 @@ class BottomGear extends UICorePlugin {
|
|
|
45258
45260
|
this.$el.find('#gear-options').hide();
|
|
45259
45261
|
});
|
|
45260
45262
|
}
|
|
45263
|
+
this.numItems++;
|
|
45264
|
+
if (this.numItems > 0) {
|
|
45265
|
+
this.$el.show();
|
|
45266
|
+
}
|
|
45261
45267
|
return $item;
|
|
45262
45268
|
}
|
|
45263
45269
|
onActiveContainerChanged() {
|
|
@@ -45271,7 +45277,7 @@ class BottomGear extends UICorePlugin {
|
|
|
45271
45277
|
highDefinitionUpdate(isHd) {
|
|
45272
45278
|
trace(`${T$g} highDefinitionUpdate`, { isHd });
|
|
45273
45279
|
this.hd = isHd;
|
|
45274
|
-
this.$el.find('
|
|
45280
|
+
this.$el.find('#gear-button').html(isHd ? gearHdIcon : gearIcon);
|
|
45275
45281
|
}
|
|
45276
45282
|
/**
|
|
45277
45283
|
* @internal
|
|
@@ -45283,11 +45289,13 @@ class BottomGear extends UICorePlugin {
|
|
|
45283
45289
|
return this; // TODO test
|
|
45284
45290
|
}
|
|
45285
45291
|
const icon = this.hd ? gearHdIcon : gearIcon;
|
|
45292
|
+
this.collapsed = true;
|
|
45293
|
+
this.numItems = 0;
|
|
45286
45294
|
this.$el
|
|
45287
45295
|
.html(BottomGear.template({ icon }))
|
|
45288
|
-
.
|
|
45296
|
+
.hide() // until numItems > 0
|
|
45297
|
+
.find('#gear-options-wrapper')
|
|
45289
45298
|
.hide();
|
|
45290
|
-
// TODO make non-clickable when there are no items
|
|
45291
45299
|
setTimeout(() => {
|
|
45292
45300
|
this.trigger(GearEvents.RENDERED);
|
|
45293
45301
|
}, 0);
|
|
@@ -45302,30 +45310,46 @@ class BottomGear extends UICorePlugin {
|
|
|
45302
45310
|
this.$el.find('.gear-sub-menu-wrapper').hide();
|
|
45303
45311
|
this.$el.find('#gear-options').show();
|
|
45304
45312
|
}
|
|
45305
|
-
|
|
45313
|
+
toggleMenu() {
|
|
45306
45314
|
this.core
|
|
45307
45315
|
.getPlugin('media_control')
|
|
45308
45316
|
.trigger(ExtendedEvents.MEDIACONTROL_MENU_COLLAPSE, this.name);
|
|
45309
|
-
this
|
|
45317
|
+
this.collapsed = !this.collapsed;
|
|
45318
|
+
if (this.collapsed) {
|
|
45319
|
+
this.$el.find('#gear-options-wrapper').hide();
|
|
45320
|
+
}
|
|
45321
|
+
else {
|
|
45322
|
+
this.$el.find('#gear-options-wrapper').show();
|
|
45323
|
+
}
|
|
45324
|
+
this.$el.find('#gear-button').attr('aria-expanded', (!this.collapsed).toString());
|
|
45325
|
+
trace(`${T$g} toggleMenu`, { hidden: this.collapsed });
|
|
45310
45326
|
}
|
|
45311
|
-
|
|
45327
|
+
collapse() {
|
|
45312
45328
|
trace(`${T$g} hide`);
|
|
45329
|
+
this.collapsed = true;
|
|
45313
45330
|
this.$el.find('#gear-options-wrapper').hide();
|
|
45331
|
+
this.$el.find('#gear-button').attr('aria-expanded', 'false');
|
|
45314
45332
|
}
|
|
45315
45333
|
onCoreReady() {
|
|
45316
45334
|
trace(`${T$g} onCoreReady`);
|
|
45317
45335
|
const mediaControl = this.core.getPlugin('media_control');
|
|
45318
45336
|
assert(mediaControl, 'media_control plugin is required');
|
|
45319
45337
|
this.listenTo(mediaControl, Events$1.MEDIACONTROL_RENDERED, this.onMediaControlRendered);
|
|
45320
|
-
this.listenTo(mediaControl, Events$1.MEDIACONTROL_HIDE, this.
|
|
45338
|
+
this.listenTo(mediaControl, Events$1.MEDIACONTROL_HIDE, this.collapse);
|
|
45321
45339
|
this.listenTo(mediaControl, ExtendedEvents.MEDIACONTROL_MENU_COLLAPSE, (from) => {
|
|
45322
45340
|
if (from !== this.name) {
|
|
45323
|
-
this.
|
|
45341
|
+
this.collapse();
|
|
45324
45342
|
}
|
|
45325
45343
|
});
|
|
45326
45344
|
}
|
|
45327
45345
|
onMediaControlRendered() {
|
|
45328
45346
|
trace(`${T$g} onMediaControlRendered`);
|
|
45347
|
+
this.mount();
|
|
45348
|
+
}
|
|
45349
|
+
mount() {
|
|
45350
|
+
trace(`${T$g} mount`, {
|
|
45351
|
+
numItems: this.numItems,
|
|
45352
|
+
});
|
|
45329
45353
|
const mediaControl = this.core.getPlugin('media_control');
|
|
45330
45354
|
mediaControl.mount('gear', this.$el);
|
|
45331
45355
|
}
|
package/dist/player.d.ts
CHANGED
|
@@ -552,6 +552,12 @@ export declare class Clips extends UICorePlugin {
|
|
|
552
552
|
destroy(): UIObject;
|
|
553
553
|
disable(): void;
|
|
554
554
|
enable(): void;
|
|
555
|
+
/**
|
|
556
|
+
* Get the text of the clip at the given time
|
|
557
|
+
* @param time - The time to get the text for
|
|
558
|
+
* @returns The text of the clip at the given time
|
|
559
|
+
*/
|
|
560
|
+
getText(time: TimeValue): string | undefined;
|
|
555
561
|
private onCoreReady;
|
|
556
562
|
private onMcRender;
|
|
557
563
|
private onContainerChanged;
|
|
@@ -1158,8 +1164,8 @@ export declare class MediaControl extends UICorePlugin {
|
|
|
1158
1164
|
};
|
|
1159
1165
|
private get disabled();
|
|
1160
1166
|
/**
|
|
1167
|
+
* Use in mediacontrol-based plugins to access the active container
|
|
1161
1168
|
* @internal
|
|
1162
|
-
* @deprecated Use core.activeContainer directly
|
|
1163
1169
|
*/
|
|
1164
1170
|
get container(): any;
|
|
1165
1171
|
/**
|
|
@@ -1299,12 +1305,6 @@ export declare class MediaControl extends UICorePlugin {
|
|
|
1299
1305
|
* ```
|
|
1300
1306
|
*/
|
|
1301
1307
|
mount(name: MediaControlElement, element: ZeptoResult): void;
|
|
1302
|
-
/**
|
|
1303
|
-
* @deprecated Use {@link MediaControl.mount} instead
|
|
1304
|
-
* @param name
|
|
1305
|
-
* @param element
|
|
1306
|
-
*/
|
|
1307
|
-
putElement(name: MediaControlElement, element: ZeptoResult): void;
|
|
1308
1308
|
/**
|
|
1309
1309
|
* Toggle the visibility of a media control element
|
|
1310
1310
|
* @param name - The name of the media control element
|
|
@@ -2216,19 +2216,13 @@ export declare type PlayerPluginConstructor = CorePluginConstructor | ContainerP
|
|
|
2216
2216
|
* `PLUGIN` that displays a poster image in the background and a big play button on top when playback is stopped
|
|
2217
2217
|
* @beta
|
|
2218
2218
|
* @remarks
|
|
2219
|
-
* When the playback is stopped, media control UI is disabled.
|
|
2219
|
+
* When the playback is stopped or not yet started, the media control UI is disabled and hidden.
|
|
2220
|
+
* Media control gets activated once the metadata is loaded after playback is initiated.
|
|
2221
|
+
* This plugin displays a big play button on top of the poster image to allow user to start playback.
|
|
2220
2222
|
* Note that the poster image, if specified via the player config, will be used to update video element's poster attribute by the
|
|
2221
2223
|
* HTML5-video-based playback module.
|
|
2222
2224
|
*
|
|
2223
|
-
* Configuration options
|
|
2224
|
-
*
|
|
2225
|
-
* - `poster.custom` - custom CSS background
|
|
2226
|
-
*
|
|
2227
|
-
* - `poster.showForNoOp` - whether to show the poster when the playback is not started
|
|
2228
|
-
*
|
|
2229
|
-
* - `poster.url` - the URL of the poster image
|
|
2230
|
-
*
|
|
2231
|
-
* - `poster.showOnVideoEnd` - whether to show the poster when the playback is ended
|
|
2225
|
+
* Configuration options - {@link PosterPluginSettings}
|
|
2232
2226
|
*
|
|
2233
2227
|
* @example
|
|
2234
2228
|
* ```ts
|
|
@@ -2243,10 +2237,9 @@ export declare type PlayerPluginConstructor = CorePluginConstructor | ContainerP
|
|
|
2243
2237
|
*/
|
|
2244
2238
|
export declare class Poster extends UIContainerPlugin {
|
|
2245
2239
|
private hasFatalError;
|
|
2246
|
-
private
|
|
2240
|
+
private playing;
|
|
2247
2241
|
private playRequested;
|
|
2248
2242
|
private $playButton;
|
|
2249
|
-
private $playWrapper;
|
|
2250
2243
|
/**
|
|
2251
2244
|
* @internal
|
|
2252
2245
|
*/
|
|
@@ -2259,12 +2252,12 @@ export declare class Poster extends UIContainerPlugin {
|
|
|
2259
2252
|
};
|
|
2260
2253
|
private static readonly template;
|
|
2261
2254
|
private get shouldRender();
|
|
2255
|
+
private get isNoOp();
|
|
2262
2256
|
/**
|
|
2263
2257
|
* @internal
|
|
2264
2258
|
*/
|
|
2265
2259
|
get attributes(): {
|
|
2266
2260
|
class: string;
|
|
2267
|
-
'data-poster': string;
|
|
2268
2261
|
};
|
|
2269
2262
|
/**
|
|
2270
2263
|
* @internal
|
|
@@ -2272,7 +2265,6 @@ export declare class Poster extends UIContainerPlugin {
|
|
|
2272
2265
|
get events(): {
|
|
2273
2266
|
click: string;
|
|
2274
2267
|
};
|
|
2275
|
-
private get showOnVideoEnd();
|
|
2276
2268
|
/**
|
|
2277
2269
|
* @internal
|
|
2278
2270
|
*/
|
|
@@ -2308,6 +2300,25 @@ export declare class Poster extends UIContainerPlugin {
|
|
|
2308
2300
|
destroy(): this;
|
|
2309
2301
|
}
|
|
2310
2302
|
|
|
2303
|
+
export declare type PosterPluginSettings = {
|
|
2304
|
+
/**
|
|
2305
|
+
* Custom CSS background
|
|
2306
|
+
*/
|
|
2307
|
+
custom?: string;
|
|
2308
|
+
/**
|
|
2309
|
+
* Whether to show the poster image when the playback is noop (i.e., when there is no appropriate video playback engine for current media sources set or the media sources are not set at all)
|
|
2310
|
+
*/
|
|
2311
|
+
showForNoOp?: boolean;
|
|
2312
|
+
/**
|
|
2313
|
+
* Poster image URL
|
|
2314
|
+
*/
|
|
2315
|
+
url?: string;
|
|
2316
|
+
/**
|
|
2317
|
+
* Whether to show the poster after playback has ended @default true
|
|
2318
|
+
*/
|
|
2319
|
+
showOnVideoEnd?: boolean;
|
|
2320
|
+
};
|
|
2321
|
+
|
|
2311
2322
|
/**
|
|
2312
2323
|
* A level of quality within a media source/representation.
|
|
2313
2324
|
* @public
|
|
@@ -2897,6 +2908,12 @@ export declare type TelemetrySendFn = (data: TelemetryRecord) => void;
|
|
|
2897
2908
|
/**
|
|
2898
2909
|
* `PLUGIN` that displays the thumbnails of the video when available.
|
|
2899
2910
|
* @beta
|
|
2911
|
+
* @remarks
|
|
2912
|
+
* The plugin needs specially crafted VTT file with a thumbnail sprite sheet to work.
|
|
2913
|
+
* The VTT consist of timestamp records followed by a thumbnail area
|
|
2914
|
+
*
|
|
2915
|
+
* Configuration options - {@link ThumbnailsPluginSettings}
|
|
2916
|
+
*
|
|
2900
2917
|
* @example
|
|
2901
2918
|
* ```ts
|
|
2902
2919
|
* import { Thumbnails } from '@gcorevideo/player'
|
|
@@ -2917,19 +2934,15 @@ export declare type TelemetrySendFn = (data: TelemetryRecord) => void;
|
|
|
2917
2934
|
* ```
|
|
2918
2935
|
*/
|
|
2919
2936
|
export declare class Thumbnails extends UICorePlugin {
|
|
2920
|
-
private
|
|
2921
|
-
private _$backdrop;
|
|
2922
|
-
private $container;
|
|
2923
|
-
private $img;
|
|
2924
|
-
private _$carousel;
|
|
2925
|
-
private $textThumbnail;
|
|
2926
|
-
private _$backdropCarouselImgs;
|
|
2937
|
+
private $backdropCarouselImgs;
|
|
2927
2938
|
private spriteSheetHeight;
|
|
2928
|
-
private
|
|
2929
|
-
private
|
|
2930
|
-
private
|
|
2931
|
-
private
|
|
2932
|
-
private
|
|
2939
|
+
private spriteSheetWidth;
|
|
2940
|
+
private hoverPosition;
|
|
2941
|
+
private showing;
|
|
2942
|
+
private thumbsLoaded;
|
|
2943
|
+
private spotlightHeight;
|
|
2944
|
+
private backdropHeight;
|
|
2945
|
+
private thumbs;
|
|
2933
2946
|
/**
|
|
2934
2947
|
* @internal
|
|
2935
2948
|
*/
|
|
@@ -2947,29 +2960,30 @@ export declare class Thumbnails extends UICorePlugin {
|
|
|
2947
2960
|
class: string;
|
|
2948
2961
|
};
|
|
2949
2962
|
private static readonly template;
|
|
2963
|
+
constructor(core: Core);
|
|
2950
2964
|
private buildSpriteConfig;
|
|
2951
2965
|
/**
|
|
2952
2966
|
* @internal
|
|
2953
2967
|
*/
|
|
2954
2968
|
bindEvents(): void;
|
|
2955
|
-
private
|
|
2956
|
-
private
|
|
2969
|
+
private bindContainerEvents;
|
|
2970
|
+
private onCoreReady;
|
|
2957
2971
|
private loadSpriteSheet;
|
|
2958
|
-
private
|
|
2959
|
-
private
|
|
2960
|
-
private
|
|
2961
|
-
private
|
|
2962
|
-
private
|
|
2963
|
-
private
|
|
2964
|
-
private
|
|
2965
|
-
private _buildImg;
|
|
2966
|
-
private _loadBackdrop;
|
|
2972
|
+
private onContainerChanged;
|
|
2973
|
+
private init;
|
|
2974
|
+
private mount;
|
|
2975
|
+
private onMouseMoveSeekbar;
|
|
2976
|
+
private onMouseLeave;
|
|
2977
|
+
private buildThumbImage;
|
|
2978
|
+
private loadBackdrop;
|
|
2967
2979
|
private setText;
|
|
2968
|
-
private
|
|
2969
|
-
private
|
|
2970
|
-
private
|
|
2971
|
-
private
|
|
2972
|
-
private
|
|
2980
|
+
private updateCarousel;
|
|
2981
|
+
private updateSpotlightThumb;
|
|
2982
|
+
private getThumbIndexForTime;
|
|
2983
|
+
private update;
|
|
2984
|
+
private fixElements;
|
|
2985
|
+
private get shouldRender();
|
|
2986
|
+
render(): this;
|
|
2973
2987
|
}
|
|
2974
2988
|
|
|
2975
2989
|
/**
|
|
@@ -2977,10 +2991,10 @@ export declare class Thumbnails extends UICorePlugin {
|
|
|
2977
2991
|
* @beta
|
|
2978
2992
|
*/
|
|
2979
2993
|
export declare type ThumbnailsPluginSettings = {
|
|
2980
|
-
backdropHeight
|
|
2981
|
-
backdropMaxOpacity
|
|
2982
|
-
backdropMinOpacity
|
|
2983
|
-
spotlightHeight
|
|
2994
|
+
backdropHeight?: number;
|
|
2995
|
+
backdropMaxOpacity?: number;
|
|
2996
|
+
backdropMinOpacity?: number;
|
|
2997
|
+
spotlightHeight?: number;
|
|
2984
2998
|
sprite: string;
|
|
2985
2999
|
vtt: string;
|
|
2986
3000
|
};
|
|
@@ -1,21 +1,18 @@
|
|
|
1
1
|
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
2
|
|
|
3
|
-
[Home](./index.md) > [@gcorevideo/player](./player.md) > [
|
|
3
|
+
[Home](./index.md) > [@gcorevideo/player](./player.md) > [Clips](./player.clips.md) > [getText](./player.clips.gettext.md)
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## Clips.getText() method
|
|
6
6
|
|
|
7
7
|
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
|
|
8
8
|
>
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
>
|
|
12
|
-
> Use [MediaControl.mount()](./player.mediacontrol.mount.md) instead
|
|
13
|
-
>
|
|
10
|
+
Get the text of the clip at the given time
|
|
14
11
|
|
|
15
12
|
**Signature:**
|
|
16
13
|
|
|
17
14
|
```typescript
|
|
18
|
-
|
|
15
|
+
getText(time: TimeValue): string | undefined;
|
|
19
16
|
```
|
|
20
17
|
|
|
21
18
|
## Parameters
|
|
@@ -38,34 +35,24 @@ Description
|
|
|
38
35
|
</th></tr></thead>
|
|
39
36
|
<tbody><tr><td>
|
|
40
37
|
|
|
41
|
-
|
|
38
|
+
time
|
|
42
39
|
|
|
43
40
|
|
|
44
41
|
</td><td>
|
|
45
42
|
|
|
46
|
-
[
|
|
43
|
+
[TimeValue](./player.timevalue.md)
|
|
47
44
|
|
|
48
45
|
|
|
49
46
|
</td><td>
|
|
50
47
|
|
|
51
|
-
|
|
52
|
-
</td></tr>
|
|
53
|
-
<tr><td>
|
|
54
|
-
|
|
55
|
-
element
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
</td><td>
|
|
59
|
-
|
|
60
|
-
[ZeptoResult](./player.zeptoresult.md)
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
</td><td>
|
|
48
|
+
The time to get the text for
|
|
64
49
|
|
|
65
50
|
|
|
66
51
|
</td></tr>
|
|
67
52
|
</tbody></table>
|
|
68
53
|
**Returns:**
|
|
69
54
|
|
|
70
|
-
|
|
55
|
+
string \| undefined
|
|
56
|
+
|
|
57
|
+
The text of the clip at the given time
|
|
71
58
|
|
package/docs/api/player.clips.md
CHANGED
|
@@ -152,6 +152,20 @@ Description
|
|
|
152
152
|
**_(BETA)_**
|
|
153
153
|
|
|
154
154
|
|
|
155
|
+
</td></tr>
|
|
156
|
+
<tr><td>
|
|
157
|
+
|
|
158
|
+
[getText(time)](./player.clips.gettext.md)
|
|
159
|
+
|
|
160
|
+
|
|
161
|
+
</td><td>
|
|
162
|
+
|
|
163
|
+
|
|
164
|
+
</td><td>
|
|
165
|
+
|
|
166
|
+
**_(BETA)_** Get the text of the clip at the given time
|
|
167
|
+
|
|
168
|
+
|
|
155
169
|
</td></tr>
|
|
156
170
|
<tr><td>
|
|
157
171
|
|
package/docs/api/player.md
CHANGED
|
@@ -237,20 +237,6 @@ Description
|
|
|
237
237
|
**_(BETA)_** Get a media control element DOM node
|
|
238
238
|
|
|
239
239
|
|
|
240
|
-
</td></tr>
|
|
241
|
-
<tr><td>
|
|
242
|
-
|
|
243
|
-
[putElement(name, element)](./player.mediacontrol.putelement.md)
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
</td><td>
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
</td><td>
|
|
250
|
-
|
|
251
|
-
**_(BETA)_**
|
|
252
|
-
|
|
253
|
-
|
|
254
240
|
</td></tr>
|
|
255
241
|
<tr><td>
|
|
256
242
|
|
|
@@ -18,17 +18,9 @@ export declare class Poster extends UIContainerPlugin
|
|
|
18
18
|
|
|
19
19
|
## Remarks
|
|
20
20
|
|
|
21
|
-
When the playback is stopped, media control UI is disabled. Note that the poster image, if specified via the player config, will be used to update video element's poster attribute by the HTML5-video-based playback module.
|
|
21
|
+
When the playback is stopped or not yet started, the media control UI is disabled and hidden. Media control gets activated once the metadata is loaded after playback is initiated. This plugin displays a big play button on top of the poster image to allow user to start playback. Note that the poster image, if specified via the player config, will be used to update video element's poster attribute by the HTML5-video-based playback module.
|
|
22
22
|
|
|
23
|
-
Configuration options
|
|
24
|
-
|
|
25
|
-
- `poster.custom` - custom CSS background
|
|
26
|
-
|
|
27
|
-
- `poster.showForNoOp` - whether to show the poster when the playback is not started
|
|
28
|
-
|
|
29
|
-
- `poster.url` - the URL of the poster image
|
|
30
|
-
|
|
31
|
-
- `poster.showOnVideoEnd` - whether to show the poster when the playback is ended
|
|
23
|
+
Configuration options - [PosterPluginSettings](./player.posterpluginsettings.md)
|
|
32
24
|
|
|
33
25
|
## Example
|
|
34
26
|
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [@gcorevideo/player](./player.md) > [PosterPluginSettings](./player.posterpluginsettings.md)
|
|
4
|
+
|
|
5
|
+
## PosterPluginSettings type
|
|
6
|
+
|
|
7
|
+
**Signature:**
|
|
8
|
+
|
|
9
|
+
```typescript
|
|
10
|
+
export type PosterPluginSettings = {
|
|
11
|
+
custom?: string;
|
|
12
|
+
showForNoOp?: boolean;
|
|
13
|
+
url?: string;
|
|
14
|
+
showOnVideoEnd?: boolean;
|
|
15
|
+
};
|
|
16
|
+
```
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [@gcorevideo/player](./player.md) > [Thumbnails](./player.thumbnails.md) > [(constructor)](./player.thumbnails._constructor_.md)
|
|
4
|
+
|
|
5
|
+
## Thumbnails.(constructor)
|
|
6
|
+
|
|
7
|
+
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
|
|
8
|
+
>
|
|
9
|
+
|
|
10
|
+
Constructs a new instance of the `Thumbnails` class
|
|
11
|
+
|
|
12
|
+
**Signature:**
|
|
13
|
+
|
|
14
|
+
```typescript
|
|
15
|
+
constructor(core: Core);
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## Parameters
|
|
19
|
+
|
|
20
|
+
<table><thead><tr><th>
|
|
21
|
+
|
|
22
|
+
Parameter
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
</th><th>
|
|
26
|
+
|
|
27
|
+
Type
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
</th><th>
|
|
31
|
+
|
|
32
|
+
Description
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
</th></tr></thead>
|
|
36
|
+
<tbody><tr><td>
|
|
37
|
+
|
|
38
|
+
core
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
</td><td>
|
|
42
|
+
|
|
43
|
+
Core
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
</td><td>
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
</td></tr>
|
|
50
|
+
</tbody></table>
|
|
@@ -16,6 +16,12 @@ export declare class Thumbnails extends UICorePlugin
|
|
|
16
16
|
```
|
|
17
17
|
**Extends:** UICorePlugin
|
|
18
18
|
|
|
19
|
+
## Remarks
|
|
20
|
+
|
|
21
|
+
The plugin needs specially crafted VTT file with a thumbnail sprite sheet to work. The VTT consist of timestamp records followed by a thumbnail area
|
|
22
|
+
|
|
23
|
+
Configuration options - [ThumbnailsPluginSettings](./player.thumbnailspluginsettings.md)
|
|
24
|
+
|
|
19
25
|
## Example
|
|
20
26
|
|
|
21
27
|
|
|
@@ -37,3 +43,70 @@ new Player({
|
|
|
37
43
|
})
|
|
38
44
|
```
|
|
39
45
|
|
|
46
|
+
## Constructors
|
|
47
|
+
|
|
48
|
+
<table><thead><tr><th>
|
|
49
|
+
|
|
50
|
+
Constructor
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
</th><th>
|
|
54
|
+
|
|
55
|
+
Modifiers
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
</th><th>
|
|
59
|
+
|
|
60
|
+
Description
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
</th></tr></thead>
|
|
64
|
+
<tbody><tr><td>
|
|
65
|
+
|
|
66
|
+
[(constructor)(core)](./player.thumbnails._constructor_.md)
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
</td><td>
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
</td><td>
|
|
73
|
+
|
|
74
|
+
**_(BETA)_** Constructs a new instance of the `Thumbnails` class
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
</td></tr>
|
|
78
|
+
</tbody></table>
|
|
79
|
+
|
|
80
|
+
## Methods
|
|
81
|
+
|
|
82
|
+
<table><thead><tr><th>
|
|
83
|
+
|
|
84
|
+
Method
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
</th><th>
|
|
88
|
+
|
|
89
|
+
Modifiers
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
</th><th>
|
|
93
|
+
|
|
94
|
+
Description
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
</th></tr></thead>
|
|
98
|
+
<tbody><tr><td>
|
|
99
|
+
|
|
100
|
+
[render()](./player.thumbnails.render.md)
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
</td><td>
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
</td><td>
|
|
107
|
+
|
|
108
|
+
**_(BETA)_**
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
</td></tr>
|
|
112
|
+
</tbody></table>
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [@gcorevideo/player](./player.md) > [Thumbnails](./player.thumbnails.md) > [render](./player.thumbnails.render.md)
|
|
4
|
+
|
|
5
|
+
## Thumbnails.render() method
|
|
6
|
+
|
|
7
|
+
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
|
|
8
|
+
>
|
|
9
|
+
|
|
10
|
+
**Signature:**
|
|
11
|
+
|
|
12
|
+
```typescript
|
|
13
|
+
render(): this;
|
|
14
|
+
```
|
|
15
|
+
**Returns:**
|
|
16
|
+
|
|
17
|
+
this
|
|
18
|
+
|
|
@@ -13,10 +13,10 @@ Plugin configuration options for the thumbnails plugin.
|
|
|
13
13
|
|
|
14
14
|
```typescript
|
|
15
15
|
export type ThumbnailsPluginSettings = {
|
|
16
|
-
backdropHeight
|
|
17
|
-
backdropMaxOpacity
|
|
18
|
-
backdropMinOpacity
|
|
19
|
-
spotlightHeight
|
|
16
|
+
backdropHeight?: number;
|
|
17
|
+
backdropMaxOpacity?: number;
|
|
18
|
+
backdropMinOpacity?: number;
|
|
19
|
+
spotlightHeight?: number;
|
|
20
20
|
sprite: string;
|
|
21
21
|
vtt: string;
|
|
22
22
|
};
|