0

I am creating an iPad app for running YouTube video using IFrame.

I referred to many questions regarding YouTube integration in UIWebView and understand that:

  1. Autoplay is not possible
  2. Apple doesn't allow to run video without user interaction (starting).

In my simple app, I have a JavaScript button in the first page, and in the next page integrated YouTube with IFrame.

If I click on the JavaScript button, is there any way to pass this click event to the next page for running YouTube?

Is event bubbling in HTML helps this?

Danny Beckett
  • 20,529
  • 24
  • 107
  • 134
Lara
  • 3
  • 4
  • did you try adding a trigger in javascript ? When the user click in the button it trigger a event to the Youtube Video, idk what events handle Youtube to play,but maybe it could work. – FxckDead Apr 29 '13 at 04:08

1 Answers1

0

As far as I know no, you can't do anything about it. Event triggering can be easily simulated (some example) without user interaction which can't work on iOS devices (because of the policy you mentioned).

iOS video tag (used by YouTube in this case) is handled by iOS browser. Mobile version is showing placeholder with play button which you need to 'tap'. And only this action can play the video. Notice that you can't even overlay video tag with anything, because it will simply not work.

Community
  • 1
  • 1
Karol
  • 7,803
  • 9
  • 49
  • 67