@gcorevideo/player 2.20.3 → 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 +859 -859
- package/dist/index.js +39 -10
- package/dist/player.d.ts +10 -0
- package/dist/plugins/index.css +954 -954
- package/dist/plugins/index.js +10 -5
- package/docs/api/player.contextmenupluginsettings.label.md +3 -0
- package/docs/api/player.contextmenupluginsettings.md +8 -3
- package/docs/api/player.contextmenupluginsettings.preventshowcontextmenu.md +3 -0
- package/docs/api/player.contextmenupluginsettings.url.md +3 -0
- package/docs/api/player.md +6 -2
- 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 +28 -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.volumefadeevents.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/internal.types.d.ts +7 -7
- package/lib/internal.types.d.ts.map +1 -1
- package/lib/plugins/context-menu/ContextMenu.d.ts +4 -0
- package/lib/plugins/context-menu/ContextMenu.d.ts.map +1 -1
- package/lib/plugins/multi-camera/MultiCamera.d.ts +1 -0
- package/lib/plugins/multi-camera/MultiCamera.d.ts.map +1 -1
- package/lib/plugins/multi-camera/MultiCamera.js +3 -2
- package/lib/plugins/seek-time/SeekTime.js +1 -1
- package/lib/plugins/share/Share.js +1 -1
- package/lib/plugins/volume-fade/VolumeFade.d.ts +4 -0
- package/lib/plugins/volume-fade/VolumeFade.d.ts.map +1 -1
- package/lib/plugins/volume-fade/VolumeFade.js +4 -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/internal.types.ts +86 -79
- package/src/plugins/context-menu/ContextMenu.ts +4 -0
- package/src/plugins/multi-camera/MultiCamera.ts +3 -2
- package/src/plugins/seek-time/SeekTime.ts +1 -1
- package/src/plugins/share/Share.ts +1 -1
- package/src/plugins/volume-fade/VolumeFade.ts +4 -0
- package/src/types.ts +11 -1
- package/src/utils/types.ts +1 -0
- package/temp/player.api.json +24 -24
- package/tsconfig.tsbuildinfo +1 -1
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": {
|