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

Web and WebWorks Development

Reply
New Contributor
paesano2000
Posts: 5
Registered: ‎04-13-2011
My Device: 9800 Torch

Video file playback - Force Play - Blackberry

[ Edited ]

Hello!

 

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?

 

Thanks!

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

Re: Video file playback - Force Play - Blackberry

[ Edited ]

Hello,

 

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.

 

Cheers,

Adam

Follow me on Twitter: @n_adam_stanley
-------------------------------------------------------------------------------------------------------------------------
Your app doesn't work? Use BlackBerry remote web inspector to find out why.
New Contributor
paesano2000
Posts: 5
Registered: ‎04-13-2011
My Device: 9800 Torch

Re: Video file playback - Force Play - Blackberry

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 :\

 

 

New Contributor
paesano2000
Posts: 5
Registered: ‎04-13-2011
My Device: 9800 Torch

Re: Video file playback - Force Play - Blackberry

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.

New Developer
naomipunkclan
Posts: 26
Registered: ‎04-25-2010
My Device: none

Re: Video file playback - Force Play - Blackberry

hi

 

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.

 

 

New Contributor
paesano2000
Posts: 5
Registered: ‎04-13-2011
My Device: 9800 Torch

Re: Video file playback - Force Play - Blackberry

Hey naomipunkclan

 

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.

New Contributor
paesano2000
Posts: 5
Registered: ‎04-13-2011
My Device: 9800 Torch

Re: Video file playback - Force Play - Blackberry

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?

 

Thanks!