@gcorevideo/player 2.20.1 → 2.20.4
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/dist/core.js +30 -6
- package/dist/index.css +1572 -1572
- package/dist/index.js +343 -226
- package/dist/player.d.ts +280 -52
- package/dist/plugins/index.css +619 -619
- package/dist/plugins/index.js +1468 -1351
- package/docs/api/player.audioselector.md +1 -251
- package/docs/api/player.bigmutebutton.md +1 -156
- package/docs/api/player.clapprstats.exportmetrics.md +4 -0
- package/docs/api/player.clapprstats.md +7 -223
- package/docs/api/player.clapprstats.setupdatemetrics.md +2 -0
- package/docs/api/player.clicktopause.md +5 -113
- package/docs/api/player.clipsplugin.gettext.md +9 -0
- package/docs/api/player.clipsplugin.md +10 -94
- package/docs/api/player.clipspluginsettings.md +57 -0
- package/docs/api/player.clipspluginsettings.text.md +13 -0
- package/docs/api/player.contextmenu._constructor_.md +6 -3
- package/docs/api/player.contextmenu.md +13 -256
- package/docs/api/{player.audioselector.bindevents.md → player.contextmenupluginsettings.label.md} +3 -7
- package/docs/api/player.contextmenupluginsettings.md +98 -0
- package/docs/api/{player.audioselector.attributes.md → player.contextmenupluginsettings.preventshowcontextmenu.md} +3 -6
- package/docs/api/{player.audioselector.reload.md → player.contextmenupluginsettings.url.md} +3 -7
- package/docs/api/player.dvrcontrols.md +1 -1
- package/docs/api/player.errorscreen.md +0 -2
- package/docs/api/player.favicon._constructor_.md +3 -0
- package/docs/api/player.favicon.bindevents.md +3 -0
- package/docs/api/player.favicon.configure.md +3 -0
- package/docs/api/player.favicon.destroy.md +3 -0
- package/docs/api/player.favicon.disable.md +3 -0
- package/docs/api/player.favicon.md +18 -1
- package/docs/api/player.favicon.name.md +3 -0
- package/docs/api/player.favicon.supportedversion.md +3 -0
- package/docs/api/player.gearevents.md +4 -1
- package/docs/api/player.googleanalytics._constructor_.md +3 -0
- package/docs/api/player.googleanalytics.addeventlisteners.md +3 -0
- package/docs/api/player.googleanalytics.embedscript.md +3 -0
- package/docs/api/player.googleanalytics.md +42 -1
- package/docs/api/player.googleanalytics.name.md +3 -0
- package/docs/api/player.googleanalytics.onbufferfull.md +3 -0
- package/docs/api/player.googleanalytics.onbuffering.md +3 -0
- package/docs/api/player.googleanalytics.ondvr.md +3 -0
- package/docs/api/player.googleanalytics.onended.md +3 -0
- package/docs/api/player.googleanalytics.onerror.md +3 -0
- package/docs/api/player.googleanalytics.onfullscreen.md +3 -0
- package/docs/api/player.googleanalytics.onhd.md +3 -0
- package/docs/api/player.googleanalytics.onpause.md +3 -0
- package/docs/api/player.googleanalytics.onplay.md +3 -0
- package/docs/api/player.googleanalytics.onready.md +3 -0
- package/docs/api/player.googleanalytics.onseek.md +3 -0
- package/docs/api/player.googleanalytics.onstop.md +3 -0
- package/docs/api/player.googleanalytics.onvolumechanged.md +3 -0
- package/docs/api/player.googleanalytics.push.md +3 -0
- package/docs/api/player.googleanalytics.supportedversion.md +3 -0
- package/docs/api/player.initeventdata.event.md +3 -0
- package/docs/api/player.initeventdata.md +7 -0
- package/docs/api/player.logo._constructor_.md +3 -0
- package/docs/api/player.logo.attributes.md +3 -0
- package/docs/api/player.logo.bindevents.md +3 -0
- package/docs/api/player.logo.md +20 -1
- package/docs/api/player.logo.name.md +3 -0
- package/docs/api/player.logo.render.md +3 -0
- package/docs/api/player.logo.stoplistening.md +3 -0
- package/docs/api/player.logo.supportedversion.md +3 -0
- package/docs/api/player.logo.template.md +3 -0
- package/docs/api/player.md +73 -21
- package/docs/api/player.mediacontrolelement.md +1 -1
- package/docs/api/player.multicamera._constructor_.md +3 -0
- package/docs/api/player.multicamera.activebyid.md +3 -0
- package/docs/api/player.multicamera.attributes.md +3 -0
- package/docs/api/player.multicamera.bindevents.md +3 -0
- package/docs/api/player.multicamera.events.md +3 -0
- package/docs/api/player.multicamera.getcameraslist.md +3 -0
- package/docs/api/player.multicamera.getcurrentcamera.md +3 -0
- package/docs/api/player.multicamera.md +30 -1
- package/docs/api/player.multicamera.name.md +3 -0
- package/docs/api/player.multicamera.render.md +3 -0
- package/docs/api/player.multicamera.supportedversion.md +3 -0
- package/docs/api/player.multicamera.template.md +3 -0
- package/docs/api/player.multicamera.unbindevents.md +3 -0
- package/docs/api/player.multicamera.version.md +3 -0
- package/docs/api/player.seektime.attributes.md +3 -0
- package/docs/api/player.seektime.bindevents.md +3 -0
- package/docs/api/player.seektime.durationshown.md +3 -0
- package/docs/api/player.seektime.getseektime.md +3 -0
- package/docs/api/player.seektime.islivestreamwithdvr.md +3 -0
- package/docs/api/player.seektime.md +31 -0
- package/docs/api/player.seektime.mediacontrol.md +3 -0
- package/docs/api/player.seektime.mediacontrolcontainer.md +3 -0
- package/docs/api/player.seektime.name.md +3 -0
- package/docs/api/player.seektime.render.md +3 -0
- package/docs/api/player.seektime.shouldbevisible.md +3 -0
- package/docs/api/player.seektime.supportedversion.md +3 -0
- package/docs/api/player.seektime.template.md +3 -0
- package/docs/api/player.seektime.update.md +3 -0
- package/docs/api/player.share.md +2 -0
- package/docs/api/player.skiptime.md +2 -0
- package/docs/api/player.stalleventdata.count.md +3 -0
- package/docs/api/player.stalleventdata.event.md +3 -0
- package/docs/api/player.stalleventdata.md +8 -3
- package/docs/api/player.stalleventdata.time.md +3 -0
- package/docs/api/player.stalleventdata.total_ms.md +3 -0
- package/docs/api/player.starteventdata.event.md +3 -0
- package/docs/api/player.starteventdata.md +7 -0
- package/docs/api/player.telemetryevent.md +11 -0
- package/docs/api/player.telemetryeventdata.md +3 -0
- package/docs/api/player.telemetrypluginsettings.md +4 -1
- package/docs/api/player.telemetrypluginsettings.send.md +3 -0
- package/docs/api/player.telemetryrecord.md +3 -0
- package/docs/api/player.thumbnails.md +21 -139
- package/docs/api/player.thumbnailspluginsettings.md +23 -0
- package/docs/api/player.volumefade.md +1 -0
- package/docs/api/player.volumefadeevents.md +7 -0
- package/docs/api/player.watcheventdata.event.md +3 -0
- package/docs/api/player.watcheventdata.md +7 -0
- package/docs/api/player.zeptoresult.md +1 -0
- package/lib/Player.d.ts +5 -3
- package/lib/Player.d.ts.map +1 -1
- package/lib/Player.js +30 -6
- package/lib/index.plugins.d.ts +0 -1
- package/lib/index.plugins.d.ts.map +1 -1
- package/lib/index.plugins.js +0 -1
- package/lib/internal.types.d.ts +7 -7
- package/lib/internal.types.d.ts.map +1 -1
- package/lib/plugins/audio-selector/AudioSelector.d.ts +28 -6
- package/lib/plugins/audio-selector/AudioSelector.d.ts.map +1 -1
- package/lib/plugins/audio-selector/AudioSelector.js +52 -22
- package/lib/plugins/big-mute-button/BigMuteButton.d.ts +18 -2
- package/lib/plugins/big-mute-button/BigMuteButton.d.ts.map +1 -1
- package/lib/plugins/big-mute-button/BigMuteButton.js +21 -16
- package/lib/plugins/bottom-gear/BottomGear.d.ts +1 -0
- package/lib/plugins/bottom-gear/BottomGear.d.ts.map +1 -1
- package/lib/plugins/bottom-gear/BottomGear.js +1 -0
- package/lib/plugins/clappr-stats/ClapprStats.d.ts +31 -8
- package/lib/plugins/clappr-stats/ClapprStats.d.ts.map +1 -1
- package/lib/plugins/clappr-stats/ClapprStats.js +24 -0
- package/lib/plugins/clappr-stats/types.d.ts +12 -0
- package/lib/plugins/clappr-stats/types.d.ts.map +1 -1
- package/lib/plugins/clappr-stats/types.js +3 -0
- package/lib/plugins/click-to-pause/ClickToPause.d.ts +13 -1
- package/lib/plugins/click-to-pause/ClickToPause.d.ts.map +1 -1
- package/lib/plugins/click-to-pause/ClickToPause.js +14 -4
- package/lib/plugins/clips/Clips.d.ts +34 -2
- package/lib/plugins/clips/Clips.d.ts.map +1 -1
- package/lib/plugins/clips/Clips.js +51 -22
- package/lib/plugins/context-menu/ContextMenu.d.ts +44 -13
- package/lib/plugins/context-menu/ContextMenu.d.ts.map +1 -1
- package/lib/plugins/context-menu/ContextMenu.js +48 -36
- package/lib/plugins/dvr-controls/DvrControls.d.ts +1 -3
- package/lib/plugins/dvr-controls/DvrControls.d.ts.map +1 -1
- package/lib/plugins/dvr-controls/DvrControls.js +11 -28
- package/lib/plugins/error-screen/ErrorScreen.d.ts +0 -1
- package/lib/plugins/error-screen/ErrorScreen.d.ts.map +1 -1
- package/lib/plugins/error-screen/ErrorScreen.js +0 -1
- package/lib/plugins/favicon/Favicon.d.ts +4 -0
- package/lib/plugins/favicon/Favicon.d.ts.map +1 -1
- package/lib/plugins/favicon/Favicon.js +4 -0
- package/lib/plugins/google-analytics/GoogleAnalytics.d.ts +4 -0
- package/lib/plugins/google-analytics/GoogleAnalytics.d.ts.map +1 -1
- package/lib/plugins/google-analytics/GoogleAnalytics.js +5 -1
- package/lib/plugins/index.d.ts +0 -1
- package/lib/plugins/index.d.ts.map +1 -1
- package/lib/plugins/index.js +0 -1
- package/lib/plugins/logo/Logo.d.ts +4 -0
- package/lib/plugins/logo/Logo.d.ts.map +1 -1
- package/lib/plugins/logo/Logo.js +4 -0
- package/lib/plugins/media-control/MediaControl.d.ts +1 -1
- package/lib/plugins/media-control/MediaControl.d.ts.map +1 -1
- package/lib/plugins/media-control/MediaControl.js +3 -1
- package/lib/plugins/multi-camera/MultiCamera.d.ts +4 -0
- package/lib/plugins/multi-camera/MultiCamera.d.ts.map +1 -1
- package/lib/plugins/multi-camera/MultiCamera.js +6 -2
- package/lib/plugins/seek-time/SeekTime.d.ts +4 -0
- package/lib/plugins/seek-time/SeekTime.d.ts.map +1 -1
- package/lib/plugins/seek-time/SeekTime.js +6 -2
- package/lib/plugins/share/Share.d.ts +3 -0
- package/lib/plugins/share/Share.d.ts.map +1 -1
- package/lib/plugins/share/Share.js +4 -1
- package/lib/plugins/skip-time/SkipTime.d.ts +3 -0
- package/lib/plugins/skip-time/SkipTime.d.ts.map +1 -1
- package/lib/plugins/skip-time/SkipTime.js +3 -0
- package/lib/plugins/telemetry/Telemetry.d.ts +18 -0
- package/lib/plugins/telemetry/Telemetry.d.ts.map +1 -1
- package/lib/plugins/telemetry/Telemetry.js +1 -0
- package/lib/plugins/thumbnails/Thumbnails.d.ts +48 -3
- package/lib/plugins/thumbnails/Thumbnails.d.ts.map +1 -1
- package/lib/plugins/thumbnails/Thumbnails.js +52 -18
- package/lib/plugins/volume-fade/VolumeFade.d.ts +5 -0
- package/lib/plugins/volume-fade/VolumeFade.d.ts.map +1 -1
- package/lib/plugins/volume-fade/VolumeFade.js +5 -0
- package/lib/types.d.ts +9 -1
- package/lib/types.d.ts.map +1 -1
- package/lib/utils/types.d.ts +1 -0
- package/lib/utils/types.d.ts.map +1 -1
- package/package.json +1 -1
- package/release_notes +297 -0
- package/src/Player.ts +101 -46
- package/src/__tests__/Player.test.ts +23 -1
- package/src/index.plugins.ts +0 -1
- package/src/internal.types.ts +86 -79
- package/src/plugins/audio-selector/AudioSelector.ts +227 -154
- package/src/plugins/big-mute-button/BigMuteButton.ts +100 -79
- package/src/plugins/bottom-gear/BottomGear.ts +1 -0
- package/src/plugins/clappr-stats/ClapprStats.ts +32 -8
- package/src/plugins/clappr-stats/types.ts +13 -0
- package/src/plugins/click-to-pause/ClickToPause.ts +47 -36
- package/src/plugins/clips/Clips.ts +127 -71
- package/src/plugins/context-menu/ContextMenu.ts +109 -76
- package/src/plugins/dvr-controls/DvrControls.ts +11 -30
- package/src/plugins/error-screen/ErrorScreen.ts +0 -1
- package/src/plugins/favicon/Favicon.ts +4 -0
- package/src/plugins/google-analytics/GoogleAnalytics.ts +5 -1
- package/src/plugins/index.ts +0 -1
- package/src/plugins/logo/Logo.ts +4 -0
- package/src/plugins/media-control/MediaControl.ts +4 -1
- package/src/plugins/multi-camera/MultiCamera.ts +6 -2
- package/src/plugins/seek-time/SeekTime.ts +6 -2
- package/src/plugins/share/Share.ts +4 -1
- package/src/plugins/skip-time/SkipTime.ts +3 -0
- package/src/plugins/telemetry/Telemetry.ts +18 -0
- package/src/plugins/thumbnails/Thumbnails.ts +268 -194
- package/src/plugins/volume-fade/VolumeFade.ts +5 -0
- package/src/types.ts +11 -1
- package/src/utils/types.ts +1 -0
- package/temp/player.api.json +627 -2468
- package/tsconfig.tsbuildinfo +1 -1
- package/docs/api/player.audioselector.events.md +0 -17
- package/docs/api/player.audioselector.hideselecttrackmenu.md +0 -18
- package/docs/api/player.audioselector.name.md +0 -14
- package/docs/api/player.audioselector.onshowlevelselectmenu.md +0 -18
- package/docs/api/player.audioselector.render.md +0 -18
- package/docs/api/player.audioselector.supportedversion.md +0 -16
- package/docs/api/player.audioselector.template.md +0 -14
- package/docs/api/player.audioselector.togglecontextmenu.md +0 -18
- package/docs/api/player.audioselector.unbindevents.md +0 -18
- package/docs/api/player.audioselector.version.md +0 -14
- package/docs/api/player.bigmutebutton.bindevents.md +0 -18
- package/docs/api/player.bigmutebutton.events.md +0 -17
- package/docs/api/player.bigmutebutton.name.md +0 -14
- package/docs/api/player.bigmutebutton.render.md +0 -18
- package/docs/api/player.bigmutebutton.supportedversion.md +0 -16
- package/docs/api/player.bigmutebutton.template.md +0 -14
- package/docs/api/player.clapprstats._buildreport.md +0 -18
- package/docs/api/player.clapprstats._defaultreport.md +0 -52
- package/docs/api/player.clapprstats._playbackname.md +0 -14
- package/docs/api/player.clapprstats._playbacktype.md +0 -14
- package/docs/api/player.clapprstats.bindevents.md +0 -18
- package/docs/api/player.clapprstats.destroy.md +0 -18
- package/docs/api/player.clapprstats.name.md +0 -14
- package/docs/api/player.clapprstats.onfirstplaying.md +0 -18
- package/docs/api/player.clapprstats.playafterpause.md +0 -18
- package/docs/api/player.clapprstats.starttimers.md +0 -18
- package/docs/api/player.clapprstats.stopreporting.md +0 -18
- package/docs/api/player.clapprstats.supportedversion.md +0 -16
- package/docs/api/player.clicktopause.bindevents.md +0 -15
- package/docs/api/player.clicktopause.config.md +0 -11
- package/docs/api/player.clicktopause.name.md +0 -11
- package/docs/api/player.clicktopause.supportedversion.md +0 -13
- package/docs/api/player.clipsplugin.attributes.md +0 -13
- package/docs/api/player.clipsplugin.bindevents.md +0 -15
- package/docs/api/player.clipsplugin.makesvg.md +0 -49
- package/docs/api/player.clipsplugin.name.md +0 -11
- package/docs/api/player.clipsplugin.unbindevents.md +0 -15
- package/docs/api/player.contextmenu.attributes.md +0 -13
- package/docs/api/player.contextmenu.bindevents.md +0 -15
- package/docs/api/player.contextmenu.destroy.md +0 -15
- package/docs/api/player.contextmenu.events.md +0 -13
- package/docs/api/player.contextmenu.exposeversion.md +0 -14
- package/docs/api/player.contextmenu.label.md +0 -11
- package/docs/api/player.contextmenu.mediacontrol.md +0 -11
- package/docs/api/player.contextmenu.name.md +0 -11
- package/docs/api/player.contextmenu.render.md +0 -15
- package/docs/api/player.contextmenu.supportedversion.md +0 -13
- package/docs/api/player.contextmenu.template.md +0 -11
- package/docs/api/player.contextmenu.url.md +0 -11
- package/docs/api/player.disablecontrols.bindevents.md +0 -15
- package/docs/api/player.disablecontrols.container.md +0 -11
- package/docs/api/player.disablecontrols.md +0 -138
- package/docs/api/player.disablecontrols.name.md +0 -11
- package/docs/api/player.disablecontrols.supportedversion.md +0 -13
- package/docs/api/player.disablecontrols.unbindevents.md +0 -15
- package/docs/api/player.thumbnails.attributes.md +0 -13
- package/docs/api/player.thumbnails.bindevents.md +0 -15
- package/docs/api/player.thumbnails.name.md +0 -11
- package/docs/api/player.thumbnails.settext.md +0 -49
- package/docs/api/player.thumbnails.supportedversion.md +0 -13
- package/docs/api/player.thumbnails.template.md +0 -11
- package/src/plugins/disable-controls/DisableControls.ts +0 -81
- package/src/plugins/ga-events/GaEvents.js +0 -395
- package/src/plugins/ga-events/ga-tracking.js +0 -46
package/dist/core.js
CHANGED
|
@@ -42408,7 +42408,7 @@ class Player {
|
|
|
42408
42408
|
Log.setLevel(0);
|
|
42409
42409
|
}
|
|
42410
42410
|
const coreOpts = this.buildCoreOptions(playerElement);
|
|
42411
|
-
const { core, container } =
|
|
42411
|
+
const { core, container } = Player.getRegisteredPlugins();
|
|
42412
42412
|
trace(`${T} init`, {
|
|
42413
42413
|
registeredPlaybacks: Loader.registeredPlaybacks.map((p) => p.name),
|
|
42414
42414
|
});
|
|
@@ -42570,13 +42570,35 @@ class Player {
|
|
|
42570
42570
|
* ```
|
|
42571
42571
|
*/
|
|
42572
42572
|
static registerPlugin(plugin) {
|
|
42573
|
+
assert.ok(plugin.type === 'core' || plugin.type === 'container', 'Invalid plugin type');
|
|
42574
|
+
if (plugin.type === 'core') {
|
|
42575
|
+
if (plugin.prototype.name === 'media_control') {
|
|
42576
|
+
Player.corePlugins.unshift(plugin);
|
|
42577
|
+
}
|
|
42578
|
+
else {
|
|
42579
|
+
Player.corePlugins.push(plugin);
|
|
42580
|
+
}
|
|
42581
|
+
return;
|
|
42582
|
+
}
|
|
42573
42583
|
Loader.registerPlugin(plugin);
|
|
42574
42584
|
}
|
|
42585
|
+
static getRegisteredPlugins() {
|
|
42586
|
+
for (const plugin of Player.corePlugins) {
|
|
42587
|
+
Loader.registerPlugin(plugin);
|
|
42588
|
+
}
|
|
42589
|
+
return Loader.registeredPlugins;
|
|
42590
|
+
}
|
|
42591
|
+
static corePlugins = [];
|
|
42575
42592
|
/**
|
|
42576
42593
|
* Unregisters a plugin registered earlier with {@link Player.registerPlugin}.
|
|
42577
42594
|
* @param plugin - a plugin class
|
|
42578
42595
|
*/
|
|
42579
42596
|
static unregisterPlugin(plugin) {
|
|
42597
|
+
assert.ok(plugin.type === 'core' || plugin.type === 'container', 'Invalid plugin type');
|
|
42598
|
+
if (plugin.type === 'core') {
|
|
42599
|
+
Player.corePlugins = Player.corePlugins.filter((p) => p !== plugin);
|
|
42600
|
+
return;
|
|
42601
|
+
}
|
|
42580
42602
|
Loader.unregisterPlugin(plugin);
|
|
42581
42603
|
}
|
|
42582
42604
|
setConfig(config) {
|
|
@@ -42717,8 +42739,10 @@ class Player {
|
|
|
42717
42739
|
}, null);
|
|
42718
42740
|
}
|
|
42719
42741
|
bindCoreListeners() {
|
|
42720
|
-
|
|
42721
|
-
|
|
42742
|
+
// TODO create an class inherited from PlayerClappr
|
|
42743
|
+
assert.ok(this.player, 'Player is not initialized');
|
|
42744
|
+
const core = this.player.core;
|
|
42745
|
+
core.on(Events$1.CORE_SCREEN_ORIENTATION_CHANGED, ({ orientation }) => {
|
|
42722
42746
|
trace(`${T} on CORE_SCREEN_ORIENTATION_CHANGED`, {
|
|
42723
42747
|
orientation,
|
|
42724
42748
|
rootNode: {
|
|
@@ -42733,14 +42757,14 @@ class Player {
|
|
|
42733
42757
|
});
|
|
42734
42758
|
}
|
|
42735
42759
|
}, null);
|
|
42736
|
-
core
|
|
42760
|
+
core.on(Events$1.CORE_RESIZE, ({ width, height }) => {
|
|
42737
42761
|
trace(`${T} on CORE_RESIZE`, {
|
|
42738
42762
|
width,
|
|
42739
42763
|
height,
|
|
42740
42764
|
});
|
|
42741
42765
|
this.safeTriggerEvent(PlayerEvent.Resize, { width, height });
|
|
42742
42766
|
}, null);
|
|
42743
|
-
core
|
|
42767
|
+
core.on(Events$1.CORE_FULLSCREEN, (isFullscreen) => {
|
|
42744
42768
|
trace(`${T} CORE_FULLSCREEN`, {
|
|
42745
42769
|
isFullscreen,
|
|
42746
42770
|
});
|
|
@@ -42749,7 +42773,7 @@ class Player {
|
|
|
42749
42773
|
}
|
|
42750
42774
|
}
|
|
42751
42775
|
|
|
42752
|
-
var version$1 = "2.20.
|
|
42776
|
+
var version$1 = "2.20.4";
|
|
42753
42777
|
|
|
42754
42778
|
var packages = {
|
|
42755
42779
|
"node_modules/@clappr/core": {
|