Embedding WMV & Real with autodetect JS on Helix Server
WMPTalk.com Forum Index WMPTalk.com
Discuss Windows Media Player
 
 FAQFAQ   MemberlistMemberlist     RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Google
 
Web wmptalk.com
Embedding WMV & Real with autodetect JS on Helix Server

 
Post new topic   Reply to topic    WMPTalk.com Forum Index -> Windows Media on Web
Author Message
Upanisad
Guest





Posted: Thu Jun 03, 2004 7:03 pm    Post subject: Embedding WMV & Real with autodetect JS on Helix Server Reply with quote

Hi there!

I've built an embedded stream player for a site, using a Javascript
code snippet I got from Apple site
(http://developer.apple.com/internet/webcontent/detectplugins.html) to
autodetect the plug-ins. Then it writes the right code to the HTML to
embed the right player. It basically searches for Real Player and if
it doesn't find it, it reloads the PHP for the Windows Media Player.

Now, everything works, as far as the player is concerned.
The problem lies within the server or its interaction with the
script!!! We're using a small Helix Server, the free Basic version.
After a couple of days with the streamer online it gets stucked by
streams left open, way beyond their length as if it's still playing
them (but they're 30 seconds long, not hours and days!!)! It never
closes some of them (don't ask me why just SOME, but it seems to
happen with WMVs) and so it gets to fill its allowed rate or just
simply crashes!

Before I started to use the embedded player, with direct links to the
videos, it never happened. So it has to do with embedding, but I just
havent' got a clue about WHAT's wrong! I checked and rechecked
hundreds of times! :/

Could someone tell me what's going on???? I just can't get it!!!

It's quite complex, you can check the whole HTML here:
http://www.tvspot.it/streamer.php?speed=56k&fname=Casio-GShock


As for the embedding only, the code it writes for WMP is this one:

<SCRIPT language=JavaScript type=text/javascript>window.resizeTo(372,
562);</SCRIPT>
<OBJECT id=MediaPlayer1 type=application/x-oleobject
height=302
width=320
classid=CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6><PARAM NAME="URL"
VALUE="http://archivio.tvspot.it:8081/asxgen/stream/Casio-GShock.wmv"><PARAM
NAME="autoStart" VALUE="true"><PARAM NAME="uiMode" VALUE="full"><PARAM
NAME="stretchToFit" VALUE="false"><PARAM NAME="playCount"
VALUE="1"><PARAM NAME="enabled" VALUE="true">
<EMBED TYPE="application/x-mplayer2" NAME="MediaPlayer1"
WIDTH=320
HEIGHT=314
src="http://archivio.tvspot.it:8081/asxgen/stream/Casio-GShock.wmv"
filename="http://archivio.tvspot.it:8081/asxgen/stream/Casio-GShock.wmv"
autoStart="true" showcontrols="True" showstatusbar="True"
showdisplay="False" autorewind="True"
pluginspage="http://www.microsoft.com/windows/windowsmedia/download/default.asp">
</EMBED></OBJECT>



The code for Real is:

<OBJECT ID="videobox"
CLASSID="clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA" WIDTH="320"
HEIGHT="240"><PARAM name="src"
value="http://archivio.tvspot.it:8081/ramgen/stream/Casio-GShock.rm"><PARAM
name="controls" value="imagewindow"><PARAM name="CENTER"
value="TRUE"><PARAM name="console" value="video"><PARAM
name="autostart" value="true"><EMBED
TYPE="audio/x-pn-realaudio-plugin"
SRC="http://archivio.tvspot.it:8081/ramgen/stream/Casio-GShock.rm"
WIDTH="320" HEIGHT="240" AUTOSTART="true" CONTROLS="imagewindow"
CENTER="true" CONSOLE="video" NOJAVA="true"></EMBED></OBJECT><OBJECT
ID="controlsbox" CLASSID="clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA"
WIDTH="320" HEIGHT="69"><PARAM name="src"
value="http://archivio.tvspot.it:8081/ramgen/stream/Casio-GShock.rm"><PARAM
name="controls" value="All"><PARAM name="console" value="video"><EMBED
TYPE="audio/x-pn-realaudio-plugin"
SRC="http://archivio.tvspot.it:8081/ramgen/stream/Casio-GShock.rm"
WIDTH="320" HEIGHT="69" CONTROLS="All" CONSOLE="video"
NOJAVA="true"></EMBED></OBJECT>



or this, when it gets built by JS:

document.write ('<OBJECT ID="videobox"
CLASSID="clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA" WIDTH="320"
HEIGHT="240">');document.write ('<PARAM name="src"
value="http://archivio.tvspot.it:8081/ramgen/stream/Casio-GShock.rm">');document.write
('<PARAM name="controls" value="imagewindow"><PARAM name="CENTER"
value="TRUE"><PARAM name="console" value="video"><PARAM
name="autostart" value="true">');document.write ('<EMBED
TYPE="audio/x-pn-realaudio-plugin"
SRC="http://archivio.tvspot.it:8081/ramgen/stream/Casio-GShock.rm"
WIDTH="320" HEIGHT="240" AUTOSTART="true" CONTROLS="imagewindow"
CENTER="true" CONSOLE="video" pluginspage="http://italy.real.com"
NOJAVA="true">');document.write ('</EMBED></OBJECT>');document.write
('<OBJECT ID="controlsbox"
CLASSID="clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA" WIDTH="320"
HEIGHT="69">');document.write ('<PARAM name="src"
value="http://archivio.tvspot.it:8081/ramgen/stream/Casio-GShock.rm">');document.write
('<PARAM name="controls" value="All"><PARAM name="console"
value="video">');document.write ('<EMBED
TYPE="audio/x-pn-realaudio-plugin"
SRC="http://archivio.tvspot.it:8081/ramgen/stream/Casio-GShock.rm"
WIDTH="320" HEIGHT="69" CONTROLS="All" CONSOLE="video"
NOJAVA="true">');document.write ('</EMBED></OBJECT>');

Back to top
 
Post new topic   Reply to topic    WMPTalk.com Forum Index -> Windows Media on Web All times are GMT
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



Microsoft Office Forum New Topics
Powered by phpBB