views:

226

answers:

2

I have HTML page where windows media player is embedded. It works very well in all browsers on Windows, but when trying to open in Firefox on Mac OS, it fails to open.

Is there any alternative method which can be controlled using Javascript or HTML or do I have to install Window Media Player support for Mac OS?

+1  A: 

Try streaming with flash as a fallback, or use the <video> or <audio> tag, that Safari supports.

If you are trying to stream video in a way that works consistently on every browser, you should look into Video For Everyone:

Video for Everybody is very simply a chunk of HTML code that embeds a video into a website using the HTML5 element which offers native playback in Firefox 3.5 and Safari 3 & 4 and an increasing number of other browsers.

The video is played by the browser itself. It loads quickly and doesn’t threaten to crash your browser.

In other browsers that do not support , it falls back to QuickTime.

If QuickTime is not installed, Adobe Flash is used. You can host locally or embed any Flash file, such as a YouTube video.

The only downside, is that you have to have 2/3 versions of the same video stored, but you can serve to every existing device/browser that supports video (i.e.: the iPhone).

<video width="640" height="360" poster="__POSTER__.jpg" controls="controls">
    <source src="__VIDEO__.ogv" type="video/ogg" />
    <source src="__VIDEO__.mp4" type="video/mp4" /><!--[if gt IE 6]>
    <object width="640" height="375" classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B"><!
    [endif]--><!--[if !IE]><!-->
    <object width="640" height="375" type="video/quicktime" data="__VIDEO__.mp4"><!--<![endif]-->
    <param name="src" value="__VIDEO__.mp4" />
    <param name="autoplay" value="false" />
    <param name="showlogo" value="false" />
    <object width="640" height="380" type="application/x-shockwave-flash"
        data="__FLASH__.swf?image=__POSTER__.jpg&amp;file=__VIDEO__.mp4">
        <param name="movie" value="__FLASH__.swf?image=__POSTER__.jpg&amp;file=__VIDEO__.mp4" />
        <img src="__POSTER__.jpg" width="640" height="360" />
        <p>
            <strong>No video playback capabilities detected.</strong>
            Why not try to download the file instead?<br />
            <a href="__VIDEO__.mp4">MPEG4 / H.264 “.mp4” (Windows / Mac)</a> |
            <a href="__VIDEO__.ogv">Ogg Theora &amp; Vorbis “.ogv” (Linux)</a>
        </p>
    </object><!--[if gt IE 6]><!-->
    </object><!--<![endif]-->
</video>

If you need to look for a Flash based player (both audio and video), take a look at Flowplayer, an Open Source (GPL 3) video player for the Web. It can do almost anything you might want to do, and there is an extensive collection of plugins for many applications.

voyager
It seems to be interesting. Is it possible live streaming using this method? I have couple of links which provide online radio streaming which i m passing as source for WMP.
Asif
@Asif: you can receive a stream from a live feed with flowplayer, which will work in almost any OS http://flowplayer.org/plugins/streaming/rtmp.html
voyager
I believe that you can use MP3 as an codec for the stream, which should work on almost any OS/Browser. http://www.yolinux.com/TUTORIALS/LinuxTutorialAudioStreaming.html
voyager
Hi voyager, Thanks for quick reply. I 'll definitely try with options u gave
Asif
A: 

Side-step the problem by using a flash based mp4 video player, this approach is the de facto one currently.

Hassan Syed