@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.
@@ -217,7 +217,9 @@ export class SourceController extends CorePlugin {
217
217
  if (this.switching) {
218
218
  return
219
219
  }
220
- this.autoPlay = !!this.core.activeContainer.actionsMetadata.playEvent?.autoPlay
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(name = 'mock', options: Record<string, unknown> = {}) {
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,