-
Notifications
You must be signed in to change notification settings - Fork 7.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
User plays PIP (picture-in-picture) mode and captions appear in the middle of the screen #7333
Comments
👋 Thanks for opening your first issue here! 👋 If you're reporting a 🐞 bug, please make sure you include steps to reproduce it. We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can. |
The HLS playback, display of in-manifest captions and PIP implementation are all native to Safari, not under Video.js's control. You'll see the same behaviour with a simple video element, and also on desktop Safari. I think this is new - I don't recall seeing it before - but It's likely an intentional "feature" as the text on the PIP video is so small. |
you use videojs-hlsjs-plugin from streamroot, dont forget to write it in "plugins" information |
@mister-ben is there a possible workaround? For example, listening for the enterpip / exitpip and disabling the captions on the video.js side (and while in pip mode letting safari still display them in the player)? |
Aside from other workarounds that could potentially be used: I wonder if there is either CSS styling or configuration that we can add to at least cause the subtitling to be displayed over the video placeholder (the black area that indicates that the video is in PIP mode). Is that possible? |
We did have an issue related to captions last year that we worked around with via #6673. @dylanjha that won't help because as far as I can tell from the example, there's just the one subtitle track, Video.js isn't duplicating tracks, so, turning them off will turn it off in the PiP as well. |
So the above test was experienced on my iPhone Xs, iOS 14.6. I also cracked open my iPad Air (3rd generation) running iOS 14.7 and experienced the same situation (see below screenshot): Also (FWIW) I also checked out the fix sample on #6673 and am seeing the same behavior: |
huh, weird, I can reproduce it now but wasn't able to reproduce it earlier. |
I guess one good thing is that it doesn't stay up on the screen when you exit safari. |
I think we should open a bug on webkit for this. If I resize the PiP to be smaller, I can see the captions on screen hiding because the container isn't sized larger than the video itself. |
Hey @gkatsev, https://erikpena.github.io/videojs-pip-captions-issue/workaround-overflow.html I think we'll introduce this as anything else requires styling the shadow dom and that can break the iOS PIP functionality too easily. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Description
This appears to be an issue with Video.js specifically where the captions render in the middle of the page during Picture-in-picture mode. Instead of on the PIP player.
When @erikpena created a Vanilla instance of Video.js with the same video, is getting the same issue. Here is a static page for you to see the implementation—
https://github.com/erikpena/erikpena.github.io/blob/main/videojs-pip-captions-issue/index.html
You can actually test it directly with your iOS device (Safari Mobile) by going to this page—
https://erikpena.github.io/videojs-pip-captions-issue/
Here's a screen shot of the bug:
https://user-images.githubusercontent.com/2187347/126220588-9e2464f0-6acb-4b4d-929b-97efe67e5dee.png
Steps to reproduce
Explain in detail the exact steps necessary to reproduce the issue.
https://erikpena.github.io/videojs-pip-captions-issue/
Results
Expected
User plays PIP (picture-in-picture) mode and captions appear in the small player
Actual
Captions show in the middle of the screen.
Error output
Here's a screen shot of the bug:
https://user-images.githubusercontent.com/2187347/126220588-9e2464f0-6acb-4b4d-929b-97efe67e5dee.png
Additional Information
Please include any additional information necessary here. Including the following:
versions
videojs
what version of videojs does this occur with?
[email protected]
browsers
what browser are affected?: Mobile Safari
OSes
what platforms (operating systems and devices) are affected? iOS
plugins
are any videojs plugins being used on the page? If so, please list them below.
videojs-mux-kit
The text was updated successfully, but these errors were encountered: