Site Search:
 
Speak Korean Now!
Teach English Abroad and Get Paid to see the World!
Korean Job Discussion Forums Forum Index Korean Job Discussion Forums
"The Internet's Meeting Place for ESL/EFL Teachers from Around the World!"
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Embed cross-compatible audio/media player

 
Post new topic   Reply to topic    Korean Job Discussion Forums Forum Index -> Technology Forum
View previous topic :: View next topic  
Author Message
jazblanc77



Joined: 22 Feb 2004

PostPosted: Sun May 07, 2006 1:44 am    Post subject: Embed cross-compatible audio/media player Reply with quote

I've been trying to get this to work for two days now, but to no avail. It should be noted that I already have all of the plugins installed on my computer that I should need to view and embedded player, including Realplayer, WMP 10, and Quicktime.

At first, I used a simple <embed> to get a WAV file to play on my blog. It works fine in IE6, but not on Mozilla 1.7 or Firefox 1.5, even though it should.

It was:

Quote:
<embed src="your file or url" width="180" height="45" hidden="false" autostart="0" loop="0"></embed>


Technically, the <embed> method should work as the outer object markers should alert IE to the code while the inner "embed" alerts Netscape based browsers to it. So why isn't it working for all browsers?

I then tried doing in with an <object> tag:

Quote:
<OBJECT id="VIDEO" width="320" height="240"
style="position:absolute; left:0;top:0;"
CLASSID="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6"
type="application/x-oleobject">

<PARAM NAME="URL" VALUE="your file or url">
<PARAM NAME="SendPlayStateChangeEvents" VALUE="True">
<PARAM NAME="AutoStart" VALUE="True">
<PARAM name="uiMode" value="none">
<PARAM name="PlayCount" value="9999">
</OBJECT>


But, of course, with this code, the assumption is that your browser is activeX enabled which makes them IE specific.

So, I tried to use java script as described here, but I can't get it to work.

I don't get it! I've even gone to Mozdev to find a workaround or solution, but I can't find what I need.

Does anyone know of some code, a script, or an applet which I could run on my blog fairly easily to allow me to play music and perhaps movies?
Back to top
View user's profile Send private message
jazblanc77



Joined: 22 Feb 2004

PostPosted: Sun May 07, 2006 2:01 am    Post subject: Reply with quote

Actually, I just found one that partially works:

Quote:
<embed type="application/x-mplayer2" src="{content}" pluginspage="http://www.microsoft.com/Windows/Downloads/Contents/Products/MediaPlayer/" ShowControls="1" AutoStart="false" ShowDisplay="false" ShowStatusBar="1" autosize="true" loop="true"></embed>


It works perfectly in IE, but in Mozilla and Firefox, it plays in the background, without the controls, and with autostart. I have changed the command string variables in the appropriate places and in different variations several times now, and can't get it to display on my page at all, or play the way i want it. At least I can hear the music now!

Help?!

BTW, I've been playing with the MIME types as well. Maybe there is another that would work... anyone know?
Back to top
View user's profile Send private message
SuperHero



Joined: 10 Dec 2003
Location: Superhero Hideout

PostPosted: Sun May 07, 2006 1:46 pm    Post subject: Reply with quote

THis code works for me on my personal blog though it leaves some odd vertical spacing above the player in fireforx. Not a concern for me since my folks only use IE.

Hope this helps.

Code:
<object id="MediaPlayer1" 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" width="400" height="336">
<param name="fileName" value="http://domain.com/file.wmv">
<param name="animationatStart" value="false">
<param name="transparentatStart" value="false">
<param name="autoStart" value="false">
<param name="showControls" value="true">
<param name="Volume" value="-250">
<embed type="application/x-mplayer2" pluginspage="http://www.microsoft.com/Windows/MediaPlayer/" src="http://domain.com/file.wmv" name="MediaPlayer1" width=400 height=336 autostart=0 showcontrols=1 volume=-250>
</object>
Back to top
View user's profile Send private message
jazblanc77



Joined: 22 Feb 2004

PostPosted: Sun May 07, 2006 7:39 pm    Post subject: Reply with quote

Thanks, I'll try that when I get home tonight. *fingers crossed*

Update:

Tried it and it didn't work. I can see why it worked for you since it is actually a cross breed between two of the codes that I posted above. On the IE side, the <object> part lets the activeX player run the file while the lower <embed> section directs Firefox to run the application through MIME instructions. Unfortunately, I can't even get this one to display properly. I am getting the same errors as before where I can hear audio in the background but not control it. Crying or Very sad Crying or Very sad Crying or Very sad

Does anyone else have any other hints? King of Kwangju?
Back to top
View user's profile Send private message
the saint



Joined: 09 Dec 2003
Location: not there yet...

PostPosted: Tue May 09, 2006 8:01 pm    Post subject: Reply with quote

Here's one for real player that work fine in IE, Netscape and Firefox for me. This may help as I've split the different elements into different objects. It may be something you haven't yet tried...

Code:
<OBJECT ID=RVOCX CLASSID="clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA" WIDTH=400 HEIGHT=1>
<PARAM NAME="SRC" VALUE="YOURFILENAME.rm">
<PARAM NAME="CONTROLS" VALUE="ImageWindow">
<PARAM NAME="CONSOLE" VALUE="one">
<PARAM NAME="AUTOSTART" VALUE="true">
<EMBED SRC="YOURFILENAME.rm" WIDTH=400 HEIGHT=1 NOJAVA=true CONTROLS=ImageWindow CONSOLE=one AUTOSTART=true>
</OBJECT>
<OBJECT ID=RVOCX CLASSID="clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA" WIDTH=400 HEIGHT=36>
<PARAM NAME="CONTROLS" VALUE="ControlPanel">
<PARAM NAME="CONSOLE" VALUE="one">
<EMBED SRC="YOURFILENAME.rm" WIDTH=400 HEIGHT=300 NOJAVA=true CONTROLS=ImageWindow, Control Panel CONSOLE=one AUTOSTART=true>
</EMBED></OBJECT><br>
<OBJECT ID=RVOCX CLASSID="clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA" WIDTH=400 HEIGHT=30>
<PARAM NAME="CONTROLS" VALUE="StatusBar">
<PARAM NAME="CONSOLE" VALUE="one">
<EMBED SRC="YOURFILENAME.rm" WIDTH=400 HEIGHT=30 NOJAVA=true CONTROLS=StatusBar CONSOLE=one>
</OBJECT>


Hope it helps...
Back to top
View user's profile Send private message Visit poster's website
jazblanc77



Joined: 22 Feb 2004

PostPosted: Wed May 10, 2006 3:36 am    Post subject: Reply with quote

The Saint and Superhero, thanks for your replies. It was good to get some code that came from a different angle that I wasn't exploring. I actually ended up using one of the ones that I had manipulated before, but in an altered fashion. The solution, in the end, was changing the MIME encoding, as bolded below. The one that I have there actually enabled the WMP activeX player and I updated the plugin download location in case of any difficulties (I wouldn't want my ma and pa to get too confused if they actually had to install a plugin!).

Quote:
<embed type="application/oleobject" src="file location" pluginspage="http://www.microsoft.com/windows/windowsmedia/player/version64/plugin.aspx" width="180" height="45" hidden="false" autostart="0" loop="0"></embed>


Superhero, this one may work for you and will certainly clear up the frame problems that you are having as a result of mixing the <embed> and <object> marker codes. If anyone would like to fiddle a little more with the MIME type by application or file type, you can find partial lists here and here, among many other places.
Back to top
View user's profile Send private message
jazblanc77



Joined: 22 Feb 2004

PostPosted: Thu May 11, 2006 11:14 am    Post subject: Reply with quote

BTW, for mp3s, change the MIME to "application/x-mplayer2". I just discovered that the MIME encoding that I first gave doesn't work for all file formats.
Back to top
View user's profile Send private message
SuperHero



Joined: 10 Dec 2003
Location: Superhero Hideout

PostPosted: Wed May 17, 2006 1:47 am    Post subject: Reply with quote

thanks for the code cleanup. I ended up using video/x-ms-wmv for my application type.
Code:
<embed type="video/x-ms-wmv" src="http:/domain.com/file.wmv" pluginspage="http://www.microsoft.com/windows/windowsmedia/player/version64/plugin.aspx" width="400" height="345" hidden="false" autostart="0" loop="0"></embed>
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Korean Job Discussion Forums Forum Index -> Technology Forum All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
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


This page is maintained by the one and only Dave Sperling.
Contact Dave's ESL Cafe
Copyright © 2018 Dave Sperling. All Rights Reserved.

Powered by phpBB © 2001, 2002 phpBB Group

TEFL International Supports Dave's ESL Cafe
TEFL Courses, TESOL Course, English Teaching Jobs - TEFL International