I built a project using the iOS 4.3 SDK and had video working with this code:
var win = Ti.UI.currentWindow; var vidPlayer = Ti.Media.createVideoPlayer({ width:'100%', height:'100%', top:0, left:0, backgroundColor:'#000000', autoplay:true, allowsAirPlay:true, fullscreen:true, url: win.videoLocation }); win.add(vidPlayer); vidPlayer.addEventListener('fullscreen', function (e) { if (!e.entering) { Ti.API.info("Done button clicked"); win.orientationModes = [Ti.UI.PORTRAIT]; vidPlayer.stop(); vidPlayer.release(); win.close(); } }); function vidComplete() { Ti.API.info("video complete"); win.orientationModes = [Ti.UI.PORTRAIT]; vidPlayer.stop(); vidPlayer.release(); win.close(); }; vidPlayer.addEventListener('complete',vidComplete);I recently switched to
iOS 5 and it doesn't work anymore. If I change the project back to 4.3 it works. Any ideas?
2 Answers
This should help, just posted it. http://developer.appcelerator.com/question/135367/fullscreen-video-player-example-works
25
Your Answer
Think you can help? Login to answer this question!