Video keeps playing with tablet-like power button |
|||||||||
Issue descriptionChrome Version: 57.0.2987.54 (Official Build) beta (64-bit) OS: Chrome What steps will reproduce the problem? (1) Play YouTube video on convertible device (2) Press power button What is the expected result? Screen is off, video is paused What happens instead? Screen is off, video keeps playing I think it would be preferable to at least mute the audio. @warx/derat what do you think?
,
Feb 27 2017
The only other quick-fix option I can see is actually putting the device in standby, which then makes waking take longer. Programmatically pausing a YouTube video seems to work. Could we auto-pause videos/audio (perhaps with a whitelist of safe sites or blacklist of unsafe sites) and then mute audio as well for sites we can't pause (use Flash, would break the site, etc)? That way we both try to do the right thing (pause the content) but also avoid having audio playing. I can send a couple proposals to UI Review if you're comfortable with them. Options seem to be: 1) Do nothing -- treat like lock screen 2) Mute audio 3) Mute audio + try to pause sites -- risk breaking some + inconsistent across sites 4) Hibernate immediately instead of after delay
,
Feb 27 2017
In case it was unclear, I think that automatically pausing on focus/blur or using the Page Visibility API requires involvement from YouTube et al -- it's not something we can do from the Chrome OS side. So the options are: 1) Do nothing 2) Mute audio 3) Suspend immediately (The word "hibernate" refers to suspending to disk, which we don't do. See https://en.wikipedia.org/wiki/Hibernation_(computing) .)
,
Feb 27 2017
As you mentioned previously, I don't think we want websites to pause media using the Page Visibility API since many use cases involve it still running in the background. So there's no way for Chrome to go through open tabs and pause all <audio>/<video>?
,
Feb 27 2017
Not without breaking all sites that don't expect their audio/video elements to be paused without them having asked for it, I think. (Adding some components to get confirmation from people who understand this better.)
,
Feb 27 2017
Hmm, that didn't auto-cc anyone. I'm not sure who leads <audio>/<video>, but we should ask them. :-P
,
Feb 27 2017
Right, but YouTube handles it fine. I'd imagine that just special-casing a few top video/music sites that we know handle it well will cover a good portion of cases. Regardless, I'll run the options past UI Review and mention that we're also exploring pausing content. I'll see if we can find someone from Chrome media to help.
,
Feb 27 2017
The desktop YouTube web site doesn't handle this at all, at least on the kevin device where I just tested this. Video keeps playing when I lock the screen. Are you talking about mobile YouTube web? Like I said before, I suspect that mobile YT (and Vimeo) have that behavior because they listen for the page losing the focus. They wouldn't want to update their desktop site to have similar behavior because it would break a bunch of use cases.
,
Feb 28 2017
Sorry, to clarify if I open dev tools and run $("video").pause() on Youtube, the video pauses and the controls correctly update. As the OS/browser it seems like we could do that automatically when the user locks their device.
,
Feb 28 2017
Interesting. Can you loop in someone from the <video> side, and someone else from YouTube, to get their thoughts?
,
May 11 2017
,
May 11 2017
,
May 18 2017
,
May 31 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/67a6d3fc1811bf403d56f59cf4099e3f88b68063 commit 67a6d3fc1811bf403d56f59cf4099e3f88b68063 Author: warx <warx@chromium.org> Date: Wed May 31 21:00:21 2017 cros: Suspend media sessions with display off trigger by tablet power button Changes: Convertible/tablet device's side power button is described as tablet power button. It will set display forced-off or forced-on just like android phone. This CL is going to add extra functionality to tablet power button, which is suspending media sessions when display is forced-off by tablet power button. BUG= 694384 TEST=tested on kevin, with two youtube browser tabs and one youtube arc++ app. arc++ app's audio is not controlled by the tablet power button. (1) browser tabs audio playing, pressing power button to set display off, audio will pause. (2) browser tabs audio pausing, pressing power button to set display off will still pause audio, pressing again will keep audio paused. Also added test coverage in TabletPowerButtonControllerTest. Review-Url: https://codereview.chromium.org/2821303004 Cr-Commit-Position: refs/heads/master@{#476018} [modify] https://crrev.com/67a6d3fc1811bf403d56f59cf4099e3f88b68063/ash/shell_delegate.h [modify] https://crrev.com/67a6d3fc1811bf403d56f59cf4099e3f88b68063/ash/system/power/tablet_power_button_controller.cc [modify] https://crrev.com/67a6d3fc1811bf403d56f59cf4099e3f88b68063/ash/system/power/tablet_power_button_controller_unittest.cc [modify] https://crrev.com/67a6d3fc1811bf403d56f59cf4099e3f88b68063/ash/test/test_shell_delegate.cc [modify] https://crrev.com/67a6d3fc1811bf403d56f59cf4099e3f88b68063/ash/test/test_shell_delegate.h [modify] https://crrev.com/67a6d3fc1811bf403d56f59cf4099e3f88b68063/chrome/browser/ui/ash/chrome_shell_delegate.cc [modify] https://crrev.com/67a6d3fc1811bf403d56f59cf4099e3f88b68063/chrome/browser/ui/ash/chrome_shell_delegate.h [modify] https://crrev.com/67a6d3fc1811bf403d56f59cf4099e3f88b68063/content/browser/media/session/media_session_browsertest.cc [modify] https://crrev.com/67a6d3fc1811bf403d56f59cf4099e3f88b68063/content/browser/media/session/media_session_controllers_manager.cc
,
Jun 5 2017
,
Aug 8 2017
Is this implemented now?
,
Aug 8 2017
yes for chrome browser media
,
Aug 8 2017
CL is landed in 61.0.3117.0
,
Aug 10 2017
Verified in Chrome OS 9827.0.0, 62.0.3176.0.
,
Oct 21
Issue 716066 has been merged into this issue. |
|||||||||
►
Sign in to add a comment |
|||||||||
Comment 1 by derat@chromium.org
, Feb 21 2017