2
votes

There's a confusing situation in which all browsers for iPhone (but not all iOS, such as iPad) feature forced video playback which deviates from W3C standards, severely inhibiting the developer's ability to create any web apps which combine video with interface to support iPhone devices. All browsers on all iPhones force this same full-screen video player.

Since I'm sure Google would not choose to deviate from W3C standards (along with every other browser developer), forcing videos to be played in full screen if it wasnt being forced to do so by Apple, I'm curious to know: What is Apple's policy exactly which causes all iPhone browsers to use its native full-screen-only video player, when inline video is clearly possible on the iPhone as seen in the YouTube app?

What's stopping Google from introducing it's own W3C compliant HTML5 video player in the iPhone Chrome browser rather than Apple's native non W3C compliant video player?

I want to support mobile (obviously including iPhone) with my web app, but it requires inline video (where an interface overlays the video for the user to interact with while the video plays). Does Apple tell developers "any web browser must use our native fullscreen video player" but any app can use whatever video playing format they want, such as YouTube? What if I put my web app in a wrapper to supply it as a native app? Would the wrapper for the HTML5 app be considered a web browser by Apple and be forced to use their native player? What exactly is the policy on this?


Additional info: Apple has even made it impossible to use a video player as the source for HTML5 canvas rendering, so no workarounds are possible that wouldnt require performing complex matrix operations without the help of graphic processing hardware, effectively frying the iPhone for a workaround to play videos inline on a web browser. So don't bother with this suggestion.

2
A while back I created a POC demonstrating how a video could appear to be made to play inline on the iPhone. It uses an audio tag synced with a video tag. The audio tag is used to play the video file (which provides the audio whilst remaining inline) and is then synced with a paused video tag (with the same media file loaded). As the audio plays, the paused video is "seeked" to the same time position - making it appear to play. Requires a well encoded progressive MP4 for best results: dev.powered-by-haiku.co.uk/solutions/jwiosinlinejherrieven
@jherrieven wow nice work around, Ill try this outuser5536767

2 Answers

1
votes

What's stopping Google from introducing it's own W3C compliant HTML5 video player in the iPhone Chrome browser rather than Apple's native non W3C compliant video player?

Apple does not allow any iOS browsers to use their own rendering engines. They must use the Apple supplied WebKit frameworks, or their app will not be approved for the iOS store.

From App Store Review Guidelines:

Apps that browse the web must use the iOS WebKit framework and WebKit Javascript

Presumably if you were to try to ignore that rule, your app will be denied.

0
votes

First, any answer about policy that doesn't come from Apple is speculation. That said, I can imagine a few possible reasons:

  • User eXperience. It prevents obnoxious advertisements in web pages from auto-playing.
  • Money. Apple takes, what, a 30% cut of app sale revenue? Allowing inline video would obviate some number of native iOS apps that could otherwise be 100% HTML5 web apps. Imagine that Apple ran a spreadsheet, factoring in developer frustration, potential revenue loss, and other things, but ultimately decided "we'll make more money if we don't allow inline video players".

Again, these ideas are pure speculation. If it weren't 2am EST, this question would probably already be flagged as "opinion based". I personally don't like that aspect of Stack Overflow, but that's how it has evolved.