Implement subtitles settings in PiP window
Categories
(Toolkit :: Picture-in-Picture, enhancement, P2)
Tracking
()
Tracking | Status | |
---|---|---|
firefox103 | --- | fixed |
People
(Reporter: asafko, Assigned: niklas)
References
()
Details
(Whiteboard: [fidefe-MR1-2022])
Attachments
(8 files)
User Story 1
As a user who wants to experience fewer interruptions when using PiP, I would like to be able to control the display of subtitles after I turned them on in the in-page video.
Acceptance Criteria
-
The entry point to turn subtitles on and off is displayed ONLY if the subs are turned on in the in-page video (this is due to a technical limitation - launching subtitles from the PiP window presents various difficulties - what track should we choose if multiple are available, etc).
-
I am able to turn subtitles off from the PiP window.
-
I am able to turn subtitles back on from the PiP window (unless I turned them off in the in-page video)
User Story 2
As a user who wants to customize their font size in PiP, I want to be able to choose between "small", "medium", and "large" font size options.
Acceptance Criteria
-
I am able to choose PiP subtitles font size between "small", "medium", and "large" options.
-
My choice in one PiP window affects all opened PiP windows.
-
My preference defaults to medium font size.
-
Both size and enable/disable preference is saved and applied to all the PiP windows opened after I’ve made a change.
Updated•2 years ago
|
Description
Please see the user stories and their acceptance criteria above.
How do we test this?
You can access the prototype via the link below and launch the proposed UI by clicking on the CC (captions) button in it.
When will this ship? Targeting 102
Design documents (e.g. Product Requirements Document, UI spec):
Prototype
Engineering lead: Molly Howell
Product manager: Ania Mininkova
After a discussion with Brent and some research on the subtitles/captions terms for international audiences, we settled on using "Subtitles" as a title for the on/off menu.
We also need to replace the cc button with a language-agnostic one, as the CC abbreviation is not used outside of the English-speaking world. I'm not sure why Youtube is using such an EN-centric icon, but Netflix, Prime Video, and most other large video hosters I checked use a message-like icon.
Some notes/moments to take care of on the a11y front after the review with Asa:
Keyboard navigability
Let's annotate our final UX file to make sure we capture these requirements:
- tab navigates between the video controls,
- space activates the control, e.g., opens the subtitles settings pop-up, changes the state of the switch in the pop-up, and selects the font size.
- up/down arrows navigate up and down the menu items in the pop-up.
Pop-up behavior on window resizing
Expected behavior:
- Remove the subtitles button if PiP window dimensions < popover dimensions (if we can't fit the font size popover into the window without creating a scroll).
- If this is impossible, then remove the subtitles button at the same time when we remove the subtitles after they reach the min size.
- Allow for the scroll in the subtitles settings pop-up.
Font size labels
- Window resizing might cause the "small" label to go below our smallest acceptable font size. UPD: this won't happen since we remove subs after they get smaller than 14 px.
- Let's consider making the "small-medium-large" labels the same size because of the above. This will also help us avoid a "longer" scroll inside the pop-up on smaller PiP window sizes.
Niklas, Jihwan, and I are trying to decide whether we should go for labels of the representative size (and ignore situations when medium = large on certain PiP windows etc), and I wondered if you might be able to post a few screenshots from your prototype where font size in the dialog was representative of the size of the subtitles in the window?
The same-sized labels look meh in our opinion and are not as helpful to users (screen attached).
Asa, just wanted to double-check if we're not missing any a11y color contrast requirements, and are good to go on this front too.
Comment 9•2 years ago
|
||
(In reply to amininkova from comment #8)
Asa, just wanted to double-check if we're not missing any a11y color contrast requirements, and are good to go on this front too.
I think we're good to go. Text contrast is great.
Assignee | ||
Comment 10•2 years ago
|
||
small, medium, large font sizes are all different
Assignee | ||
Comment 11•2 years ago
|
||
small and medium font sizes are the same
Assignee | ||
Comment 12•2 years ago
|
||
medium and large font sizes are the same
Reporter | ||
Comment 13•2 years ago
•
|
||
Please disregard the screenshot above, we eventually settled on the same-sized font for all three options, small, medium, large.
Reporter | ||
Comment 14•2 years ago
|
||
Updated the prototype with 18-24-32 font sizes
Comment 15•2 years ago
|
||
(In reply to amininkova from comment #13)
Created attachment 9273165 [details]
Screen Shot 2022-04-20 at 6.50.11 PM.pngNiklas, thank you so much.
Both Jihwan and I felt the "threshold" cases looked fairly confusing to the users.
Do you have any concerns about using static font size for small (14), medium (24), large (32) labels that don't change with PiP window resizing?From the UX perspective, it feels like it's enough to give users visually different options without them being representative of the actual font size they will see.
If the static font size works, small will be 18pt fyi :)
Assignee | ||
Comment 16•2 years ago
|
||
Reporter | ||
Comment 17•2 years ago
|
||
Reporter | ||
Comment 18•2 years ago
|
||
Comment on attachment 9274359 [details]
Final icon
Attaching final icon for subtitles/captions.
Updated•2 years ago
|
Updated•2 years ago
|
Updated•2 years ago
|
Comment 19•2 years ago
|
||
Pushed by nbaumgardner@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/c5ce4a2b9ddb Subtitle font size settings in PiP window. r=pip-reviewers,desktop-theme-reviewers,mhowell,sfoster,fluent-reviewers
Comment 20•2 years ago
|
||
Backed out for causing for causing mochitest failures on browser_fontSize_change.js. CLOSED TREE
Backout link
Push with failures
Link to failure log
Failure line :
TEST-UNEXPECTED-FAIL | toolkit/components/pictureinpicture/tests/browser_fontSize_change.js | The large font size is .09 of the PiP window height - 7.5 <= 1 - JS frame :: chrome://mochitests/content/browser/toolkit/components/pictureinpicture/tests/browser_fontSize_change.js :: checkFontSize :: line 16
Comment 21•2 years ago
|
||
Pushed by nbaumgardner@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/476aa6b6dadc Subtitle font size settings in PiP window. r=pip-reviewers,desktop-theme-reviewers,mhowell,sfoster,fluent-reviewers
Comment 22•2 years ago
|
||
bugherder |
Assignee | ||
Updated•2 years ago
|
Comment 23•2 years ago
|
||
Comment 24•2 years ago
|
||
Hi work with this: https://html5multimedia.com/code/ch8/video-webvtt-subtitles-playr.html
I tried some example files on YouTube but the button to activate the player doesn't even appear: https://www.youtube.com/watch?v=1jUJAtEiJ9E
Also this: https://www.youtube.com/watch?v=alymCBqAUxY
Reporter | ||
Comment 25•2 years ago
|
||
Yes, that's correct.
Comment 26•2 years ago
•
|
||
(In reply to fabrixx2 from comment #24)
Hi work with this: https://html5multimedia.com/code/ch8/video-webvtt-subtitles-playr.html
I tried some example files on YouTube but the button to activate the player doesn't even appear: https://www.youtube.com/watch?v=1jUJAtEiJ9E
Also this: https://www.youtube.com/watch?v=alymCBqAUxY
For the YouTube videos that you linked, the PiP toggle does not appear because the video is less than 45 seconds (this is a default value set to show/hide the toggle). You can enable the player by right clicking on the video (for YouTube, press it twice) and selecting the Picture-in-Picture option on the context menu. I also suggest that you file a new bug in the future so that we can easily track any issues. And if it turns out to not be an issue at all, we can always close it.
Description
•