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

Web and WebWorks 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.

Posts: 178
Registered: ‎03-10-2011
My Device: Not Specified

Embed YouTube Player and Lock Orientation 'animation'

My app supports both landscape and portrait mode, it needs to temporarily lock orientation to landscape mode when embed YouTube Player is triggered -- so YouTube Player is always launched in landscape mode.


I couldn't do this in PlayBook because no such API in PB's SDK (so I have to force app running in landscape mode in PB's config.xml)


BB10 SDK, does provide API to programmically rotate/lock orientation with one line code:



It works, with some annoying issues:

1. If this API is fired when app is in portrait mode, it rotates app to landscape mode and then locks screen. That's expected and works great.

2. If this API is fired when app is in landscape mode, it still tries to rotate -- from what the simulator behaves -- screen is scaled down a little bit and then restored back to full size. This isn't what I expected, it gives a bad user experence, I certainly don't want user to notice such 'animation' when one clicks to launch the player. 


Q1: This is simulator's issue or, it is designed in this way?


Somehow simulator hung after quickly and keeping locking and unlocking orientation


Q2: Does this look like simulator problem? 


Q3: Is there any better way to play YouTube clips? I also tried to use invoke for YouTube video URL, because I don't have target name for youtube player if there is, Web browser is always triggered with invoke.invoke API call.