Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upNotify users when autoplay has been blocked and provide option to allow it #8751
Conversation
|
Everything looks really good, one question I have though is regarding the wording used in the notification: "Media autoplay on has been blocked. Do you want to allow it?" Contrast that with requests for full screen, location, or media capture: "Allow to use fullscreen mode?" I think we should adopt the same pattern: "Allow to autoplay media?" |
|
fixed in b8fc59c |
|
Testing on YT, video kept loading until I decided what to do with notification. Deciding to disable autoplay, loading persists and pause button is shown rather than play button. Seems like video is not fully loaded and I had to click twice on the pause button to get it working. I felt confused by that. Regarding UX the best scenario I can think of is having video stopped (play indicator visible) with video placeholder showing instead of forever loading until user decide what to do with notification. Those are just my thoughts and my guess is that the above is beyond the scope of this PR and it's a great thing to have as-is, so LGTM |
…ow it Display "Block autoplay" in bravey shield Fix #8738 Auditors: @bbondy, @bsclifton, @jonathansampson Test Plan: Covered by automatic test
|
ok, done |
| */ | ||
| autoplayBlocked: function (location, tabId) { | ||
| AppDispatcher.dispatch({ | ||
| actionType: appConstants.APP_AUTOPLAY_BLOCKED, |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
darkdh
May 9, 2017
Author
Member
It is for displaying origin for message box
https://github.com/brave/browser-laptop/pull/8751/files#diff-d4f09c262fdb2f86d8f7407afb926c8eR19
This comment has been minimized.
This comment has been minimized.
bbondy
May 9, 2017
Member
I just mean that the browser process already has this info so it is not needed to send from the window renderer. Pls do for a follow up but not high priority.
This comment has been minimized.
This comment has been minimized.
bbondy
May 9, 2017
Member
Basically it just leaves the chance that someone will use the API wrongly at some point, so better not to include it.
This comment has been minimized.
This comment has been minimized.
|
++ |
|
Comments left; changes look good |
| if (tabId) { | ||
| const tab = webContents.fromTabID(tabId) | ||
| if (tab && !tab.isDestroyed()) { | ||
| return tab.reload() |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
| autoplay: { | ||
| enabled: false | ||
| noAutoplay: { | ||
| enabled: true |
This comment has been minimized.
This comment has been minimized.
bsclifton
May 9, 2017
Member
Per our discussions, we want to default this to false, right? So that content isn't blocked
cc: @bradleyrichter
This comment has been minimized.
This comment has been minimized.
darkdh
May 9, 2017
Author
Member
If the default is false, the notification won't popup in most of the cases because https://github.com/brave/browser-laptop/pull/8751/files#diff-d4f09c262fdb2f86d8f7407afb926c8eR21
The only case it will show up is users toggle global autoplay to block and without site setting of autoplay to the website
The setting is similar to our default fullscreen setting.
This comment has been minimized.
This comment has been minimized.
bbondy
May 9, 2017
Member
I was under the understanding we were defaulting to on with notification bar.
This comment has been minimized.
This comment has been minimized.
Auditors: @bbondy, @bsclifton
Auditors: @bbondy, @bsclifton
Auditors: @bbondy, @bsclifton
darkdh commentedMay 8, 2017
•
edited
Display "Block autoplay" in bravey shield
Fix #8738
Address #8739
Auditors: @bbondy, @bsclifton, @jonathansampson
Test Plan:
Covered by automatic test
git rebase -ito squash commits (if needed).