04-13-2011 09:35 AM - edited 04-13-2011 03:10 PM
I'm developing a simple mobile website with some links to videos. The videos are linked directly. On most mobile handhelds the video automatically plays and returns to the webpage.
However with the Blackberry the user is given the option of downloading the file. This is a problem for my client...
How can you force the blackberry to go directly to streaming playback from a webpage? Is there a way to do this through php or html?
04-13-2011 10:12 PM - edited 04-13-2011 10:14 PM
What format are the videos you are trying to play? See Content types supported by the BlackBerry 6 browser document for more info on this topic. What can happen is the browser recognizes the given content type, and then invokes the native media player to play the video. RTSP is also commonly used to provide video content to mobile devices and the BlackBerry Smartphone browser supports this protocol well.
With the introduction of Tablet OS, we are seeing much stronger video capabilities, such as full HTML5 video as well as Flash player.
>> with the Blackberry the user is given the option of downloading the file.
Just wanted to clarify why this is happening: it is due to the content type of the file being accessed not being recognized by the browser, which invokes the default action of prompting the user to download the file.
You can ensure that the right MIME content type is being delivered by your Web server to the BlackBerry browser. This will ensure it is recognized correctly and proper action is taken to launch the media player.
Hope that helps. Let the board know if you have any more questions.
04-14-2011 10:00 AM
Hey astanly, thanks for the response.
The format of video I am trying to play is an mp4, which I believe Blackberrys support. I'm mainly targeting Bold, Curve, and Torch users, so I've encoded the video appropriately and the videos played back fine in the BB emulator.
This is a simple site, and the video files are linked to DIRECTLY with HTML in this manner:
<a href="thevideo.mp4">Watch Video</a>
In regards to the MIME content type, I know how to do this on an apache based server, but this website is on a IIS server :\
04-18-2011 12:25 PM
So as an update.
I've set the MIME type for the videos that are playing back correctly (video/mp4 & video/3gpp) and the video is playing back just fine, however the Blackberry still gives the option to either "open" or "save" the file.
Is there ANY way to control this through the browser? Or is this just the native options that the browser will use?
Again I'm linking to these videos in a pretty simiplistic way. Just a link to the video file directly.
Should I be coding this in a different way? Perhaps having a page with code to offer up the video?
Any anwers would be greatly appreciated.
04-19-2011 10:36 AM
You might find that HTML5 <video> tag does what you want. It is very easy to do - just a simple html page with a <video> tag and specifying src attribute would be worth looking at. For more detailed just google for the information and you can refine from there if it is working.
04-19-2011 10:53 AM
Thanks for the reply.
I think that is what I'm going to have to do... just code it in HTML5. I've been avoiding it so that I don't have to have another page where the video resides. Right now its just a strait link to the video. But if there is no other way to get around the issue then I will just have to go about it that way.
However, I still want to know if the "Open" and "Save" option in the Blackberry can be affected at all through the browser.
04-19-2011 02:01 PM
I was taking a look at YouTube's mobile website on the Blackberry Torch emulator.
When there is a video there on their site, they offer up a 3gp video that is a link to the file on a RTSP server. Even though the link is directly to the file, it plays automatically for the user.
So that is how youtube does it... can anyone offer a easier solution than setting up a RTSP server? Or is a RTSP server the only way that you have control of what the BB browser does with a file?