Titanium Community Questions & Answer Archive

We felt that 6+ years of knowledge should not die so this is the Titanium Community Questions & Answer Archive

After playing movie 4 times, app freeze

I used the code from KitchenSink and tested.
The program is very simple. When I click the image, the movie starts. I tested this app on 3G, 3GS. And playing 4 times, app freeze.
Do I need to dealloc the memory? Please advise me how to solve this problem.

var activeMovie = Titanium.Media.createVideoPlayer({
contentURL:'../movie.mp4',
backgroundColor:'#111',
movieControlMode:Titanium.Media.VIDEO_CONTROL_DEFAULT,
scalingMode:Titanium.Media.VIDEO_SCALING_MODE_FILL
});

activeMovie.play();

— asked March 25th 2010 by kazuaki konno
  • movie
  • play
  • video
0 Comments

1 Answer

  • I solved the problem myself.
    I needed to close the Player.
    I added the below.

    activeMovie.addEventListener('complete',function()
    {
        activeMovie.close();
    });
    
    — answered March 25th 2010 by kazuaki konno
    permalink
    0 Comments
The ownership of individual contributions to this community generated content is retained by the authors of their contributions.
All trademarks remain the property of the respective owner.