-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Shaka does not autoplay when the stream starts with a gap #2987
Comments
@lemonwhale, I was just informed by email that this is working in dash.js. For comparison, and to help us debug, can you please try this stream in dash.js and Shaka Player and compare the buffered ranges presented in each? const b = videoElement.buffered;
console.log('Buffered ranges: ' + b.length);
for (let i = 0; i < b.length; ++i) { console.log(b.start(i) + ' - ' + b.end(i)); } |
Can you run the following code in the JS console with both players? You don't need to insert code into the player itself. This will tell us what the buffered ranges are for the two players, which will help us understand the difference between them. const b = videoElement.buffered;
console.log('Buffered ranges: ' + b.length);
for (let i = 0; i < b.length; ++i) { console.log(b.start(i) + ' - ' + b.end(i)); } |
Hi Joey,
The 'videoElement is not defined', that's the error ins th JS console, for both Shaka and DASH.js
Please run the code your mention on this url
https://lbs-usp-dash-live.cmore.se/group05/debug/live.isml/.mpd?t=2020-11-12T12%3A30%3A00.000-2020-11-12T12%3A45%3A00.000
Kind regards,
Dirk
|
I should have been more specific about the video element. That's whatever the actual video element is, not a literal variable I expect to be predefined. If there's only one video element on the page, this should do it: const videoElement = document.querySelector('video'); |
Hi Joey,
All I see is ‘undefined’ - which seems the result of the expression (as I find online, ‘console.log(‘hello’) also gives ‘undefined’ but with ‘hello’ as ’side-effect’):
Can you not yourself paste the url in the player?
https://lbs-usp-dash-live.cmore.se/group05/debug/live.isml/.mpd?t=2020-11-12T12%3A30%3A00.000-2020-11-12T12%3A45%3A00.000
Kind regards,
Dirk
… On 21 Jan 2021, at 22:00, Joey Parrish ***@***.***> wrote:
I should have been more specific about the video element. That's whatever the actual video element is, not a literal variable I expect to be predefined.
If there's only one video element on the page, this should do it:
const videoElement = document.querySelector('video');
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub <#2987 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/APOGCI5OHGRVKISUQPGF423S3CIYRANCNFSM4TUKSG4Q>.
|
Sorry for being absent in the conversation, been working on other stuff. Thanks both of you for looking at this. I will try the suggestion above. |
For Shaka player: |
For Dash.js |
@joeyparrish Did you see the logs above? |
Hi Joey, Any news on this? |
Hi gentlemen, sorry for the delay! @TheModMaker Can I drag you into this as a gap expert, if you have some time? @dirk-unified @lemonwhale if both our gap experts are too busy (as in - if there's no news on this in the next few days), please feel free to ping me next week. It'll be a little slower as I'm not as familiar with our gap logic, but I'll do my best! :) |
I believe I've found a bug in the GapJumpingController component that has been there since the beginning. I believe I have a fix that makes autoplay work correctly on this content. In essence, we don't want to jump ahead while paused. But when playback starts, the video is automatically in a "paused" state. With |
Awesome. That sounds very promising. Any rough estimate when we can get this fix for test and production? |
The fix got held up in code review, but it just landed in the master branch. I should be able to push out a v3.0.9 some time next week. |
If a VOD asset does not start at time 0, we should jump to the time at which it does start. Until we jump, even with autoplay set to true, the video remains in a paused state. Therefore we can't inhibit autoplay based on the paused state alone. Instead, we should only inhibit autoplay if we're paused at a time other than 0. If we're paused at 0, we're trying to start playing, so we should jump that initial gap to allow autoplay to work. Closes #2987 Change-Id: Ie55ab0ec6662afcbd01e3c5e71b659aae84372b5
If a VOD asset does not start at time 0, we should jump to the time at which it does start. Until we jump, even with autoplay set to true, the video remains in a paused state. Therefore we can't inhibit autoplay based on the paused state alone. Instead, we should only inhibit autoplay if we're paused at a time other than 0. If we're paused at 0, we're trying to start playing, so we should jump that initial gap to allow autoplay to work. Closes #2987 Backported to v2.5.x Change-Id: Ie55ab0ec6662afcbd01e3c5e71b659aae84372b5
Have you read the FAQ and checked for duplicate open issues?
Yes
What version of Shaka Player are you using?
3.0.5
Can you reproduce the issue with our latest release version?
Yes, 3.0.5 is the latest I can find
Can you reproduce the issue with the latest code from
master
?Yes
Are you using the demo app or your own custom app?
Yes, both
If custom app, can you reproduce the issue using our demo app?
Yes
What browser and OS are you using?
Mac OS 10.15.6 and Chrome.
For embedded devices (smart TVs, etc.), what model and firmware version are you using?
n/a
What are the manifest and license server URIs?
manifest (not encrypted)
"https://lbs-usp-dash-live.cmore.se/group05/debug/live.isml/.mpd?t=2020-11-12T12%3A30%3A00.000-2020-11-12T12%3A45%3A00.000"
What did you do?
I start playing it in your demo player and in my own player respectively. Hence, we have jumpLargeGaps = true
What did you expect to happen?
I expect the stream to start playing in the demo player, since other streams we have autoplay in the very same player. If we press play the stream starts. In my own player, I notice that the "canplaythrough" event, is not dispatched, and we use this to enable video controls. So our own player is not possible to start.
What actually happened?
In the demo player, the stream had to be manually started. In my own player, the controls are never visible. If there is another event from shaka to indicate that the player is ready, I am happy to change canplaythrough to that event, to solve this issue.
The text was updated successfully, but these errors were encountered: