Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Streaming video - Visible in IE not in Firefox?

  • 16-07-2009 2:31pm
    #1
    Registered Users, Registered Users 2 Posts: 2,259 ✭✭✭


    Using Windows Media Encoder to capture a web cam feed and
    create the stream. The stream is accessed using the code below:
    <p>
    <object id="Player" width="355" height="270"
    classid="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6">
    <param name="URL" value="http://136.206.35.201:1121/">
    <param name="uiMode" value="none">
    </object>
    
    </p>
    <p>
    <input type="BUTTON" name="BtnPlay2" value="Play" onClick="StartMeUp()">
    <input type="BUTTON" name="BtnStop2" value="Stop" onClick="ShutMeDown()">
    </p>
    
    <p>
      <script>
    <!--
    function StartMeUp ()
    {
    Player.controls.play();
    }
    function ShutMeDown ()
    {
    Player.controls.stop();
    }
    -->
    </script>  
      
      <script language="VBScript">
    <!--
    On error resume next
    Player.URL = ""
    if err then msgbox "You need Windows Media Player 7. Go to" & chr(13) &_
    "http://www.microsoft.com/windowsmedia"
    err.clear
    -->
    </script> 
    
    
    Currently this code is running off-line so I cant offer a direct link. I was
    wondering is there something obvious in this code that I am missing that
    is preventing the stream from running in Firefox?


Comments

  • Closed Accounts Posts: 101 ✭✭lucideer


    Just at first glance, without having tested the above code at all, I'm guessing the classid you have there is for an ActiveX control which is only supported by IE and no other browser.

    You'll need to look into the code for embedding objects to run in the NPAPI Windows Media Player plugin that all normal browsers use.

    Another thing to keep in mind is that the NPAPI Windows Media Player plugin that Microsoft produce for non-Microsoft browsers is crippled in some functionality (not in Microsoft's interest to make their software work properly in competitor browsers) so it's possible it may not fully support the streaming video you're using.

    That's all guesswork on my part from experience, but have a look into it.


  • Registered Users, Registered Users 2 Posts: 2,259 ✭✭✭Shiny


    Thanks lucideer,

    I spent the rest of the day yesterday trying to fix the problem but you
    seem to be right about the compatibility problem.

    I have read that Firefox doesn't support Visual Basic, specifically this line
    I would assume:
     <script language="VBScript">
    

    I have been getting all the information from this page but so far I'm
    not finding an obvious solution for both IE and Firefox.


  • Closed Accounts Posts: 101 ✭✭lucideer


    Hey Shiny,

    You're right about Firefox not supporting Visual Basic, it is another Microsoft technology reserved only for Microsoft products so no other browser other than IE will support it.

    As a general rule, while IE has a large market share, I find it makes a poor starting point when developing a website as pretty much 100% of the hundreds of alternative browsers use similar, inter-compatible technologies (like NPAPI that I mentioned above for example), so anything you develop from their starting point will generally work on everything and may then only need a small tweak to be adapted to work with IE.

    Starting with IE support as a baseline (as you've done), and then adapting for countless other browsers generally doesn't work as well for the simple reason that IE is alone in support for most of it's propietary Microsoft only technologies like ActiveX, VBScript and XAML.

    If I were you, I'd consider what you want to do (stream video) and then ask yourself as a starting point: "how do I do that in Firefox/Opera/Safari/Chrome/Konqueror" (all those browsers and many others tend to do things the same way - IE blazes it's own individual incompatible trail). Then once you figure that out, hacking it a little to work in IE is generally quite easy (as hacking things to work in IE is something all web developers have done many times and it's tried and tested)

    I've personally never streamed live video over the web myself so I can't speak from direct experience. These links might (or might not) be helpful in some way:
    http://ashishware.com/Video.shtml
    http://www.longtailvideo.com/support/forum/General-Chat/16066/How-to-stream-live-to-red5-


  • Registered Users, Registered Users 2 Posts: 2,259 ✭✭✭Shiny


    Hi lucideer,

    Thanks a million for your help. I finally got it working this afternoon.
    After lots of looking, swearing and shouting, I finally came accross
    this little gem.

    Below is the final working code:
    <!--
     FireFox: type="application/x-ms-wmp"
     MSIE: type="video/x-ms-wmv"
    -->
    
    <object id="MSIE" classid="clsid:6BF52A52-394A-11D3-B153-00C04F79FAA6" 
    type="video/x-ms-wmv" width="355" height="330" >
    
        <param name="URL" value="http://136.206.35.201:1121/" />
        <param name="AutoStart" value="false" />
        <param name="ShowTracker" value="true" />
        <param name="ShowControls" value="true" />
        <param name="ShowGotoBar" value="false" />
        <param name="ShowDisplay" value="false" />
        <param name="ShowStatusBar" value="false" />
        <param name="AutoSize" value="false" />
        <param name="StretchToFit" value="true" />
    </object>
    
    <object type="application/x-ms-wmp" id="FireFox" width="355" height="330" >
        <param name="URL" value="http://136.206.35.201:1121/" />
        <param name="AutoStart" value="false" />
        <param name="ShowTracker" value="true" />
        <param name="ShowControls" value="true" />
        <param name="ShowGotoBar" value="false" />
        <param name="ShowDisplay" value="false" />
        <param name="ShowStatusBar" value="false" />
        <param name="AutoSize" value="false" />
        <param name="StretchToFit" value="true" />
        
    <a></a> <!--MSIE workaround-->
    
    </object>
    
    Basically there isn't an easy way to get streams to work on
    both. So 2 different sets of code are allocated to each.

    Firefox does not like the "classid" parameter.

    Thanks again and hopefully this code helps others as I could
    see this thread in google while searching for solutions.

    :)

    Edit: In google chome, 2 videos will show up. FU Chome!


Advertisement