onPollWindow_: use startTime when currentTime is not ready yet (fixes #2848)#2849
Conversation
|
We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for all the commit author(s) or Co-authors. If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google. ℹ️ Googlers: Go here for more info. |
d9fc7d7 to
ebdea3e
Compare
|
@googlebot I fixed it. |
|
@JakubRimal, thanks! Is there a particular issue associated with this fix? Do all the tests still pass? |
|
Doh, it's there in the title. I overlooked it! |
|
|
Those test failures are concerning because we don't see the same failures. I would be interested to find out what is different about your environment so that we could improve our tests. Can you please file a new issue about that so that we can discuss? My only concern with your PR is that I would prefer to have a regression test or conformance rule (see |
|
All tests passed! |
joeyparrish
left a comment
There was a problem hiding this comment.
I will go ahead and submit this, then follow up with a regression test myself. I think it can be done fairly easily in the Playhead unit tests. Thanks!
Yes, please see #2865
Thank you very much, I was going to write you that I am afraid that I am not familiar with tests enough to be able to write it for this scenario so I am happy to hear that you'll do it and that it could be "fairly easily". 🙂 |
PR #2849 landed without a regression test. The test is a bit tricky, since it requires us to simulate a very odd set of circumstances which nonetheless occur on smart TVs. The video must be: - in a HAVE_METADATA state - unpaused - with currentTime set to 0 - with the initial seek ignored by the platform Furthermore, we want to suppress the seek retry behavior of the VideoWrapper class, since that makes it more difficult to detect the seek-range-related seeks in the original bug. This involves access to private members, which means we need to suppress access controls in the compiler during part of the test. Issue #2848 Issue #2748 PR #2849 Change-Id: I0427d4b6b4161cd2a147a5c297dfaf9b424c92b7
|
The regression test was added in d20b9f0 if you are interested to see how it works. "Easy" is relative, I suppose. It required us to emulate a very specific scenario and then suppress some other internal mechanisms to more easily measure the effect of the bug. |
…ject#2849) Up until we load some content and seek to the start time, we should avoid applying the seek range. Otherwise, for a slow-loading live stream, we could end up seeking to the beginning of the seek range while waiting to begin playback at the end of the range. This doesn't seem to happen on desktops, but on some smart TVs, setting video.currentTime will not be immediately reflected, leaving a race condition that only VideoWrapper will properly resolve. Closes shaka-project#2848 Closes shaka-project#2748
PR shaka-project#2849 landed without a regression test. The test is a bit tricky, since it requires us to simulate a very odd set of circumstances which nonetheless occur on smart TVs. The video must be: - in a HAVE_METADATA state - unpaused - with currentTime set to 0 - with the initial seek ignored by the platform Furthermore, we want to suppress the seek retry behavior of the VideoWrapper class, since that makes it more difficult to detect the seek-range-related seeks in the original bug. This involves access to private members, which means we need to suppress access controls in the compiler during part of the test. Issue shaka-project#2848 Issue shaka-project#2748 PR shaka-project#2849 Change-Id: I0427d4b6b4161cd2a147a5c297dfaf9b424c92b7
…ject#2849) Up until we load some content and seek to the start time, we should avoid applying the seek range. Otherwise, for a slow-loading live stream, we could end up seeking to the beginning of the seek range while waiting to begin playback at the end of the range. This doesn't seem to happen on desktops, but on some smart TVs, setting video.currentTime will not be immediately reflected, leaving a race condition that only VideoWrapper will properly resolve. Closes shaka-project#2848 Closes shaka-project#2748
PR shaka-project#2849 landed without a regression test. The test is a bit tricky, since it requires us to simulate a very odd set of circumstances which nonetheless occur on smart TVs. The video must be: - in a HAVE_METADATA state - unpaused - with currentTime set to 0 - with the initial seek ignored by the platform Furthermore, we want to suppress the seek retry behavior of the VideoWrapper class, since that makes it more difficult to detect the seek-range-related seeks in the original bug. This involves access to private members, which means we need to suppress access controls in the compiler during part of the test. Issue shaka-project#2848 Issue shaka-project#2748 PR shaka-project#2849 Change-Id: I0427d4b6b4161cd2a147a5c297dfaf9b424c92b7
Up until we load some content and seek to the start time, we should avoid applying the seek range. Otherwise, for a slow-loading live stream, we could end up seeking to the beginning of the seek range while waiting to begin playback at the end of the range. This doesn't seem to happen on desktops, but on some smart TVs, setting video.currentTime will not be immediately reflected, leaving a race condition that only VideoWrapper will properly resolve. Closes #2848 Closes #2748
PR #2849 landed without a regression test. The test is a bit tricky, since it requires us to simulate a very odd set of circumstances which nonetheless occur on smart TVs. The video must be: - in a HAVE_METADATA state - unpaused - with currentTime set to 0 - with the initial seek ignored by the platform Furthermore, we want to suppress the seek retry behavior of the VideoWrapper class, since that makes it more difficult to detect the seek-range-related seeks in the original bug. This involves access to private members, which means we need to suppress access controls in the compiler during part of the test. Issue #2848 Issue #2748 PR #2849 Change-Id: I0427d4b6b4161cd2a147a5c297dfaf9b424c92b7
Up until we load some content and seek to the start time, we should avoid applying the seek range. Otherwise, for a slow-loading live stream, we could end up seeking to the beginning of the seek range while waiting to begin playback at the end of the range. This doesn't seem to happen on desktops, but on some smart TVs, setting video.currentTime will not be immediately reflected, leaving a race condition that only VideoWrapper will properly resolve. Closes #2848 Closes #2748 Backported to v2.5.x Change-Id: Id2259278ba99dfd99b17a93a94504ed0a1400238
PR #2849 landed without a regression test. The test is a bit tricky, since it requires us to simulate a very odd set of circumstances which nonetheless occur on smart TVs. The video must be: - in a HAVE_METADATA state - unpaused - with currentTime set to 0 - with the initial seek ignored by the platform Furthermore, we want to suppress the seek retry behavior of the VideoWrapper class, since that makes it more difficult to detect the seek-range-related seeks in the original bug. This involves access to private members, which means we need to suppress access controls in the compiler during part of the test. Issue #2848 Issue #2748 PR #2849 Backported to v2.5.x Change-Id: I0427d4b6b4161cd2a147a5c297dfaf9b424c92b7
There is a race condition: it could happen that
onPollWindow_checks falling outside the availability window beforevideoElementreturns thecurrentTimecorrectly (it returns 0 instead) so the following calculation leads to incorrect jump forward. Now it will usethis.videoWrapper_.getTime()which returnsstartTimein that case instead.