adrian
adrian

Reputation: 4594

issue with videoPlayer in iphone-titanium

I'm playing a video in titanium-iphone and I created the videoPlayer like this:

   var activeMovie = Titanium.Media.createVideoPlayer({
    url: contentURL,
    backgroundColor:'#111',
    scalingMode : Titanium.Media.VIDEO_SCALING_ASPECT_FILL
   });

And it looks like this:

enter image description

The problem is that I have no control on the bottom time bar of the movie. It appears instantly and dismisses after a few seconds. Is there a way to make it not appear when the video opens and appear only when I click on the video and dissappear at the next click???!???

Thank you!

Upvotes: 0

Views: 695

Answers (1)

Maulik
Maulik

Reputation: 19418

You didn't set mediaControlStyle : Titanium.Media.VIDEO_CONTROL_DEFAULT

Use below code : -

var contentURL = "http://dts.podtrac.com/redirect.mp4/twit.cachefly.net/video/aaa/aaa0033/aaa0033_h264b_640x368_256.mp4";

var win = Titanium.UI.createWindow({      
        title:'Test',
        backgroundColor:'#fff',
        layout: 'vertical'
});

var movie = Titanium.Media.createVideoPlayer
({
    url:contentURL,
    top : 2,
    autoplay : true,
    height : 300,
    width : 300,
    mediaControlStyle : Titanium.Media.VIDEO_CONTROL_DEFAULT,
    scalingMode : Titanium.Media.VIDEO_SCALING_ASPECT_FIT
});
win.add(movie);

Upvotes: 1

Related Questions