Detect if UIWebView can play video on iPhone (allows InlineMediaPlayback)

I'm trying to say whether my video will play online as soon as the user starts the video (as shown in full screen / in its own video player) on the iPhone in the UIWebView interface before it starts. I have no way of knowing if the UIWebView has the parameter allowsInlineMediaPlayback = YES , because I do not know in which application or on which page my video is displayed.

My goal is to show only the video if it can be played back in line.

Is there a way to read the allowInlineMediaPlayback parameter from javascript or determine if my video will play in line or not?

+6
source share
1 answer

Everything I read on the Apple developers website seems to suggest that it will automatically play in full screen on safari. Now, if they use another application, as far as I know, you do not have access to these properties of UIWebViews applications. However, in an attempt to not be completely useless, here is a link to all the methods you can request, and you can find some useful information there.

https://developer.apple.com/library/safari/documentation/AudioVideo/Reference/HTMLMediaElementClassReference/HTMLMediaElement/HTMLMediaElement.html#//apple_ref/doc/uid/TP40009355-CH18-SW27

Additional information that may be useful to you.

https://developer.apple.com/library/safari/documentation/AudioVideo/Conceptual/Using_HTML5_Audio_Video/AudioandVideoTagBasics/AudioandVideoTagBasics.html#//apple_ref/doc/uid/TP40009523-CH2-W2

+2
source

Source: https://habr.com/ru/post/973973/


All Articles