Safari in iOS Safari will not let a video or audio start playing unless the user explicitly clicks on either the native play control in the video/audio element, or else an onclick hander of a <input> element.
You cannot initiate playback from the onclick handler of any kind of element or div or anything except <input> as far as I can tell. They claim this "feature" is to protect users from unexpected highway robbery by the wireless carrier (which would be AT&T) for data charges from a video starting up without the user's consent. It's nice that they have such a trusting relationship with their data service provider. So anyway, if we want to have a button in OpenLaszlo which starts playback, it needs to have an <input> element to catch the click. The solution I'm trying is to create a special subclass of <view> just for this case, called "<mobile_interactive_clickview>" or something like that, which has an invisible (opacity = 0) <input> element in the sprite to catch clicks. I think we could overlay this view on a button or other component, so that the click can be intercepted and a play() command issued, and then the click forwarded to the component. -- Henry Minsky Software Architect [email protected]
