Skip to content
New issue

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

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

Already on GitHub? # to your account

Use TextTrackCue "enter" event to improve Interstitial playback timing #6900

Merged
merged 1 commit into from
Dec 10, 2024

Conversation

robwalch
Copy link
Collaborator

@robwalch robwalch commented Dec 9, 2024

This PR will...

  • Use TextTrackCue "enter" event to improve Interstitial playback timing
  • Restore DateRange metadata TextTrack cues when re-attaching media

Why is this Pull Request needed?

TextTrackCue "enter" events provide more precision for Interstitial timing than HTMLMediaElement "timeupdate" events.

Are there any points in the code the reviewer needs to double check?

An "enter" event listener is added to TextTrackCues created for interstitial date range asset-list and asset-url attributes. When dispatched, a new hls.js EVENT_CUE_ENTER event is triggered. The interstitial-controller uses EVENT_CUE_ENTER to run its "timeupdate" handler at a more precise start time.

The logic to advance the program is unchanged and still depends on the HTMLMediaElement currentTime.

Resolves issues:

Checklist

  • changes have been done against master branch, and PR does not conflict
  • new unit / functional tests have been added (whenever applicable)
  • API or design changes are documented in API.md

Restore DateRange metadata TextTrack cues when re-attaching media
@robwalch robwalch added this to the 1.6.0 milestone Dec 9, 2024
@robwalch robwalch merged commit c5a3ae0 into master Dec 10, 2024
16 checks passed
@robwalch robwalch deleted the feature/interstitials-cue-enter-timing branch December 10, 2024 01:06
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

1 participant