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

Native Development

Reply
Developer
rnickel
Posts: 62
Registered: ‎10-29-2008
My Device: 9800
My Carrier: Rogers
Accepted Solution

Playing high def youtube videos?

I'm trying to integrate a better YouTube experience into our app. Right now the only way that I can get the application to play videos is by invoking the media player with an RTSP stream. Unfortunately the quality on these videos is TERRIBLE. It was acceptable 10 years ago for my flip phone, but not for a BB10 device.
 
I have attempted to embed the video in the webview, however when trying to play the video I'm ALWAYS shown an error. You can reproduce this by embedding the following code into a webview: 
<iframe width="560" height="315" src="http://www.youtube.com/embed/QZuOKUrwoys" frameborder="0" allowfullscreen></iframe>

 

 
This is YouTube's preferred way to play videos within an application.
 
On the iOS side we were able to alleviate this issue by setting the base URL to http://youtube.com and the videos play as expected. This doesn't seem to work for the BB10 webview unfortunately.
 
Any ideas?
Please use plain text.
BlackBerry Development Advisor (Retired)
s_rashid
Posts: 127
Registered: ‎02-27-2012
My Device: Bold
My Carrier: Rogers

Re: Playing high def youtube videos?

Hello,

Unfortunately, at the moment, the WebView component within native apps has limitations in terms of HTML5 Video, Flash and iFrame. However, you should be able to make a proper BlackBerry 10 YouTube app using WebWorks or AIR runtime. In that way, you should have access to the higher streams. For example, in AIR, you can acquire a MediaPlayer object; set the content ID (the unique ID of the video on YouTube be played, which you'd acquire via YouTube API).

We would also recommend to log a feature request for the native WebView component to support the desired features. It will help us to request for the changes with the development team(s). You can file feature requests here:
https://www.blackberry.com/jira/secure/Dashboard.jspa



Thanks,
Rashid

Please use plain text.
Developer
rnickel
Posts: 62
Registered: ‎10-29-2008
My Device: 9800
My Carrier: Rogers

Re: Playing high def youtube videos?

Unfortunately re-writing our entire application out of cascades and into Air is not an appropriate solution.

 

I have created a bug for this and I hope it gets addressed quickly.

Please use plain text.
BlackBerry Development Advisor (Retired)
s_rashid
Posts: 127
Registered: ‎02-27-2012
My Device: Bold
My Carrier: Rogers

Re: Playing high def youtube videos?

Yes, it is an unfortunate limitation right now for Cascades WebView; we are trying to escalate it with the internal development teams. 

However, I should point out that as a temporary solution (although a very poor experience), you could just invoke that particular YouTube URL with the browser app to do the the playback (just for now, until the Cascades WebView supports it natively).

 

Cheers,

Rashid

Please use plain text.
Developer
bbquincar
Posts: 304
Registered: ‎08-14-2012
My Device: PlayBook, Z10, Dev C
My Carrier: Rogers

Re: Playing high def youtube videos?

@s_rashid I have a similar issue where my whole app is based on webview and has websites with embedded YouTube videos. How would I give the consumer the ability to see them. Even if played outside my app.
BlackBerry 10 game reviews for the unknown, small and indie developers. Little games with big dreams. VeryBerryGames.com | Follow @VeryBerryGames | TwoCasualCoders.com | never casual on quality
Please use plain text.
BlackBerry Development Advisor (Retired)
s_rashid
Posts: 127
Registered: ‎02-27-2012
My Device: Bold
My Carrier: Rogers

Re: Playing high def youtube videos?

@bbquincar,

Are you asking how to invoke the browser app with a specific .html file or a URI? You should be able to do this invocation like any other card invocation. I'm assuming you already checked out some of the public resources/sample apps for invocation?
For example, here are some: 

 

Cheers,
Rashid

Please use plain text.
Developer
bbquincar
Posts: 304
Registered: ‎08-14-2012
My Device: PlayBook, Z10, Dev C
My Carrier: Rogers

Re: Playing high def youtube videos?

No I know how to do that check out launch codes its a free app but videos in the webview don't play nice understand BlackBerry is looking into it. With my app just pulling up webview is there a way to still watch the video when selected maybe pushing to invoke when the YouTube video is selected. It's part of the browser.
BlackBerry 10 game reviews for the unknown, small and indie developers. Little games with big dreams. VeryBerryGames.com | Follow @VeryBerryGames | TwoCasualCoders.com | never casual on quality
Please use plain text.
Developer
Kaz32
Posts: 236
Registered: ‎11-24-2012
My Device: Blackberry 10 Dev Alpha
My Carrier: Telkomsel

Re: Playing high def youtube videos?

Hi, is use iframe tag on webview still not available on cascades?

 

Thanks

Please use plain text.
BlackBerry Development Advisor (Retired)
s_rashid
Posts: 127
Registered: ‎02-27-2012
My Device: Bold
My Carrier: Rogers

Re: Playing high def youtube videos?

Hi Kaz32,

Note that the issue was the support for the HTML5 Video tag within the Cascades WebView. iFrame tags should have been already supported separately (as it should be now).

 

Starting with the latest 10.1 OS versions, you should be able to embed the HTML5 Video (with iFrame) for YouTube as well. But the design/implementation was such that it would take the user to a full screen video player, similar to what you see happen through the browser app, when playing YouTube videos. Are you seeing this is not the case right now?

Thanks,
Rashid

Please use plain text.
New Contributor
sylvaingautier
Posts: 2
Registered: ‎05-30-2013
My Device: Blackberry Z10
My Carrier: Orange

Re: Playing high def youtube videos?

Hi !

 

Exactly, now with the latest 10.1 OS versions, we should use iframe for YouTube video and, unfortunately, it start in a a full screen!!

Have you an idea to avoid this situation?

 

I tried to modify the property :

allowfullscreen=false

but it's always the same

 

Thanks,

Sylvain

Please use plain text.