Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Adobe AIR Development


Thank you for visiting the BlackBerry Support Community Forums.

BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)

BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.

"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."

- Kevin Michaluk, Founder, CrackBerry.com

Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.


Reply
Developer
Posts: 223
Registered: ‎04-26-2012
My Device: Z10
My Carrier: Vodafone
Accepted Solution

Show MediaControl over VideoDisplay

I'm working on a MediaPlayer and I wanted to show media control over playing video on VideoDisplay.

Setting allowOverlay to true on VideoDisplay shows MediaControl, but video does not work so I have to set it to false.

Is trere any way to show some controls over a playing VideoDisplay?

My apps for Playbook: PlayEpub Book Reader with epub and FB2 support, Google Reader, ReaditLater - Net Files Share Explorer Get access to your network shared files- FFSync Sync your Firefox bookmarks and passwords
Developer
Posts: 172
Registered: ‎01-17-2011
My Device: 9500 series
My Carrier: Airtel

Re: Show MediaControl over VideoDisplay

See the example provided by Blackberry for media player with Control

http://www.blackberry.com/developers/docs/airapi/1.0.0/qnx/media/MediaPlayer.html

 

 

Developer
Posts: 223
Registered: ‎04-26-2012
My Device: Z10
My Carrier: Vodafone

Re: Show MediaControl over VideoDisplay

I know man, I followed it!

The sample shows a 800x480 video playe, not fullscreen, then it can show MediaControl on free space.

When setting videodisplay to stagewidth and stageheight, when playing video no mediacontrol is visible.

 

There has to be some way to do it.

My apps for Playbook: PlayEpub Book Reader with epub and FB2 support, Google Reader, ReaditLater - Net Files Share Explorer Get access to your network shared files- FFSync Sync your Firefox bookmarks and passwords
Highlighted
Developer
Posts: 223
Registered: ‎04-26-2012
My Device: Z10
My Carrier: Vodafone

Re: Show MediaControl over VideoDisplay

I solved!

 

allowOverlay sets zIndex property on VideoDisplay to -1 or 1 and it works as in qnxStageWebView, you have to set background to transparent on your bar descriptor. That's all. Now video playback is in background and I can do things in foreground Smiley Happy

My apps for Playbook: PlayEpub Book Reader with epub and FB2 support, Google Reader, ReaditLater - Net Files Share Explorer Get access to your network shared files- FFSync Sync your Firefox bookmarks and passwords
Developer
Developer
Posts: 227
Registered: ‎01-17-2012
My Device: PB
My Carrier: ATT

Re: Show MediaControl over VideoDisplay

I've been looking at this issue for awhile... glad someone else has a solution.

 

However:

   I tried setting the background to transparent in my app.xml:

	<!-- Settings for the application's initial window. Required. -->
	<initialWindow>
		<!-- The main SWF or HTML file of the application. Required. -->
		<!-- Note: In Flash Builder, the SWF reference is set automatically. -->
		<content>[This value will be overwritten by Flash Builder in the output app.xml]</content>
		
		<!-- The title of the main window. Optional. -->
		<!-- <title></title> -->

		<!-- The type of system chrome to use (either "standard" or "none"). Optional. Default standard. -->
		<systemChrome>none</systemChrome>

		<!-- Whether the window is transparent. Only applicable when systemChrome is none. Optional. Default false. -->
		<transparent>true</transparent>

 

then setting allowOverlay to true:

			display = new VideoDisplay( true, IowWindow.getAirWindow().group );
			{
				display.size = 100;
				display.sizeUnit = SizeUnit.PIXELS;
				display.sizeMode = SizeMode.BOTH;

				display.containment = Containment.CONTAINED;
				display.backgroundColor = 0;

				display.addChild( ctl );				
				display.addChild( activity );
				
				addChild( display );
			}

 

but the video does not appear - black screen...

 

what did I miss?

 

Regards,

Developer
Posts: 223
Registered: ‎04-26-2012
My Device: Z10
My Carrier: Vodafone

Re: Show MediaControl over VideoDisplay

Hi!

 

You have to set transparent on bar-descriptor.xml

 

   <initialWindow>
      <systemChrome>none</systemChrome>
      <transparent>true</transparent>
   </initialWindow>

 

then, set also transparent background on your main applicacion with backgroundAlpha=0

 

That's all. Works fine for me Smiley Happy

 

My apps for Playbook: PlayEpub Book Reader with epub and FB2 support, Google Reader, ReaditLater - Net Files Share Explorer Get access to your network shared files- FFSync Sync your Firefox bookmarks and passwords
Developer
Developer
Posts: 227
Registered: ‎01-17-2012
My Device: PB
My Carrier: ATT

Re: Show MediaControl over VideoDisplay

can't seem to figure out how to set backgroundAlpha on main application... DisplayObject has no such attribute...

 

Regards,

Developer
Posts: 223
Registered: ‎04-26-2012
My Device: Z10
My Carrier: Vodafone

Re: Show MediaControl over VideoDisplay

I'm not sure how you should do it, this is how I'm doing right now. My app starts with a mxml file, but it should be the same without it.

 

<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" backgroundColor="0x000000" backgroundAlpha="0">

My apps for Playbook: PlayEpub Book Reader with epub and FB2 support, Google Reader, ReaditLater - Net Files Share Explorer Get access to your network shared files- FFSync Sync your Firefox bookmarks and passwords