...

View Full Version : embedded video woes



snoodle
12-17-2009, 11:16 PM
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)...



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>";
}

snoodle
12-17-2009, 11:59 PM
it appears the problem is only happening in IE. FF is fine. Funny since the player is the MS Win Player.

_Aerospace_Eng_
12-18-2009, 12:41 AM
Have you read this sticky?
http://www.codingforums.com/showthread.php?t=50666

snoodle
12-18-2009, 01:00 AM
Have you read this sticky?
http://www.codingforums.com/showthread.php?t=50666

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.

snoodle
12-22-2009, 12:35 AM
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.

snoodle
12-22-2009, 05:34 PM
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.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum