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();
1 Answer
-
I solved the problem myself.
I needed to close the Player.
I added the below.activeMovie.addEventListener('complete',function() { activeMovie.close(); });