Demo: Play Video using Default iOS Player
One approach to playing video (or audio) is to use the built-in iOS media player of Mobile Safari. Following are instructions for wiring up a button’s OnClick action to load an mp4 file into the default video player. The .mobi design file is attached to the bottom of this article.
1) In the Visual Designer add a button
2) Configure the button’s OnClick handler to use a GotoURL action
– set the URL to http://genuitec.com/mobile/mobione/dev/sample_mpeg4.mp4 or any other video with compatible format for the iOS player
3) Use Project>Upload Web Application action to generate the html code and share a URL with your iOS device for testing
Notes:
1) The Test Center emulator does not properly handle audio or video at this time. Thus avoid invoking the button if viewing the UI in the Test Center.
2) The iphone video player presents a Done button upon completion of playing the video. Clicking Done will return to the web app. The ipad video player does not present a Done button and will not return to your webapp when completed. You must manually reopen mobile safari to your webapp (bummer).
See attachment play-video-ss.png
Attachments:
You must be
logged in to view attached files.