@gcorevideo/player 2.28.0 → 2.28.1
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 +13 -9
- package/dist/index.css +498 -498
- package/dist/index.embed.js +11 -8
- package/dist/index.js +16 -9
- package/lib/Player.d.ts.map +1 -1
- package/lib/Player.js +12 -8
- package/lib/plugins/source-controller/SourceController.d.ts.map +1 -1
- package/lib/plugins/source-controller/SourceController.js +3 -0
- package/package.json +1 -1
- package/src/Player.ts +12 -8
- package/src/plugins/source-controller/SourceController.ts +3 -0
- package/tsconfig.tsbuildinfo +1 -1
package/dist/index.embed.js
CHANGED
|
@@ -42840,19 +42840,22 @@ class Player {
|
|
|
42840
42840
|
if (mediaSources.length === 0) {
|
|
42841
42841
|
throw new Error('No media sources provided');
|
|
42842
42842
|
}
|
|
42843
|
+
trace('load', {
|
|
42844
|
+
player: !!this.player,
|
|
42845
|
+
});
|
|
42846
|
+
if (!this.player) {
|
|
42847
|
+
this.configure({
|
|
42848
|
+
sources: mediaSources,
|
|
42849
|
+
});
|
|
42850
|
+
return;
|
|
42851
|
+
}
|
|
42843
42852
|
const ms = mediaSources.map((s) => wrapSource(s));
|
|
42844
|
-
const sourceController = this.player?.core.
|
|
42853
|
+
const sourceController = this.player?.core.getPlugin('source_controller');
|
|
42845
42854
|
if (sourceController) {
|
|
42846
42855
|
sourceController.setMediaSource(ms);
|
|
42847
42856
|
return;
|
|
42848
42857
|
}
|
|
42849
|
-
|
|
42850
|
-
this.player.load(ms, ms[0].mimeType ?? '');
|
|
42851
|
-
return;
|
|
42852
|
-
}
|
|
42853
|
-
this.configure({
|
|
42854
|
-
sources: mediaSources,
|
|
42855
|
-
});
|
|
42858
|
+
this.player?.load(ms, ms[0].mimeType ?? '');
|
|
42856
42859
|
}
|
|
42857
42860
|
/**
|
|
42858
42861
|
* Mutes the sound of the video.
|
package/dist/index.js
CHANGED
|
@@ -43004,19 +43004,23 @@ class Player {
|
|
|
43004
43004
|
if (mediaSources.length === 0) {
|
|
43005
43005
|
throw new Error('No media sources provided');
|
|
43006
43006
|
}
|
|
43007
|
+
trace('load', {
|
|
43008
|
+
mediaSources,
|
|
43009
|
+
player: !!this.player,
|
|
43010
|
+
});
|
|
43011
|
+
if (!this.player) {
|
|
43012
|
+
this.configure({
|
|
43013
|
+
sources: mediaSources,
|
|
43014
|
+
});
|
|
43015
|
+
return;
|
|
43016
|
+
}
|
|
43007
43017
|
const ms = mediaSources.map((s) => wrapSource(s));
|
|
43008
|
-
const sourceController = this.player?.core.
|
|
43018
|
+
const sourceController = this.player?.core.getPlugin('source_controller');
|
|
43009
43019
|
if (sourceController) {
|
|
43010
43020
|
sourceController.setMediaSource(ms);
|
|
43011
43021
|
return;
|
|
43012
43022
|
}
|
|
43013
|
-
|
|
43014
|
-
this.player.load(ms, ms[0].mimeType ?? '');
|
|
43015
|
-
return;
|
|
43016
|
-
}
|
|
43017
|
-
this.configure({
|
|
43018
|
-
sources: mediaSources,
|
|
43019
|
-
});
|
|
43023
|
+
this.player?.load(ms, ms[0].mimeType ?? '');
|
|
43020
43024
|
}
|
|
43021
43025
|
/**
|
|
43022
43026
|
* Mutes the sound of the video.
|
|
@@ -43289,7 +43293,7 @@ class Player {
|
|
|
43289
43293
|
}
|
|
43290
43294
|
}
|
|
43291
43295
|
|
|
43292
|
-
var version$1 = "2.28.
|
|
43296
|
+
var version$1 = "2.28.1";
|
|
43293
43297
|
|
|
43294
43298
|
var packages = {
|
|
43295
43299
|
"node_modules/@clappr/core": {
|
|
@@ -51403,6 +51407,9 @@ class SourceController extends CorePlugin {
|
|
|
51403
51407
|
* Triggers a reload of the playback module, container and all container plugins.
|
|
51404
51408
|
*/
|
|
51405
51409
|
setMediaSource(sourcesList) {
|
|
51410
|
+
trace('setMediaSource', {
|
|
51411
|
+
sourcesList,
|
|
51412
|
+
});
|
|
51406
51413
|
this.sourcesList = sourcesList;
|
|
51407
51414
|
this.core.load(sourcesList, this.core.options.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) {
|
|
182
182
|
throw new Error('No media sources provided');
|
|
183
183
|
}
|
|
184
|
+
trace('load', {
|
|
185
|
+
mediaSources,
|
|
186
|
+
player: !!this.player,
|
|
187
|
+
});
|
|
188
|
+
if (!this.player) {
|
|
189
|
+
this.configure({
|
|
190
|
+
sources: mediaSources,
|
|
191
|
+
});
|
|
192
|
+
return;
|
|
193
|
+
}
|
|
184
194
|
const ms = mediaSources.map((s) => wrapSource(s));
|
|
185
|
-
const sourceController = this.player?.core.
|
|
195
|
+
const sourceController = this.player?.core.getPlugin('source_controller');
|
|
186
196
|
if (sourceController) {
|
|
187
197
|
sourceController.setMediaSource(ms);
|
|
188
198
|
return;
|
|
189
199
|
}
|
|
190
|
-
|
|
191
|
-
this.player.load(ms, ms[0].mimeType ?? '');
|
|
192
|
-
return;
|
|
193
|
-
}
|
|
194
|
-
this.configure({
|
|
195
|
-
sources: mediaSources,
|
|
196
|
-
});
|
|
200
|
+
this.player?.load(ms, ms[0].mimeType ?? '');
|
|
197
201
|
}
|
|
198
202
|
/**
|
|
199
203
|
* Mutes the sound of the video.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SourceController.d.ts","sourceRoot":"","sources":["../../../src/plugins/source-controller/SourceController.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,UAAU,EACV,KAAK,IAAI,IAAI,UAAU,EACxB,MAAM,cAAc,CAAA;AAErB,OAAO,EAAE,KAAK,qBAAqB,EAAE,MAAM,gBAAgB,CAAA;AAsB3D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiDG;AACH,qBAAa,gBAAiB,SAAQ,UAAU;IAwC9C,OAAO,CAAC,WAAW,CAA8B;IAEjD,OAAO,CAAC,kBAAkB,CAAI;IAE9B,OAAO,CAAC,YAAY,CAA6B;IAEjD,OAAO,CAAC,MAAM,CAAQ;IAEtB,OAAO,CAAC,QAAQ,CAAQ;IAExB,OAAO,CAAC,SAAS,CAAQ;IAEzB,OAAO,CAAC,IAAI,CAAiB;IAE7B;;OAEG;IACH,IAAI,IAAI,WAEP;IAED;;OAEG;IACH,IAAI,gBAAgB;;MAEnB;IAED;;OAEG;gBACS,IAAI,EAAE,UAAU;IAY5B;;;;;;;OAOG;IACH,cAAc,CAAC,WAAW,EAAE,qBAAqB,EAAE;
|
|
1
|
+
{"version":3,"file":"SourceController.d.ts","sourceRoot":"","sources":["../../../src/plugins/source-controller/SourceController.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,UAAU,EACV,KAAK,IAAI,IAAI,UAAU,EACxB,MAAM,cAAc,CAAA;AAErB,OAAO,EAAE,KAAK,qBAAqB,EAAE,MAAM,gBAAgB,CAAA;AAsB3D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiDG;AACH,qBAAa,gBAAiB,SAAQ,UAAU;IAwC9C,OAAO,CAAC,WAAW,CAA8B;IAEjD,OAAO,CAAC,kBAAkB,CAAI;IAE9B,OAAO,CAAC,YAAY,CAA6B;IAEjD,OAAO,CAAC,MAAM,CAAQ;IAEtB,OAAO,CAAC,QAAQ,CAAQ;IAExB,OAAO,CAAC,SAAS,CAAQ;IAEzB,OAAO,CAAC,IAAI,CAAiB;IAE7B;;OAEG;IACH,IAAI,IAAI,WAEP;IAED;;OAEG;IACH,IAAI,gBAAgB;;MAEnB;IAED;;OAEG;gBACS,IAAI,EAAE,UAAU;IAY5B;;;;;;;OAOG;IACH,cAAc,CAAC,WAAW,EAAE,qBAAqB,EAAE;IAQnD;;OAEG;IACM,UAAU;IAWnB,OAAO,CAAC,WAAW;IAInB,OAAO,CAAC,wBAAwB;IAgBhC,OAAO,CAAC,2BAA2B;IAiDnC,OAAO,CAAC,KAAK;IAKb,OAAO,CAAC,aAAa;IAgCrB,OAAO,CAAC,kBAAkB;IAe1B;;OAEG;IACH,MAAM,KAAK,OAAO,WAEjB;CACF"}
|
|
@@ -144,6 +144,9 @@ export class SourceController extends CorePlugin {
|
|
|
144
144
|
* Triggers a reload of the playback module, container and all container plugins.
|
|
145
145
|
*/
|
|
146
146
|
setMediaSource(sourcesList) {
|
|
147
|
+
trace('setMediaSource', {
|
|
148
|
+
sourcesList,
|
|
149
|
+
});
|
|
147
150
|
this.sourcesList = sourcesList;
|
|
148
151
|
this.core.load(sourcesList, this.core.options.mimeType);
|
|
149
152
|
}
|
package/package.json
CHANGED
package/src/Player.ts
CHANGED
|
@@ -257,21 +257,25 @@ export class Player {
|
|
|
257
257
|
if (mediaSources.length === 0) {
|
|
258
258
|
throw new Error('No media sources provided')
|
|
259
259
|
}
|
|
260
|
+
trace('load', {
|
|
261
|
+
mediaSources,
|
|
262
|
+
player: !!this.player,
|
|
263
|
+
})
|
|
264
|
+
if (!this.player) {
|
|
265
|
+
this.configure({
|
|
266
|
+
sources: mediaSources,
|
|
267
|
+
})
|
|
268
|
+
return
|
|
269
|
+
}
|
|
260
270
|
const ms = mediaSources.map((s) => wrapSource(s))
|
|
261
|
-
const sourceController = this.player?.core.
|
|
271
|
+
const sourceController = this.player?.core.getPlugin(
|
|
262
272
|
'source_controller',
|
|
263
273
|
) as SourceController
|
|
264
274
|
if (sourceController) {
|
|
265
275
|
sourceController.setMediaSource(ms)
|
|
266
276
|
return
|
|
267
277
|
}
|
|
268
|
-
|
|
269
|
-
this.player.load(ms, ms[0].mimeType ?? '')
|
|
270
|
-
return
|
|
271
|
-
}
|
|
272
|
-
this.configure({
|
|
273
|
-
sources: mediaSources,
|
|
274
|
-
})
|
|
278
|
+
this.player?.load(ms, ms[0].mimeType ?? '')
|
|
275
279
|
}
|
|
276
280
|
|
|
277
281
|
/**
|
|
@@ -168,6 +168,9 @@ export class SourceController extends CorePlugin {
|
|
|
168
168
|
* Triggers a reload of the playback module, container and all container plugins.
|
|
169
169
|
*/
|
|
170
170
|
setMediaSource(sourcesList: PlayerMediaSourceDesc[]) {
|
|
171
|
+
trace('setMediaSource', {
|
|
172
|
+
sourcesList,
|
|
173
|
+
})
|
|
171
174
|
this.sourcesList = sourcesList
|
|
172
175
|
this.core.load(sourcesList, this.core.options.mimeType)
|
|
173
176
|
}
|