Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-10414] iOS : VideoPlayer - App crashes when the videoplayer is restarted.

GitHub Issuen/a
TypeBug
PriorityHigh
StatusOpen
ResolutionUnresolved
Affected Version/sRelease 2.1.1, Release 3.1.0
Fix Version/sn/a
ComponentsiOS
Labelsapi, qe-ios070112
ReporterNeha Chhabra
AssigneeUnknown
Created2012-08-13T00:47:39.000+0000
Updated2018-02-28T20:03:20.000+0000

Description

App crashes when the videoPlayer is restarted. This is not a regression.It occurs since 2.1.0.GA Steps to Reproduce: 1. Install the app on device and launch it. 2. Click on Start Video label. 3. Then click on done button in the videoplayer. 4. again click on Start video label. 5. Repeat Step 3 and 4 until the simulator exits.(approximately 3 to 4 times) Actual Result: after step 4: The video does not show up and generates the logs attached. After Step 5: The app crashes. Expected Result: After Step 4: The video should start playing again. app.js
win = Titanium.UI.createWindow({
title:'Test'
});
var label = Ti.UI.createLabel({
top: 30,
width:100,
height:30,
text: 'start video',
backgroundColor:'white'
});
win.add(label);
label.addEventListener('singletap', function(e){
activeMovie = Titanium.Media.createVideoPlayer({
    width: 640/4, //if the aspect is not video default, then you'll get an exception
    height: 360/4, //if the aspect is not video default, then you'll get an exception
    fullscreen: true, //this one must be true, or the video must be resized for the exception
    autoplay: false,
    url: 'movie.mp4',
    backgroundColor:'#000',
    movieControlMode:Ti.Media.VIDEO_CONTROL_DEFAULT,
    scalingMode:Ti.Media.VIDEO_SCALING_ASPECT_FIT
});
win.add(activeMovie);
activeMovie.addEventListener('complete', function(e){
    Ti.API.info('movie finished playing');
    if (activeMovie.playing == true) {
        Ti.API.info('movie is playing');
        activeMovie.stop();
    } else {
        Ti.API.info('movie is stopped');
    }
    activeMovie.fullscreen = false;
    win.remove(activeMovie);
    Ti.API.info('movie onComplete finished');
});
activeMovie.play();
});
win.open();

Attachments

FileDateSize
log.rtf2012-08-13T00:47:39.000+00001349

Comments

  1. Shameer Jan 2013-04-10

    After step 4 it plays only audio but not video.It works fine only after third tapping on label, but there is no crashing. Tested with: Titanium Studio, build: 3.0.1.201212181159 Titanium SDK version: 3.1.0 Titanium SDK version: 3.0.2 iOS iPhone Simulator: iOS SDK version: 6.0

JSON Source