@gcorevideo/player 2.27.0 → 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 +24 -1
- package/dist/index.css +702 -702
- package/dist/index.embed.js +23 -0
- package/dist/index.js +24 -1
- package/dist/player.d.ts +6 -0
- package/docs/api/player.player.load.md +56 -0
- package/docs/api/player.player.md +14 -0
- package/lib/Player.d.ts +7 -1
- package/lib/Player.d.ts.map +1 -1
- package/lib/Player.js +23 -0
- package/package.json +1 -1
- package/src/Player.ts +28 -0
- package/temp/player.api.json +53 -0
- package/tsconfig.tsbuildinfo +1 -1
package/dist/core.js
CHANGED
|
@@ -42909,6 +42909,29 @@ class Player {
|
|
|
42909
42909
|
isPlaying() {
|
|
42910
42910
|
return this.player?.isPlaying() ?? false;
|
|
42911
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
|
+
}
|
|
42912
42935
|
/**
|
|
42913
42936
|
* Mutes the sound of the video.
|
|
42914
42937
|
*/
|
|
@@ -43180,7 +43203,7 @@ class Player {
|
|
|
43180
43203
|
}
|
|
43181
43204
|
}
|
|
43182
43205
|
|
|
43183
|
-
var version$1 = "2.
|
|
43206
|
+
var version$1 = "2.28.0";
|
|
43184
43207
|
|
|
43185
43208
|
var packages = {
|
|
43186
43209
|
"node_modules/@clappr/core": {
|