PDA

View Full Version : .wma Streaming code/2 versions/one does not work/HELP :)


spdrywall
1-23-05, 11:58 AM
This version works on Firefox no sweat, IE needs security needs to be set to Medium Low, that's a drag! Why so?? I have not put in PARAM yet for buttons on this link so you will see no Play/Stop, but it seems to work, so far,lol.
http://www.homerenovationsonline.com/index2.html

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="content-type">
<title>index2</title>
</head>
<body>
<br>
<embed type="application/x-mplayer2"
pluginspage="http://www.microsoft.com/Windows/MediaPlayer/"
name="MediaPlayer" src="peppy-1.wma" autostart="1" showstatusbar="1"
volume="-1" height="2" width="0">
</body>
</html>

On the second version it works sometimes and sometimes it just dies, also it seems that index2.html loads faster. The code for index3.html is what I pulled right from Microsoft's website in regards to Windows Media Encoder 9, as I converted a .wav to .wma Does anybody know the BEST code to use for both IE and Firefox/Netscape as there seems to be sooo many different versions??
http://www.homerenovationsonline.com/index3.html

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>index3</title>
</head>
<body>
<object id="Player" classid="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6"
height="0" width="0">
</object><input name="BtnPlay" value="Play" onclick="StartMeUp()"
type="button">
<input name="BtnStop" value="Stop" onclick="ShutMeDown()" type="button">
<script>
<!--
function StartMeUp ()
{
Player.URL = "rtsp://www.homerenovationsonline.com/peppy-1.wma";
}

function ShutMeDown ()
{
Player.controls.stop();
}

-->
</script>
</body>
</html>

Rick_E
1-24-05, 02:52 PM
Sorry, double post. See the next message :D

Rick_E
1-24-05, 02:54 PM
To embed the media file in your web page insert the following tag into the HTML where you want the player to appear.

<embed src="peppy-1.wma">

This method of embedding the media file is preferred over others because it does not use an ActiveX control. Here's a fancier version that sets the size, border and alignment of the player.

<embed src="peppy-1.wma" width="320" height="285" align="center" style="border: 2px solid #808080; "><noembed>Media Player is required.</noembed>

spdrywall
1-24-05, 11:34 PM
Rick,

If i use <embed src="peppy-1.wma"> will the fact I don't use ActiveX control to trigger
the embed allow IE users to have their security set to high and still be able to see the embed? I had to set IE to "medium" not to trigger a securiity response on my present embed configuration of :

<embed type="application/x-mplayer2"
pluginspage="http://www.microsoft.com/Windows/MediaPlayer/"
name="MediaPlayer" src="peppy-1.wma" autostart="1" showstatusbar="1"
volume="-1" height="2" width="0">

Also can I use :
autostart="1" showstatusbar="1"
volume="-1" height="2" width="0"> with <embed src= ??

Thanks a bunch

Rick_E
1-25-05, 12:10 AM
I think they still need security "Medium" to play the file since it is technically a download. But it would allow those who do not have media player to play the content (some other players will play wma files.)

I believe it would also allow non-ActiveX browsers to play the content. Much of the non-PC world won't go anywhere near an ActiveX control (with good reason many PCers would say.)

I believe autostart is assumed as well as the controls. You'll just need to try one to see exactly what it does.

The optional parameters I believe would not be appropriate since you are not embedding a specific player. You're just telling the browser to play the content with whatever the default player is.

spdrywall
1-25-05, 12:37 AM
I have put up 3 diff sizes and they all work, thanks. Also I used autostart, will have to change that as all 3 diff sizes play at the same time,tri-lo-phonic to say the least, lol.
http://www.homerenovationsonline.com/index2.html

What I want to try next is diff skins for those using WMPlayers, as the default grey/silver looks a wee bit bland. Windows has a SDK available but I'm afraid it will once again be based on ActiveX Control so I won't even bother.

Are there more visual skins available that I can embedd as a zip? script? :) and be called for WMPlayer users on open some how? Would this type of senario conflict with non-WMPlayers users?

Rick_E
1-25-05, 12:48 PM
I don't know how you would set the skin since you don't really even know which player the browser is using. You might be able to do what you suggested... change the skin if the Windows Media Player is used... but I don't know how.

My inclination would be to move on to other aspects of the web site design.