Closed
Bug 1430012
Opened 7 years ago
Closed 7 years ago
Tab should not have the autoplay permission after restoring from session restore
Categories
(Core :: DOM: Events, defect, P2)
Core
DOM: Events
Tracking
()
RESOLVED
FIXED
People
(Reporter: alwu, Unassigned)
References
Details
(Whiteboard: [block-ap-v1])
STR.
1. set pref "media.autoplay.enabled=false" and "media.autoplay.enabled.user-gestures-needed=true".
2. goto https://alastor0325.github.io/htmltests/autoplay_tests/autoplay_test2.html
3. click the video, then video starts playing
4. close the tab
5. restore tab by keyboard shortcut "command + shift + T"
Expect.
6. video from restored tab should not start playing
Actual.
6. video from restored tab starts playing
---
We listen "key-up" event to activate the document then it could gain the autoplay permission. If the event is sent to the wrong target, then the thing would go wrong.
After some investigation, the root cause should be that the "key-up" event is sent to the restored tab, then causes its document activation.
Reporter | ||
Comment 1•7 years ago
|
||
Hi, Stone,
Could you help with this issue or NI someone who is familiar with this part?
Thanks!
Flags: needinfo?(sshih)
Reporter | ||
Comment 2•7 years ago
|
||
FYI, if you restore the tab from "History" > "Recently Closed Tabs", then the issue won't happen.
Updated•7 years ago
|
Priority: -- → P2
Comment 3•7 years ago
|
||
When investigating bug 1427984, I found that most browsers (Chrome, Firefox, Safari) fire keyup at the switched tab when the key sequence changes the current tab. I don't think this is a problem. For this use case, maybe we could handle the autoplay permission when keydown like other functionalities (e.g. ALT+N to switch tabs, ALT+F4, CTRL+SHIFT+K to open inspector). Or we could ask UX for some suggestions.
Flags: needinfo?(sshih)
Updated•7 years ago
|
Whiteboard: block-ap-v1 → [block-ap-v1]
Comment 4•7 years ago
|
||
I learned from Alastor that keydown as suggested in comment 3 works well for him. Anything else we need to do in this bug to support block-autoplay feature?
Reporter | ||
Updated•7 years ago
|
Assignee: alastor0325 → nobody
Comment 6•7 years ago
|
||
We switched to acitvating in keydown in Bug 1456037.
You need to log in
before you can comment on or make changes to this bug.
Description
•