Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-7866] iOS: Movie Player Overreleasing when Movie Stops

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2012-03-05T17:37:55.000+0000
Affected Version/sRelease 1.8.2
Fix Version/sSprint 2012-05, Release 2.0.0
ComponentsiOS
Labelsmodule_media, qe-testadded
ReporterDawson Toth
AssigneeDawson Toth
Created2012-03-02T14:12:51.000+0000
Updated2013-12-10T06:08:15.000+0000

Description

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

Comments

  1. Michael Pettiford 2012-03-07

    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
  2. Shameer Jan 2013-12-10

    Anvil testcase PR https://github.com/appcelerator/titanium_mobile/pull/5021

JSON Source