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
Posts: 73
Registered: ‎07-12-2011
My Device: 9800
My Carrier: Programmer
Accepted Solution

Can we play video on browserfield of blackberry

i get video url from webservice. Can we play the video on browserfield?

 

 BrowserField bf = new BrowserField();
        bf.requestContent("url;deviceside=true");
        add(bf);

 

 

When i execute in simulator. The video initial image display , and follow a error occur that "Access violation reading from 0x00000004".

Can i check on device.? its affect any problem on my device from this error.? Pls help me.



BlackBerry Development Advisor
Posts: 15,144
Registered: ‎07-09-2008
My Device: BlackBerry Passport
My Carrier: Bell

Re: Can we play video on browserfield of blackberry

Yes, this should work.  The error you describe is a Windows error from the simulator executable.  So it may run fine on a real BlackBerry Smartphone.  Have you tried another simulator?

 

The simulators do use the codecs installed on your PC for playback.  So if there is a codec issue, you could see this error.

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
Regular Contributor
Posts: 73
Registered: ‎07-12-2011
My Device: 9800
My Carrier: Programmer

Re: Can we play video on browserfield of blackberry

[ Edited ]

Ok. Thank you for your kind information.

.

New Contributor
Posts: 9
Registered: ‎08-30-2012
My Device: BlackBerry 5.0
My Carrier: Airtel India

Re: Can we play video on browserfield of blackberry

Hi friend,
Actually I am also facing same problem, Video is played while the time of Upload, Please If you have any suggestion than let me know.
Thanks in advance.
My problem is "I want to play youtube video directly in BrowserField"
Developer
Posts: 84
Registered: ‎07-22-2011
My Device: bb-9550,bb-9700
My Carrier: bb developer

Re: Can we play video on browserfield of blackberry

Hi

 

To play youtube video you can use this sample piece of code

 

String youtubeURL = "https://www.youtube.com/watch?v="+getYoutubeId();

String feedURL = "https://gdata.youtube.com/feeds/api/videos/"+ youtubeID;
DomParser dom = new DomParser(feedURL);

tempURL = dom.get_element();

if(tempURL != null && tempURL.length() > 0 )
 {
            if(tempURL.indexOf("rtsp") != -1 || tempURL.indexOf("http") != -1)
            {
                BrowserSession browserSession = Browser.getDefaultSession();
                browserSession.displayPage(tempURL);
            }
}

 

 

Thanks

 

----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.

 

New Contributor
Posts: 9
Registered: ‎08-30-2012
My Device: BlackBerry 5.0
My Carrier: Airtel India

Re: Can we play video on browserfield of blackberry

Thanks for quick reply. :smileyhappy:

Please tell me, I have some query
1. Where i can get Youtube api and what is youtubeID

2. Does BrowserSession supports BrowserField. Actually I want to play in BrowserField.

Thanks in Advance!!