Movie done button issues
Hi there,
I see people are having issues with playing Movies in full screen mode and movie controls etc.. but anyone having issues with the 'Done' button? It's not closing my window view, it just pauses the movie. The only way I can get out of the movie is to watch the whole clip.
Code (using the KS remote example):
// dynamic url with dynamic encoding (from kosso)
var media_url = "http://www.domain.com/iphone/clips/showreel.mp4";
var win = Titanium.UI.currentWindow;
var activeMovie = Titanium.Media.createVideoPlayer({
url:media_url,
backgroundColor:'#111',
movieControlMode:Titanium.Media.VIDEO_CONTROL_DEFAULT
});
if (parseFloat(Titanium.Platform.version) >= 3.2)
{
win.add(activeMovie);
}
activeMovie.play();
activeMovie.addEventListener('complete',function()
{
win.close();
});
win.addEventListener('close', function() {
alert("Window closed");
activeMovie.stop();
win.close();
});
Any workarounds would be appreciated.
Many thanks
2 Answers
-
Accepted Answer
I have the same problem. Since I start movies in fullscreen mode and the done button switches to non-fullscreen mode, my workaround is to listen for that event instead:
videoPlayer.addEventListener('fullscreen', function (e) { if (!e.entering) { videoPlayer.stop(); videoPlayer.release(); win.close(); } });
-
Hi Craig,
Yes i did, and have reported the bug back in 1.3.x but still no progress. If you are having the issue, add your comment to the ticket below that you are experienced the same problem.
Done button is not longer triggering anything where it suppose to, at least it used to and the api doc says it should.
https://appcelerator.lighthouseapp.com/projects/32238/tickets/1373-ios-videoplayer-done-button-doesnt-trigger-any-eventlistener