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

Java Development

Reply
Regular Contributor
nunonobre
Posts: 64
Registered: ‎09-21-2011
My Device: Curve & 8520
My Carrier: TMN

Playning a video from youtube

Hi all,

 

I'm trying to play a video with streming of Blackberry. When I test in simulator OS 6 it works well. But when eu try with OS 7 it's threw a UnloadedMediaException. I'am passing an youtube URL (video 3gp) and I does not understand what is going on...Can somebody help-me ?

 

Best regards.

 

 Nuno Nobre

Please use plain text.
Administrator
MSohm
Posts: 14,308
Registered: ‎07-09-2008
My Device: BlackBerry Z30, BlackBerry PlayBook
My Carrier: Bell

Re: Playning a video from youtube

Can you provide a code snippet and sample link?

Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker
Please use plain text.
Regular Contributor
nunonobre
Posts: 64
Registered: ‎09-21-2011
My Device: Curve & 8520
My Carrier: TMN

Re: Playning a video from youtube

Hi. the code I'am using is:

 

try {

                Player p = Manager.createPlayer(_data.getUrl());
                p.realize();
                p.prefetch();
                p.start();
                
            } catch (Exception t) {
                Logger.logAlwaysEvent("[StartScreen] Failure invoking video: " + t.toString());
            }

 

And the URL could be one of the returned by youtube: rtsp://v4.cache7.c.youtube.com/CiILENy73wIaGQnb-0gdJfCP1RMYESARFEgGUgZ2aWRlb3MM/0/0/0/video.3gp

Please use plain text.
Administrator
MSohm
Posts: 14,308
Registered: ‎07-09-2008
My Device: BlackBerry Z30, BlackBerry PlayBook
My Carrier: Bell

Re: Playing a video from youtube

How are you obtaining the URL from Youtube?  Are you able to open the same URLs in the BlackBerry Browser.  I wasn't able to open the example URL on a desktop or BlackBerry Smartphone.

Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker
Please use plain text.
Regular Contributor
nunonobre
Posts: 64
Registered: ‎09-21-2011
My Device: Curve & 8520
My Carrier: TMN

Re: Playing a video from youtube

Hi,

 

I'am using the youtube api. This url is one of the info returned when tou make a search using the youtube api. The url are using the rstp (real stream time protocol). It also returns the normal url but even with it I can't open the video. What type of url I should use ?

 

 

Best regards,

 

  Nuno Nobre

Please use plain text.
Administrator
MSohm
Posts: 14,308
Registered: ‎07-09-2008
My Device: BlackBerry Z30, BlackBerry PlayBook
My Carrier: Bell

Re: Playing a video from youtube

Do the URLs work in the BlackBerry Browser?
Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker
Please use plain text.
Regular Contributor
nunonobre
Posts: 64
Registered: ‎09-21-2011
My Device: Curve & 8520
My Carrier: TMN

Re: Playing a video from youtube

No, it returns a error. What kind of URL should I use in media player?

 

 

Best regards,

 

 Nuno Nobre

Please use plain text.
Administrator
MSohm
Posts: 14,308
Registered: ‎07-09-2008
My Device: BlackBerry Z30, BlackBerry PlayBook
My Carrier: Bell

Re: Playing a video from youtube

If it doesn't work in the BlackBerry Browser, it would also fail in the Player class.

 

Which BlackBerry Smartphone models and BlackBerry handheld software versions (full 4 digit) are you testing on?  You can find this under Options, About on the BlackBerry Smartphone.

Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker
Please use plain text.