Themos Piperakis
Themos Piperakis

Reputation: 675

Stream live video to Android and iPhone smartphones

I am developing a live video streaming solution for a client with the following requirements: - Stream live video to high-end Android and iPhone devices, from a mobile-optimized web app (NOT native apps) - The video should not be full screen but partial screen, so that other HTML content can be displayed below the video

So my question is, what is the video format/technology that allows live video streaming in both devices? I've heard about HLS but I am not sure it plays in both devices.

And also, is there a way to prevent the video from going full screen? I've come across this in SO http://broken-links.com/tests/video/, but it's for on demand video. Could it also apply for live video streaming?

Thanks in advance

Upvotes: 5

Views: 624

Answers (1)

Mert Buran
Mert Buran

Reputation: 3017

You should set allowsInlineMediaPlayback attribute of your UIWebView instance to YES for iOS. From Apple's UIWebView reference page:

allowsInlineMediaPlayback

A Boolean value that determines whether HTML5 videos play inline or use the native full-screen controller.

@property(nonatomic) BOOL allowsInlineMediaPlayback Discussion The default value on iPhone is NO.

In order for video to play inline, not only does this property need to be set on the view, but the video element in the HTML document must also include the webkit-playsinline attribute.

For Android, AFAIK default behaviour of Android's WebView is not triggering media player with fullscreen. You should be able to use WebView as is.

You can get information about supported video formats with those links:

iOS Media Layer Supported Video Formats

Android Supported Video Formats

There are two major industry standards, I guess it won't be a problem if I understand your concerns correctly.

Hope that helps.

Upvotes: 0

Related Questions