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. New to the forum? Please visit the ‘Getting Started’ link below.
inside custom component

Adobe AIR Development

Reply
Trusted Contributor
Deepu_George_Jacob
Posts: 182
Registered: ‎12-13-2011
My Carrier: Vodafone-IN

Media Player not working

Hi, 

 

I am trying to play a media by using the following code in my bb10 dev alpha device. But  it shows a error result Error during -(inputAttach)" . what is wrong in my code?

 

Thanks

Deepu George Jacob

 

var _myVD:VideoDisplay = new VideoDisplay();
_myVD.setPosition(1024/2 - 800/2, 600/2 - 480/2);
_myVD.setActualSize(800, 480);
_myVD.backgroundColor = 0x000000;
addChild(_myVD);
var _myPlayer:MediaPlayer = new MediaPlayer();
//_myPlayer.addEventListener(MediaPlayerEvent.INFO_CHANGE, infoChange);
_myPlayer.url = "http://www.ndjnfdnfkjdn.com/acbXXXXXXXXXX.mp4"
_myPlayer.videoDisplay = _myVD;

Please use plain text.
Developer
Innovatology
Posts: 1,064
Registered: ‎03-03-2011
My Carrier: Vodafone

Re: Media Player not working

Have you added permissions to your bar-descriptor.xml?

 

 <permission>play_audio</permission> 
 <permission>set_audio_volume</permission> 

 Also, try:

 

_myVD = new VideoDisplay(true, IowWindow.getAirWindow().group);

 

Files & Folders, the unified file & cloud manager for PlayBook and BB10 with SkyDrive, SugarSync, Box, Dropbox, Google Drive, Google Docs. Free 3-day trial! - Jon Webb - Innovatology - Utrecht, Netherlands
Please use plain text.
Trusted Contributor
Deepu_George_Jacob
Posts: 182
Registered: ‎12-13-2011
My Carrier: Vodafone-IN

Re: Media Player not working

It is not workings it shows error as

 

Error : [ErrorEvent type="error" bubbles=false cancelable=false eventPhase=2 text="MediaPlayer: Error during -(inputAttach)" errorID=5]

Please use plain text.