views:

28

answers:

1

I am trying to update an application to work on iOS 4 and I cannot get the movie player controls to show up on the video.

Here's the code I am using...

var movie = Titanium.Media.createVideoPlayer({
        url: vidurl,
        backgroundColor: '#000',
    movieControlMode: Titanium.Media.VIDEO_CONTROL_DEFAULT
    });

    videoWindow.add(movie);
    movie.addEventListener('complete', function (e) {
     alert("movie is finished");
        movie.close();  

    });


    movie.fullscreen = true;    
    movie.play();

How can I get the videoplayer controls to show up and the event to fire?

Edit: Fixed one issue, and now the video closes after finishing. But still no video playback controls.

A: 

Apple changed some of the APIs in 3.2+ and we've had to reflect our APIs to change them.

You can use one of the following:

 movie.movieControlStyle = Titanium.Media.VIDEO_CONTROL_EMBEDDED;
 movie.movieControlStyle = Titanium.Media.VIDEO_CONTROL_FULLSCREEN;
 movie.movieControlStyle = Titanium.Media.VIDEO_CONTROL_NONE;
jhaynie