-
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
Media time not updated in Cast Receiver #2314
Comments
Hm, you're right. When we added the UI, it broke a lot of stuff in the Chromecast receiver. This must be a problem we missed. |
Actually, on further inspection, it looks like this has been fixed already. I'm not entirely sure what commit is responsible, but trying out a version of the cast receiver synched up to master, this problem is no longer present. |
Until we can identify the change and cherry pick it to the v2.5.x release branch, this issue should remain open. |
It's difficult to |
In these tests, I deployed a copy of both sender and receiver to appspot, with the receiver app ID set to load from this particular appspot URL. I had the expiration time turned down to 1s to make sure I wasn't getting the wrong version due to caching, and I further modified the receiver app with a high-z-index div showing the deployed version number. So I'm sure that I was testing what I intended to test. :-) Release tags:
Corresponding master branch tags:
|
So it seems that we broke something between v2.5.0 and v2.5.1, both in the master branch and the release branch. We then broke something else (no receiver UI at all) in the master branch between v2.5.5-master and v2.5.6-master. We fixed that second bug (no receiver UI) between v2.5.7-master and now, and the first bug (this issue) was fixed between v2.5.5-master and now. That's 160 commits, about 82 of which haven't already been cherry-picked to the master branch. Of those 82, only 27 affect the folders that could influence the cast receiver UI (lib/cast/, demo/cast_receiver/, and ui/). Here are the shell commands I used to figure out which commits are interesting: git log v2.5.5-master..master --oneline > master.log
git log v2.5.5..v2.5.7 --oneline > release.log
wc -l master.log
cat master.log | while read sha msg; do
grep -q "$msg" release.log || echo "$sha $msg"
done > maybe.log
wc -l maybe.log
cat maybe.log | while read sha msg; do
# If the git log for those folders starts with the same commit hash,
# then that commit affected those folders.
git log --oneline -n 1 "$sha" -- lib/cast/ demo/cast_receiver/ ui/ \
| grep -q "^$sha" && echo "$sha $msg"
done > affecting-cast.log
wc -l affecting-cast.log |
The second bug (missing receiver UI) was fixed this week in the trio of commits: a43f52c 08a36e8 a6b159f. With those cherry-picked and merge conflicts fixed manually, these are the results: v2.5.6-master + cherry-picks - working as expected So the first bug (this issue) was fixed in master between v2.5.5-master and v2.5.6-master. Applying the same shell scripts above to that range, I wind up with a list of 12 commits that might have fixed it, 11 of which are about ads: 0f6e973 Play/pause the current ad on video container click. |
I was starting to think 1e746e6 ("Keep a mapping of compiled to extern player method names in cast proxy") would turn out to be the fix, since it was the only non-ad-related commit in the list. But when I tested just the commits that fixed the second bug (no receiver UI at all), I found that those alone were enough to fix this issue when applied to v2.5.5-master and v2.5.7 (release).
This seems to be because of this code in the UI: this.timeAndSeekRangeTimer_ = new shaka.util.Timer(() => {
// Suppress timer-based updates if the controls are hidden.
if (this.isOpaque_()) {
this.updateTimeAndSeekRange_();
}
}); These recent changes made the UI controls always opaque in our cast receiver, so the time will always be updated. This seems to be a bit broken, though. With these new changes, the receiver UI is actually hidden at the app level, without the knowledge of the library. This defeats the purpose of only updating the UI when it's shown. Every update causes the browser to recalculate the layout, which can be expensive on low-powered devices like the Chromecast or battery powered mobile devices. Also, the "fix" is actually the new |
We will revert the recent changes, including the noFade option, and make new changes to the hide/show logic in the UI that will fix this issue. We will then cherry-pick them to the release branch to be part of v2.5.8. |
This reverts commits: - a43f52c "Add "noFade" configuration to UI." - 08a36e8 "Add transparency transition cast app controls." - a6b159f "Keep controls visible while casting." Moving the showing/hiding up to the receiver app level can waste CPU on low-end devices, and puts undue configuration burden on the receiver app. We will follow up with a more direct fix for #2314, as well as a "fadeDelay" option to allow the cast receiver UI to delay fading for a few seconds. Related to issue #2314 Change-Id: I0028803432ad028930002b29dd7b94c7d9a0ec56
- "Override CSS" could be set and unset from multiple places, such that the calls from the overflow menus were easily invalidated by mouse movements. This flag is now gone. - "Show on mouse over" controls were implemented using mouseenter and mouseleave events on each element. These listeners are now gone. - Casting state, used to compute if the controls are opaque, is now based on the same "casting" attribute used by the CSS to force them to be opaque. - Opacity decisions are now made by a single method, which accounts for video pause state, the hover state of "show on mouse over" controls such as the overflow menus, and the recency of mouse movements (represented by a single flag maintained by the existing mouseover timers). - An opacity decision is now triggered on play state changes, so the UI content should always be correct when we pause a cast receiver. - An opacity decision is now triggered on keyboard navigation changes, so the UI should always be opaque when using keyboard navigation. Closes #2314 Backported to v2.5.x Change-Id: I318dff95a74b714d8daaaadb8fa2ff6a4c41704f
The fix has been merged and cherry-picked to the release branch. It will be part of v2.5.8. I don't have a release date yet, but you can always deploy code from the stable |
Thanks a lot for fixing this! Best regards, |
Happy to help! We're working on releasing v2.5.8, which hopefully will be out this week. |
Have you read the FAQ and checked for duplicate open issues?
Yes
What version of Shaka Player are you using?
The version from the Demo app page: https://shaka-player-demo.appspot.com/ (v2.5.7)
Can you reproduce the issue with our latest release version?
v2.5.7 is the latest release version
Can you reproduce the issue with the latest code from
master
?Yes
Are you using the demo app or your own custom app?
Demo app
If custom app, can you reproduce the issue using our demo app?
N/A
What browser and OS are you using?
79.0.3945.88 (Build officiel) (64 bits) (cohort: 79_Win_88)
Windows 10 OS Version 1909 (Build 18363.535)
NVIDIA SHIELD as Cast Device
For embedded devices (smart TVs, etc.), what model and firmware version are you using?
N/A
What are the manifest and license server URIs?
I use the Demo app videos (Big Buck Bunny, Angel One, Sintel)
What did you do?
What did you expect to happen?
Media time UI on the Receiver should grow like it does on the Sender
What actually happened?
Media time UI is displayed on the Receiver but stays at "0:00"
The text was updated successfully, but these errors were encountered: