Quantcast
Channel: Appcelerator Developer Center Q&A Unanswered Questions 20
Viewing all articles
Browse latest Browse all 8068

Always show controls videoplayer

$
0
0

Hi, I'm using 3.2.1 sdk and android. My app play a mp3 with video player to use the controls, but after a seconds the controls are hidden. How can I make the contros always appear?

After that, I add labels to player for instructions but that labels prevent display the controls when I click on it. How can I focus videoplayer through the labels?

I need one or another function. Always show controls or focus player to show controls through another component.

Another question is: can I embed the videoplayer to a view and display only the controls?

My code:

var player = Titanium.Media.createVideoPlayer({
            backgroundColor: 'black',
            focusable: true,
            width : '100%', height: '100%',
            movieControlStyle : Ti.Media.VIDEO_CONTROL_EMBEDDED,
            scalingMode : Titanium.Media.VIDEO_SCALING_ASPECT_FILL
        });
 
        var label1 = Titanium.UI.createLabel({
            text:' INSTRUCTION HERE.',
            backgroundColor: 'white', width:'auto', height:'auto',
            color:'black'
        });
        label1.addEventListener('click',function(e){
            player.fireEvent('singletap',e); // attemp
            player.fireEvent('click',e);        //another attemp
            player.focus();             //another attemp
        });
I would appreciate someone to help me. Thanks!

Viewing all articles
Browse latest Browse all 8068

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>