Skip to content
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

Allow for webkit-playsinline #1367

Closed
dcharbonnier opened this issue Jul 24, 2014 · 19 comments
Closed

Allow for webkit-playsinline #1367

dcharbonnier opened this issue Jul 24, 2014 · 19 comments
Labels

Comments

@dcharbonnier
Copy link

There is currently no way to use videojs to play a video inline on iOS devices .

webkit-playsinline
Indicates that a video element should play inline instead of full-screen. Enabled only in a UIWebView with the allowsInlineMediaPlayback property set to YES.
Related Tags : video
Availability : Available in iOS 4.0 and later.

https://developer.apple.com/library/safari/documentation/AppleApplications/Reference/SafariHTMLRef/Articles/Attributes.html#//apple_ref/doc/uid/TP40008058-SW30

Related to #896, #314 copy attributes but don't provide an option.

@mmcc
Copy link
Member

mmcc commented Jul 24, 2014

I'm not sure what you mean by "copy attributes but don't provide an option". If the attribute is persisted when moving the video element (as #314 fixed), it sounds like we're doing everything we can to support this tag from our side.

@dcharbonnier
Copy link
Author

for autoplay you provide option or data-options, not for this attibute, this is just not consistent

@dcharbonnier
Copy link
Author

and does not work with plugin like youtube, youtube plugin remove the video tag, if you have a playlist mixing different technologies, the video tag is not re-created with the correct attributes.

@mmcc
Copy link
Member

mmcc commented Jul 24, 2014

Ok I think we're talking about a few different things here. Would you please give an example of what we don't support regarding autoplay or webkit-playsinline?

Regarding the YouTube plugin, that specifically is an issue you'll have to take up with the maintainer (but I don't think he'll be able to help there because, YouTube).

@mmcc mmcc added question and removed enhancement labels Jul 24, 2014
@dcharbonnier
Copy link
Author

Ok, I'm not clear and there is definitely a problem, let me explain the use case 👍

1/ Consider a html page containing a video tag with webkit-playsinline, and the plugin youtube (youtube plugin is an example and there is no problem with this plugin, the only thing relevant is that the plugin dispose the video attribute)
2/ with javascript play a youtube video.
3/ with javascript play a mp4 video

at step 3 we expect the webkit-playsinline to exist, and you understand why it's not the case, nothing on getAttributeValues to get the value and no option to tell videojs to use this attribute.

@gkatsev
Copy link
Member

gkatsev commented Jul 24, 2014

Does the process you described work if step two didn't exist?

@dcharbonnier
Copy link
Author

@gkatsev, no but the part of code in charge of re-creating the video element is video.js, not videos-youtube, so this is a videojs problem. More over we already have this inconsistency on having no javascript interface for this specific attribute (we have one for autoplay for example).

@mmcc
Copy link
Member

mmcc commented Jul 24, 2014

I don't know how I feel about adding this to the API. It's not in the W3C spec and is entirely iOS-specific, so I think we shouldn't necessarily be explicitly adding this.

That being said, @gkatsev and I just talked about this briefly in IRC and he made the excellent point that we should do a better job of restoring all attributes when re-creating an element. This would allow us to future-proof ourselves from additional namespaced attributes like this for any platform rather than needing to add an API for each one.

@dcharbonnier
Copy link
Author

perfect, let's close this pull request, I will sent a new one, thank you.

@mmcc
Copy link
Member

mmcc commented Jul 24, 2014

Awesome! Thank you so much for the help, @dcharbonnier.

@mmcc
Copy link
Member

mmcc commented Jul 28, 2014

The PR has been merged! Thanks for the help!

@mmcc mmcc closed this as completed Jul 28, 2014
@dcharbonnier
Copy link
Author

it's not and you still have the bug, if someone need that, use my fork

@mmcc
Copy link
Member

mmcc commented Jul 29, 2014

Argh, that's my fault. I saw the El issue get merged and totally misread that.

derp

@mmcc mmcc reopened this Jul 29, 2014
@dcharbonnier
Copy link
Author

yes I had the same impression

@mmcc
Copy link
Member

mmcc commented Jul 29, 2014

Soon :)

@heff
Copy link
Member

heff commented Aug 5, 2014

NOW it's merged in. :)

@heff heff closed this as completed Aug 5, 2014
@dcharbonnier
Copy link
Author

youhou, MERCI !

@rapsody
Copy link

rapsody commented Aug 31, 2015

Has this been added to the latest release v4.12.13? I have added playsinline': true, to my videoJs setup and its not detecting it.

@DieterPagel
Copy link

Does anyone perhaps have a working code example for me on how to play video inline on iOS? We have read extensively in the forums and tried all suggestions but we just can't seem to get it to work

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 26, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

6 participants