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
Implement live VTT subtitle loading #2148
Conversation
Once this is merged into master I'll cherry pick it onto the 0.12.3 branch |
I see an issue when stream(vtt) have pdt. In the loop loads segments n+1. And player loading segments when is paused. |
@mtoczko Can you give me a test stream please? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Diff looks good to me 👍
I am curious about the above mentioned issue w/ PDT though
@johnBartos Easy way to reproduce this issue is use jwplayer.
Start stream, turn on subtitle and reload page. HLS.JS |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couple of bits and bobs of changes that could be done, but nothing that has to be imo. I got through most of the PR, and if none of the small changes got caught as incorrect behaviour by unit tests then 👍 given the manual QA that's happened.
reloadInterval = minReloadInterval; | ||
} | ||
|
||
if (lastRequestTime) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is slightly different in the implementation that was here before.
Previously the max was taken between the rounded result in reloadInterval
and minReloadInterval
, now it's the max of the unrounded reloadInterval
and minReloadInterval
.
I don't see this resulting in any meaningful impact though. It could lead up to if I recall Javascript rounding right, a reload interval that occurs up to 0.49s early?
Also, it doesn't backfill old buffer that is outside of the current window. So if you had captions disabled on the first go around, and that is captions file is out of window now, it doesn't go fetch it. To implement this we would have to break:
Possible change. If done, the biggest we could spec compliantly get away with is fetching the segment once it's elapsed a full sliding window. In that, if the window is thirty seconds, the segment should be available on the origin for AT LEAST a full minute according to spec, so we could backfill to that limit, but we would have to be constantly fetching the manifest to do so. I think we wait for folks to request this behaviour, since it's code we would never get rid of, its a lot of network requests, and most folks don't enable captions and then seek whole windows back in their buffer. I'm struggling to think of a site that has a sliding window, but allows seekback into local MSE buffer. |
Co-Authored-By: johnBartos <jbartos7@gmail.com>
ff28121
to
7e58729
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Glad to have your approval 😄
…On Fri, Mar 8, 2019 at 19:04 Marcin Toczko ***@***.***> wrote:
***@***.**** approved this pull request.
LGTM
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#2148 (review)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AEzwZLEg6GqtYhpj2jVUDwEqcAKX7DoQks5vUvqNgaJpZM4bO2HS>
.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
This PR will...
startLoad()/stopLoad()
API callssubtitle-track-controller
andsubtitle-stream-controller
subtitle-stream-controller
frombase-stream-controller
base-stream-controller
subtitle-track-controller
trackId
from subtitle fragments, and refer to them by theirlevel
propertyWhy is this Pull Request needed?
Live subtitle playback is not functioning correctly - on first glance, it appears that sliding isn't being calculated between live refreshes. This is true, but in the course of fixing it I noticed that the live VTT implementation was incomplete and had several unhandled edge cases.
Are there any points in the code the reviewer needs to double check?
We (JW) QA tested this and shipped it in our 8.7.6 release. It would be good to double-check that any code specific to the JW fork didn't make it in. This was our test criteria:
Test streams: