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

New Developer
Posts: 2
Registered: ‎02-04-2010
My Device: Blackberry 8900 Curve
My Carrier: Vodofone

How to stream video via http

Hi All,


I have created a webpage on my server with the object to play a midi file and that is working sometimes:

<object name="video" border="0" type="audio/midi" width="400" height="300" data="demo.mid"><param name="autostart" value="true">Demo midi file</object>


I use a blackberry 8900 Curve and mostly i get the message: "An error has occurred attempting to play media.", but then i do a refresh and sometimes the midi file is played.


Then i have changed the object to:

<object name="video" data="demo.mp4" width="400" border="1" height="300" type="video/mp4">Video mp4 file</object>


Then i get always the "An error has occurred attempting to play media."

I connect to the internet via a router with wi-fi. In all documentation i can read that http streaming is supported via wifi.


Has somebody a working example for me how i can do this?


If i put a download link, save the video and then open it, it works fine.


Posts: 1,382
Registered: ‎07-02-2009
My Device: BlackBerry Bold 9900
My Carrier: Bell

Re: How to stream video via http

HI there, thanks for your question.


Please make sure the "Support Embedded Media" checkbox is selected within your browser options window.


How large is the mp4 file that you are trying to load?  Here's a snippet of a sample that I use to test embedded media.  It is very similar to your example except for the fact that the object tag is self-closing.



<OBJECT data="painoKey_A.mp3" border="0" height="50px" type="audio/mpeg" />



The following learning resources may also be of help in your web development using embedded media:




Follow me on Twitter: @n_adam_stanley
Your app doesn't work? Use BlackBerry remote web inspector to find out why.
New Developer
Posts: 2
Registered: ‎02-04-2010
My Device: Blackberry 8900 Curve
My Carrier: Vodofone

Re: How to stream video via http

Hi astanley,


The support Enbedded Media checkbox is default on.


I have tested your object line but i get exact the same problem. It loads, and then i get the error: "An error has occurred attempting to play media.". I see a text buffering, then loading and then error on the player object.


I can reload the page and then sometimes it will play the media mp3 file. With a midi file exact the same problem. It plays sometimes.


Filesize of the mp3 test file is 1099703 bytes and the midi file is 41811 bytes.


When i try this with an mp4 or 3gp file i always get the error. Sometimes the error gives the option to save the file. Then i can save the movie and play it. That is working fine. So the blackberry can play the video file fine. But not in the browser via http streaming. MP4 and 3GP filesize is between 2 and 3 mb.


Do you have some more ideas how i can get it work?


The phone i use to test is:

Blackberry ® 8900

smartphone (EDGE, Wi-Fi)

v4.6.1.199 (Platform

WLAN Version: