Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Safari failing Load Graph tests #4087

Closed
joeyparrish opened this issue Mar 30, 2022 · 0 comments · Fixed by #4088 or #4009
Closed

Safari failing Load Graph tests #4087

joeyparrish opened this issue Mar 30, 2022 · 0 comments · Fixed by #4088 or #4009
Assignees
Labels
priority: P2 Smaller impact or easy workaround status: archived Archived and locked; will not be updated type: bug Something isn't working correctly
Milestone

Comments

@joeyparrish
Copy link
Member

Safari 15.4 (Mac OS 10.15.7) Player Load Graph routing goes from load to src equals FAILED
        TypeError: null is not an object (evaluating 'this.video_.textTracks') thrown
        TypeError: null is not an object (evaluating 'this.video_.textTracks') thrown

It appears that this code is to blame in lib/player.js:

  processChaptersTrack_(track) {
    if (!track || track.kind != 'chapters') {
      return;
    }

    // Hidden mode is required for the cuechange event to launch correctly and
    // get the cues and the activeCues
    track.mode = 'hidden';

    // In Safari the initial assignment does not always work, so we schedule
    // this process to be repeated several times to ensure that it has been put
    // in the correct mode.
    new shaka.util.Timer(() => {
      const chaptersTracks = this.getChaptersTracks_();
      for (const chaptersTrack of chaptersTracks) {
        chaptersTrack.mode = 'hidden';
      }
    }).tickNow().tickAfter(/* seconds= */ 0.5);
  }

When the timer fires, the player has already been destroyed.

@joeyparrish joeyparrish added type: bug Something isn't working correctly priority: P2 Smaller impact or easy workaround labels Mar 30, 2022
@joeyparrish joeyparrish self-assigned this Mar 30, 2022
joeyparrish added a commit to joeyparrish/shaka-player that referenced this issue Mar 30, 2022
Some events and timers were used to process track changes with src=
playback on Safari, but they did not properly clean up when the player
was unloaded or destroyed.  In the case that this happened quickly
after starting playback, exceptions would be thrown or tracks could
manipulated after new content began.

This fixes the cleanup of these timers and events to be aware of
Player unloads or destruction.

Closes shaka-project#4087
@github-actions github-actions bot added this to the v3.3 milestone Mar 30, 2022
joeyparrish added a commit that referenced this issue Mar 31, 2022
Some events and timers were used to process track changes with src=
playback on Safari, but they did not properly clean up when the player
was unloaded or destroyed.  In the case that this happened quickly
after starting playback, exceptions would be thrown or tracks could
manipulated after new content began.

This fixes the cleanup of these timers and events to be aware of
Player unloads or destruction.

Closes #4087
joeyparrish added a commit that referenced this issue Apr 21, 2022
Some events and timers were used to process track changes with src=
playback on Safari, but they did not properly clean up when the player
was unloaded or destroyed.  In the case that this happened quickly
after starting playback, exceptions would be thrown or tracks could
manipulated after new content began.

This fixes the cleanup of these timers and events to be aware of
Player unloads or destruction.

Closes #4087
joeyparrish added a commit that referenced this issue Apr 21, 2022
Some events and timers were used to process track changes with src=
playback on Safari, but they did not properly clean up when the player
was unloaded or destroyed.  In the case that this happened quickly
after starting playback, exceptions would be thrown or tracks could
manipulated after new content began.

This fixes the cleanup of these timers and events to be aware of
Player unloads or destruction.

Closes #4087
joeyparrish added a commit that referenced this issue Apr 21, 2022
Some events and timers were used to process track changes with src=
playback on Safari, but they did not properly clean up when the player
was unloaded or destroyed.  In the case that this happened quickly
after starting playback, exceptions would be thrown or tracks could
manipulated after new content began.

This fixes the cleanup of these timers and events to be aware of
Player unloads or destruction.

Closes #4087
@avelad avelad modified the milestones: v3.3, v4.0 May 4, 2022
@github-actions github-actions bot added the status: archived Archived and locked; will not be updated label May 30, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 30, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
priority: P2 Smaller impact or easy workaround status: archived Archived and locked; will not be updated type: bug Something isn't working correctly
Projects
None yet
2 participants