@gcorevideo/player 2.24.3 → 2.24.5
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 +2 -2
- package/dist/index.css +1326 -1326
- package/dist/index.js +26 -15
- package/dist/player.d.ts +7 -12
- package/lib/Player.js +1 -1
- package/lib/index.embed.d.ts +30 -0
- package/lib/index.embed.d.ts.map +1 -0
- package/lib/index.embed.js +29 -0
- package/lib/plugins/big-mute-button/BigMuteButton.d.ts +3 -0
- package/lib/plugins/big-mute-button/BigMuteButton.d.ts.map +1 -1
- package/lib/plugins/big-mute-button/BigMuteButton.js +19 -10
- package/lib/plugins/click-to-pause/ClickToPause.js +1 -1
- package/lib/plugins/media-control/MediaControl.js +1 -1
- package/lib/plugins/source-controller/SourceController.d.ts.map +1 -1
- package/lib/plugins/source-controller/SourceController.js +3 -1
- package/lib/testUtils.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/Player.ts +1 -1
- package/src/index.embed.ts +29 -0
- package/src/plugins/big-mute-button/BigMuteButton.ts +30 -19
- package/src/plugins/big-mute-button/__tests__/BigMuteButton.test.ts +60 -12
- package/src/plugins/click-to-pause/ClickToPause.ts +1 -1
- package/src/plugins/media-control/MediaControl.ts +1 -1
- package/src/plugins/source-controller/SourceController.ts +4 -2
- package/src/testUtils.ts +4 -1
- package/tsconfig.tsbuildinfo +1 -1
|
@@ -217,7 +217,9 @@ export class SourceController extends CorePlugin {
|
|
|
217
217
|
if (this.switching) {
|
|
218
218
|
return
|
|
219
219
|
}
|
|
220
|
-
|
|
220
|
+
// The autoPlay metadata flag is set between a call to play and the actual playback start event, after which the flag is cleared.
|
|
221
|
+
this.autoPlay =
|
|
222
|
+
!!this.core.activeContainer.actionsMetadata.playEvent?.autoPlay
|
|
221
223
|
switch (error.code) {
|
|
222
224
|
case PlaybackErrorCode.MediaSourceUnavailable:
|
|
223
225
|
this.core.activeContainer?.getPlugin('poster')?.disable()
|
|
@@ -242,7 +244,7 @@ export class SourceController extends CorePlugin {
|
|
|
242
244
|
this.listenTo(
|
|
243
245
|
this.core.activeContainer,
|
|
244
246
|
Events.CONTAINER_PLAY,
|
|
245
|
-
(_: string, { autoPlay }: { autoPlay?: boolean}) => {
|
|
247
|
+
(_: string, { autoPlay }: { autoPlay?: boolean }) => {
|
|
246
248
|
trace(`${T} onContainerPlay`, {
|
|
247
249
|
autoPlay,
|
|
248
250
|
})
|
package/src/testUtils.ts
CHANGED
|
@@ -42,7 +42,10 @@ export function createSpinnerPlugin() {
|
|
|
42
42
|
})
|
|
43
43
|
}
|
|
44
44
|
|
|
45
|
-
export function createMockPlayback(
|
|
45
|
+
export function createMockPlayback(
|
|
46
|
+
name = 'mock',
|
|
47
|
+
options: Record<string, unknown> = {},
|
|
48
|
+
) {
|
|
46
49
|
const emitter = new Events()
|
|
47
50
|
return Object.assign(emitter, {
|
|
48
51
|
name,
|