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
Developer
swati-srivastava
Posts: 282
Registered: ‎02-25-2010
My Device: curve,bold,storm
My Carrier: Verizon,AT&T
Accepted Solution

how to play you tube video url in my application

i have a you tube video url not in rtsp format.

i cannot change the url

 

can anybody give some code or an idea to play

 

my url : http://www.youtube.com/watch?v=2Nr-5n389f

 

its not exact.just an imitation

of actual url

 

the actual url plays well in desktop browser but it also does not plays on browser of the device.

though website gets opened but video does not plays

 

it shows error in streaming the media

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

Re: how to play you tube video url in my application

How are you trying to play the video now?  Invoking the browser with the URL should work.

 

Invoke the browser

http://supportforums.blackberry.com/t5/Java-Development/Invoke-the-browser/ta-p/445362

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.
Developer
swati-srivastava
Posts: 282
Registered: ‎02-25-2010
My Device: curve,bold,storm
My Carrier: Verizon,AT&T

Re: how to play you tube video url in my application

i don't want to invoke the browser instead i want to play it directly on the media player

Please use plain text.
Developer
swati-srivastava
Posts: 282
Registered: ‎02-25-2010
My Device: curve,bold,storm
My Carrier: Verizon,AT&T

Re: how to play you tube video url in my application

[ Edited ]

well i got the solution

 

i passed the url as a web request that returned a response containing an rtsp url.

i passed that rtsp url in browser and it played directly in the media player

 

            BrowserSession browserSession = Browser.getDefaultSession();
            browserSession.displayPage(rtsp url);
            browserSession.showBrowser();

 

:smileyvery-happy:

 

Please use plain text.
New Contributor
Kiwo
Posts: 5
Registered: ‎07-19-2010
My Device: Not Specified

Re: how to play you tube video url in my application

Hi,

Can you tell me how did you get RTSP link? I want to do the same... can you share some code?

 

Thanks in advance!

Please use plain text.
Contributor
tuyennguyencanada
Posts: 41
Registered: ‎07-28-2010
My Device: Not Specified

Re: how to play you tube video url in my application

 

 

 

 

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

Re: how to play you tube video url in my application

What BlackBerry Smartphone model and BlackBerry device software version are you testing on?  You can find this under Options, About on the BlackBerry Smartphone.

 

Can you provide a sample URL that triggers this?

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.
Contributor
Sneha_Junagade
Posts: 14
Registered: ‎07-31-2012
My Device: 9790
My Carrier: airtel

Re: how to play you tube video url in my application

Please tell me how to play you tube video in browser field

or how to get rtsp link oh that video

Please use plain text.
Developer
pradeep_ch
Posts: 543
Registered: ‎12-23-2010
My Device: Z10
My Carrier: Airtel

Re: how to play you tube video url in my application

I am not saying this is correct, but you can do one thing,

 

If you establish a HttpConnection using that youtube URL you will get some data, in this data you have 2 or 3 rtsp links.

You can get any one of the link by parsing that data.

 

Now you can directly give that link in Browser.

 

Thanks.

Please use plain text.
New Developer
shaii
Posts: 17
Registered: ‎05-09-2011
My Device: 9700
My Carrier: pelephone

Re: how to play you tube video url in my application

hmm but isnt the RTSP streams provided by youtube are very low res? i remember i tried this and the stream is fixed to 176X220 res.
Please use plain text.