Problem
As soon as the "completed" event fires, the underlying movie player is released and nullified, so the "stop" (and other methods, I'm sure) cannot control the video.
Reproduction
Drop the following in an app.js. Follow the onscreen instructions (1.2.3.):
var win = Ti.UI.createWindow({
backgroundColor: '#fff'
});
win.add(Ti.UI.createLabel({
text: '1. Let movie play through, then 2. press Play again', textAlign: 'center',
color: '#000',
height: 100, top: 0
}));
var video = Ti.Media.createVideoPlayer({
contentURL: 'movie.mp4',
backgroundColor: '#111',
movieControlMode: Ti.Media.VIDEO_CONTROL_DEFAULT,
top: 100, bottom: 100,
autoplay: true
});
win.add(video);
var stop = Ti.UI.createButton({
title: '3. Press me to try to stop video',
height: 100, bottom: 0
});
stop.addEventListener('click', function (evt) {
video.stop();
});
win.add(stop);
win.open();
Pull request
https://github.com/appcelerator/titanium_mobile/pull/1550
Closing issue Tested with Ti Studio build 1.0.9.201202141208 Ti Mob SDK 2.0.0.v20120307090205 OSX Lion 10.7.3 Expected behavior is shown
Anvil testcase PR https://github.com/appcelerator/titanium_mobile/pull/5021