Question

I'm building an app for iOS and android using sencha touch 2.3.1 (using sencha architect 3 as my IDE if that's useful to know) and I want to be able to play video inline, as opposed to an embedded video that opens up the native video player after the user taps on it. A perfect example of the functionality I'm after would be the Vine app (at least for iOS, I haven't looked at it on android), videos simply play right there on the page without the native iOS video player taking over.

I'm aware of the allowsInlineMediaPlayback property of UIWebView, but I have no clue how to set that, or even whether I can, since I'm not building a native app in xcode (in fact I have no experience doing so, this is my first attempt at building any sort of mobile application).

Was it helpful?

Solution 2

I managed to get this working by installing cordova on my machine, then running the

sencha cordova init

command on my sencha project folder. After that I simply made sure allowsInlineMediaPlayback was set in my cordova config and that my video tag/object in Architect had the webkit-playsinline attribute set to "1".

If you're interested I am still able to continue my normal development and build workflow in Architect (Architect is now compatible with Cordova, though make sure you add

{ "path": "cordova.js", "remote": true }

to your app.json manually. Note you only need that entry in the js section of your app.json and DO NOT NEED THE ACTUAL CORDOVA.JS FILE TO BE IN YOUR PROJECT FOLDER, Architect will handle this when you run your build command).

OTHER TIPS

How do you plan to package your application to run on a mobile device? The html/js/css what you are creating needs to be packaged on some way to have a mobile app. You can use sencha cmd for that but phonegap is sort of more popular for that. If you will use phonegap then you can set this in the config.xml. See http://docs.phonegap.com/en/2.2.0/guide_project-settings_ios_index.md.html

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top