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

on level load, check current level details as well as new when determ… #3124

Merged
merged 2 commits into from Oct 19, 2020

Conversation

drewbharris
Copy link
Contributor

This PR will...

Improve playback when a stream switches to VOD (an ENDLIST tag is found)

Why is this Pull Request needed?

Currently if 2 fragments come with an ENDLIST tag, hls.js will skip the first of the two chunks and play the last before going to VOD.

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

I'm not certain if the same fix needs to be applied to subtitle tracks or audio tracks or not

Resolves issues:

End of stream playback when 2 fragments + ENDLIST come in

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

@robwalch robwalch self-requested a review October 16, 2020 22:42
Copy link
Collaborator

@robwalch robwalch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please make the same changes to audio-stream-controller where LevelHelper.mergeDetails is used:

https://github.com/video-dev/hls.js/blob/master/src/controller/audio-stream-controller.js#L425

It's necessary for streams with alt-audio or fmp4 with separate AV playlists. Thanks!

@robwalch robwalch added this to the 0.14.16 milestone Oct 17, 2020
@robwalch
Copy link
Collaborator

@drewbharris I pulled the change locally, ran functional tests and tested some live stream to VOD archive transitions. Looks good. Just needs the same change applies to audio-tracks.

The subtitle stream controller is different enough that we can skip it for now.

@drewbharris
Copy link
Contributor Author

@robwalch I checked in a change on spec, but I actually don't think I have the ability to check if it actually works. I played a VOD with alternate audio tracks and it didn't cause any errors, but I'm curious if you'd have a way to actually verify that the live->archive transition for alternate audio tracks works with this change...

@robwalch
Copy link
Collaborator

@drewbharris I verified it by creating a stream with audio and video ISO playlists, and manually changing the playlists from live (no ENDLIST) with an sn range of 1-149 to VOD (ENDLIST) with an sn range of 2-150. I just left the player paused while changing the files locally.

The one caveat is that you can't seek back to 0 in the above case since there is nothing to seek back to prior to the start of the sliding window (this would not be the case if you loaded the stream after it's a VOD). You would want to use liveDurationInfinity: true so that hls.js sets a seekable range, but once we change to VOD that goes out the window. Odd use-case archive a sliding window. Hopefully in your case the stream is not a sliding window, and the only issue was the timeline adjustments from parsed media not getting aligned with the final update.

@robwalch robwalch merged commit a7ad4ab into video-dev:master Oct 19, 2020
@drewbharris
Copy link
Contributor Author

@robwalch my use case actually doesn't allow any seeking right now (twitch-style playback kept at live edge) so that's not a problem for me. Thanks again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants