Closed Bug 1602841 Opened 2 months ago Closed 1 month ago

Picture-in-Picture - Pass keyboard commands from PiP window to origin window

Categories

(Toolkit :: Video/Audio Controls, enhancement)

Desktop
Unspecified
enhancement
Not set

Tracking

()

RESOLVED FIXED
mozilla74
Tracking Status
firefox74 + fixed

People

(Reporter: adamopenweb, Assigned: gl)

References

(Blocks 1 open bug)

Details

Attachments

(1 file, 1 obsolete file)

We received feedback that users would like to be able to use keyboard controls in the PIP window to control the video, for example scrubbing back and forth.

We know that implementing a full scrubber UI is going to take a lot of effort to build.

If this is relatively straight-forward to do, it would provide a decent workaround and quickly.

Assignee: nobody → gl
Status: NEW → ASSIGNED

ni?ing MattN for the question I asked in https://phabricator.services.mozilla.com/D58273#1805826.

Flags: needinfo?(MattN+bmo)
Flags: needinfo?(MattN+bmo)

Needinfoing @Masayuki and @m_kato on the question asked in https://phabricator.services.mozilla.com/D58273#1812291

Flags: needinfo?(masayuki)
Flags: needinfo?(m_kato)
Flags: needinfo?(masayuki)

This implements keystroke handling behind a pref "media.videocontrols.picture-in-picture.keyboard-controls.enabled".
This patch handles all the keystrokes for video controls, which include play, pause,
volume decrease and increase, mute, unmute, seek forward and backward for 15 seconds
or by 10% of the max video duration, seek to beginning and seek to end.
This reuses the key handler logic from https://searchfox.org/mozilla-central/rev/cfd1cc461f1efe0d66c2fdc17c024a203d5a2fd8/toolkit/content/widgets/videocontrols.js#1687-1810.

Attachment #9117824 - Attachment is obsolete: true
Flags: needinfo?(m_kato)
Pushed by mconley@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/82d1507999fd
Implement keystroke handling for PiP window for video controls. r=mconley
Status: ASSIGNED → RESOLVED
Closed: 1 month ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla74

Adam, can I have you craft the release note? I would be happy to review.

Flags: needinfo?(gl) → needinfo?(astevenson)

We have decided to keep this feature in Nightly for now, as we found breakage with Netflix when using keys. So we shouldn't need a release note yet.

Flags: needinfo?(astevenson)

(In reply to Adam Stevenson [:adamopenweb] from comment #9)

We have decided to keep this feature in Nightly for now, as we found breakage with Netflix when using keys. So we shouldn't need a release note yet.

We need a release note for Nightly

Space - Toggle Play/Pause
Down Arrow - Volume Decrease
Up Arrow - Volume Increase
Accel + Down Arrow - Mute
Accel + Up Arrow - Unmute
Left Arrow - Seek back 15 seconds
Accel + Left Arrow - Seek back 10%
Right Arrow - Seek forward 15 seconds
Accel + Right Arrow - Seek forward 10%
Home - Seek to beginning
End - Seek to end

Accel is CtrlKey or MetaKey for macOS

Flags: qe-verify+
You need to log in before you can comment on or make changes to this bug.