@gcorevideo/player 2.26.9 → 2.28.0
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 +25 -1
- package/dist/index.css +1392 -1392
- package/dist/index.embed.js +46 -6
- package/dist/index.js +47 -7
- package/dist/player.d.ts +16 -3
- package/docs/api/player.player.load.md +56 -0
- package/docs/api/player.player.md +14 -0
- package/docs/api/player.sourcecontroller.md +34 -1
- package/docs/api/player.sourcecontroller.setmediasource.md +60 -0
- package/lib/Player.d.ts +7 -1
- package/lib/Player.d.ts.map +1 -1
- package/lib/Player.js +23 -0
- package/lib/playback/HTML5Video.d.ts.map +1 -1
- package/lib/playback/HTML5Video.js +1 -0
- package/lib/plugins/cmcd-config/CmcdConfig.d.ts +1 -0
- package/lib/plugins/cmcd-config/CmcdConfig.d.ts.map +1 -1
- package/lib/plugins/cmcd-config/CmcdConfig.js +9 -3
- package/lib/plugins/source-controller/SourceController.d.ts +10 -3
- package/lib/plugins/source-controller/SourceController.d.ts.map +1 -1
- package/lib/plugins/source-controller/SourceController.js +13 -3
- package/package.json +1 -1
- package/src/Player.ts +31 -1
- package/src/playback/HTML5Video.ts +1 -0
- package/src/plugins/cmcd-config/CmcdConfig.ts +10 -5
- package/src/plugins/source-controller/SourceController.ts +14 -3
- package/temp/player.api.json +107 -1
- package/tsconfig.tsbuildinfo +1 -1
- /package/src/plugins/telemetry/{Statistics copy.xts → Statistics copy.js} +0 -0
package/dist/core.js
CHANGED
|
@@ -42654,6 +42654,7 @@ class HTML5Video extends BasePlayback {
|
|
|
42654
42654
|
super._onEnded();
|
|
42655
42655
|
}
|
|
42656
42656
|
_handleBufferingEvents() {
|
|
42657
|
+
// TODO use the logic from the base class to detect if it's stalled or resumed, because in the latter case the current behavior is not correct
|
|
42657
42658
|
if (!this.stallTimerId) {
|
|
42658
42659
|
this.stallTimerId = setTimeout(() => {
|
|
42659
42660
|
this.stallTimerId = null;
|
|
@@ -42908,6 +42909,29 @@ class Player {
|
|
|
42908
42909
|
isPlaying() {
|
|
42909
42910
|
return this.player?.isPlaying() ?? false;
|
|
42910
42911
|
}
|
|
42912
|
+
/**
|
|
42913
|
+
* Loads new media source
|
|
42914
|
+
* @param mediaSources - list of media sources to use
|
|
42915
|
+
* @beta
|
|
42916
|
+
*/
|
|
42917
|
+
load(mediaSources) {
|
|
42918
|
+
if (mediaSources.length === 0) {
|
|
42919
|
+
throw new Error('No media sources provided');
|
|
42920
|
+
}
|
|
42921
|
+
const ms = mediaSources.map((s) => wrapSource(s));
|
|
42922
|
+
const sourceController = this.player?.core.activePlayback.getPlugin('source_controller');
|
|
42923
|
+
if (sourceController) {
|
|
42924
|
+
sourceController.setMediaSource(ms);
|
|
42925
|
+
return;
|
|
42926
|
+
}
|
|
42927
|
+
if (this.player) {
|
|
42928
|
+
this.player.load(ms, ms[0].mimeType ?? '');
|
|
42929
|
+
return;
|
|
42930
|
+
}
|
|
42931
|
+
this.configure({
|
|
42932
|
+
sources: mediaSources,
|
|
42933
|
+
});
|
|
42934
|
+
}
|
|
42911
42935
|
/**
|
|
42912
42936
|
* Mutes the sound of the video.
|
|
42913
42937
|
*/
|
|
@@ -43179,7 +43203,7 @@ class Player {
|
|
|
43179
43203
|
}
|
|
43180
43204
|
}
|
|
43181
43205
|
|
|
43182
|
-
var version$1 = "2.
|
|
43206
|
+
var version$1 = "2.28.0";
|
|
43183
43207
|
|
|
43184
43208
|
var packages = {
|
|
43185
43209
|
"node_modules/@clappr/core": {
|