iOS4 - videoPlayer has no playback controls during playback.
I am trying to upgrade an app to work with iOS4. I cant seem to get the video player controls on the video anymore.
Here's my code…
EDIT - UPDATED CODE
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();
Updated the code to be a bit cleaner. I dont why the video controls arnt showing and without them I cant push updates for three apps out :(
5 Answers
-
Laney:
movieControlStyle: Titanium.Media.VIDEO_CONTROL_NONE
-
I have the opposite problem. I do not want the controls but get them with this code
var activeMovie = Titanium.Media.createVideoPlayer({ contentURL:'movie.m4v', backgroundColor:'#000', movieControlMode:Titanium.Media.VIDEO_CONTROL_HIDDEN, scalingMode:Titanium.Media.VIDEO_SCALING_MODE_FILL }); // play movie activeMovie.play();
-
Abdullah try:
var movie = Titanium.Media.createVideoPlayer({ url: vidurl, backgroundColor: '#000', movieControlMode: Titanium.Media.VIDEO_CONTROL_FULLSCREEN, scalingMode:Titanium.Media.VIDEO_SCALING_MODE_FILL }); videoWindow.add(movie); movie.addEventListener('playing', function (e) { movie.fullscreen = true }); movie.addEventListener('complete', function (e) { alert("movie is finished"); movie.close(); }); movie.play();
According to the docco - fullscreen can't be set in 3.2+ until the view is actually shown. You might be able to use the 'preload' event rather than the playing event.
-
Did you solve your problem? I have the same issue of not getting any controls in the video player, no matter what settings I try.
-
25