Titanium Community Questions & Answer Archive

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

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 :(

— asked June 27th 2010 by Abdullah Ahmed
  • ios4
  • iphone
  • video
0 Comments

5 Answers

  • Laney:

    movieControlStyle: Titanium.Media.VIDEO_CONTROL_NONE
    
    — answered July 6th 2010 by scott l
    permalink
    0 Comments
  • 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();
    
    — answered July 2nd 2010 by Laney Dale
    permalink
    0 Comments
  • 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.

    — answered July 2nd 2010 by David Ashwood
    permalink
    0 Comments
  • 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.

    — answered July 9th 2010 by Michael Descher
    permalink
    0 Comments
  • 25

    — answered June 19th 2012 by Bill Freedman
    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.