Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    Regular Coder
    Join Date
    May 2007
    Location
    Manteca, CA
    Posts
    219
    Thanks
    4
    Thanked 0 Times in 0 Posts

    embedded video woes

    After scouring the web for hours, I'm not sure what code to use for my embedded video. I finally settled on the "standard?" code for the MS Media Player. It works fine in FF and IE on my own machine/server, but on my host's server, in IE I hit play in the player and nothing happens, while in FF I get the error, "[Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIStreamListener.onStopRequest]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: file:///C:/Users/dad/AppData/Roaming/Mozilla/Firefox/Profiles/9mke65ys.default/extensions/firebug@software.joehewitt.com/components/firebug-channel-listener.js :: anonymous :: line 167" data: no]".

    Could this possibly have anything to do with php.ini settings? What else could be different (server vs my machine) that is causing the problem?

    Implementation at "http://maxsdad.com/test.html" (works on my home server but not my hosts, as you can see here).

    Here's the code I'm currently using for the embedded video (note the HTML is in the form of a string that is returned and later inserted into the DOM)...

    Code:
    function getMediaPlayer(src) {
    return "<OBJECT id='mediaPlayer' width='320' height='285' "
          +" classid='CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95'  "
           +"codebase='http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701' "
          +" standby='Loading Microsoft Windows Media Player components...' type='application/x-oleobject'> "
         +"  <param name='fileName' value='"+src+"'> "
         +"  <param name='animationatStart' value='true'> "
         +"  <param name='transparentatStart' value='true'> "
         +" <param name='autoStart' value='true'> "
          +" <param name='showControls' value='true'> "
          +" <param name='loop' value='false'> "
          +" <EMBED type='application/x-mplayer2' "
             +"pluginspage='http://microsoft.com/windows/mediaplayer/en/download/' "
             +"id='mediaPlayer' name='mediaPlayer' displaysize='1' autosize='-1'  "
             +"bgcolor='darkblue' showcontrols='true' showtracker='-1'  "
             +"showdisplay='0' showstatusbar='-1' videoborder3d='-1' width='320' height='285' "
             +"src='"+src+"' autostart='true' designtimesp='5311' loop='true'> "
         +"</EMBED></OBJECT>";
    }
    Last edited by snoodle; 12-17-2009 at 10:44 PM.

  • #2
    Regular Coder
    Join Date
    May 2007
    Location
    Manteca, CA
    Posts
    219
    Thanks
    4
    Thanked 0 Times in 0 Posts
    it appears the problem is only happening in IE. FF is fine. Funny since the player is the MS Win Player.

  • #3
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    ||||If you are getting paid to do a job, don't ask for help on it!||||

  • #4
    Regular Coder
    Join Date
    May 2007
    Location
    Manteca, CA
    Posts
    219
    Thanks
    4
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by _Aerospace_Eng_ View Post
    yes, but it doesn't solve my problem.

    There are actually 2 problems. (1) If I type in the HTML code into my HTML page the video runs fine. When I dynamically insert the same HTML code (using jquery - $("<object... >").appendTo($(body))) I get the error...

    [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIStreamListener.onStopRequest]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: file:///C:/Users/dad/AppData/Roaming/Mozilla/Firefox/Profiles/9mke65ys.default/extensions/firebug@software.joehewitt.com/components/firebug-channel-listener.js :: anonymous :: line 167" data: no]

    In IE the video doesn't work whether the HTML code is static in the page OR inserted during runtime.
    Last edited by snoodle; 12-18-2009 at 12:12 AM. Reason: more info

  • #5
    Regular Coder
    Join Date
    May 2007
    Location
    Manteca, CA
    Posts
    219
    Thanks
    4
    Thanked 0 Times in 0 Posts
    Just to wrap this thread up... the problem turned out to have to do with file privileges. some files worked, and others didn't. Movies saved with Windows Movie Maker saved with privileges that made it impossible to read on the web.

    I now set the privs of files uploaded to the site.

  • #6
    Regular Coder
    Join Date
    May 2007
    Location
    Manteca, CA
    Posts
    219
    Thanks
    4
    Thanked 0 Times in 0 Posts
    The WMP code I was using was working just fine except for 2 little problems. First, in IE only, the video would always fill it's original rectangle and ignore the width/height param settings. I was finally able to fix that problem by using this code that I stumbled upon...

    <!-- START FreeVideoCoding.com -->
    <embed src="http://" width="320" height="283" autostart="1" showcontrols="1" type="application/x-mplayer2" pluginspage="http://www.microsoft.com/windows/windowsmedia/download/"> </embed><br><a href="http://www.freevideocoding.com">FreeVideoCoding.com</a>
    <!-- END FreeVideoCoding.com -->

    This code works great for IE and FF except for one remaining problem. In IE (7) I am unable to stop the video (without hitting the stop button). My u/i calls for the video stopping by clicking a button outside the video object. In FF, when I delete the media DOM element, the video stops. In IE, it keeps going, and going, and going...

    I remember reading somewhere about issuing commands to the player, but can't seem to locate the docs. Any help would be most appreciated.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •