corterp
asked on
Clicking on a radio station that resides in an ap div using href, I need to be able to have them play om a Media Player applet inside an ap Div
For the Experts,
I am trying to make a web page, where I can click on a link and it will play withing a media player applet on the web page. I can do the initial with no problem, playing when the page opens, but when I click on another radio station, it is opening outside the web page and into real player.
I am also trying to make my own Play, Pause and Stop buttons because I will keep the control bar hidden.
Any help you can give would be greatly appreciated and any information needed, please let me know.
Thanks in advance.
I am trying to make a web page, where I can click on a link and it will play withing a media player applet on the web page. I can do the initial with no problem, playing when the page opens, but when I click on another radio station, it is opening outside the web page and into real player.
I am also trying to make my own Play, Pause and Stop buttons because I will keep the control bar hidden.
Any help you can give would be greatly appreciated and any information needed, please let me know.
Thanks in advance.
<body>
<div id="player1">
<object id="musicplayer" classid="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6" name="MusicPlayer" width="750" height="425" title="MusicPlayer">
<PARAM NAME="URL" VALUE="http://www.orsradio.com/wma/80s.asx">
<PARAM NAME="SendPlayStateChangeEvents" VALUE="True">
<PARAM NAME="AutoStart" VALUE="True">
<PARAM name="uiMode" value="none">
<PARAM name="PlayCount" value="9999">
</object>
</div>
<div id="clips">
Action<br><br>
<a href="http://uni4.sa.streamaudio.com/KIXQ_FM">KIXQ FM</a><br>
</div>
<div id="Screen"></div>
<div id="StopMe" onmousedown="stopmovie()"></div>
<div id="pauseme" onmousedown="pausemovie()"></div>
<div id="playme" onmousedown="playmovie()"></div>
<script>
var links = document.getElementById("clips").getElementsByTagName("a");
for (var i = 0; i < links.length; i++) {
links[i].onclick = function() {
var MC = document.getElementById("MusicPlayer");
MC.URL(his.getAttribute("href", 2));
};
};
</script>
<script>
function stopmovie() {
var MC = document.getElementsByName("MusicPlayer");
MC.stop
};
function pausemovie() {
var MC = document.getElementsByName("MusicPlayer");
MC.pause
};
function playmovie() {
var MC = document.getElementsByName("MusicPlayer");
MC.play
};
</script>
</body>
ASKER
Thanks for the info selvol,
I do not want to use real player, the applet within the web page is a Media Player Applet.
I tried what you suggest but
<a href="http://uni4.sa.streamaudio.com/KIXQ_FM" target="_self"> KIXQ FM</a>
Opened up in real player outside my web page. Real player is the default player.
and
<a href="http://uni4.sa.streamaudio.com/KIXQ_FM target="musicplayer" >KIXQ FM</a>
Opened another page and then closed it, opened Real Player and started playing.
MusicPlayer, is the Media Player Applet sits inside an apDiv called player1. What I need is for when they click on the radio station, it changes the URL parameter of MusicPlayer and replaces what is already playing.
Also I need to find a ways to Play/Pause/Stop the MusicPlayer from buttons outside it's control bar.
Thanks
I do not want to use real player, the applet within the web page is a Media Player Applet.
I tried what you suggest but
<a href="http://uni4.sa.streamaudio.com/KIXQ_FM" target="_self"> KIXQ FM</a>
Opened up in real player outside my web page. Real player is the default player.
and
<a href="http://uni4.sa.streamaudio.com/KIXQ_FM target="musicplayer" >KIXQ FM</a>
Opened another page and then closed it, opened Real Player and started playing.
MusicPlayer, is the Media Player Applet sits inside an apDiv called player1. What I need is for when they click on the radio station, it changes the URL parameter of MusicPlayer and replaces what is already playing.
Also I need to find a ways to Play/Pause/Stop the MusicPlayer from buttons outside it's control bar.
Thanks
<OBJECT ID="MediaPlayer1" CLASSID="CLSID:22d6f312-b0 f6-11d0-94 ab-0080c74 c7e95"
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-oleobj ect" width="280"
height="300">
<param name="fileName" value="a.asx">
<param name="animationatStart" value="true">
<param name="transparentatStart" value="true">
<param name="autoStart" value="true">
<param name="showControls" value="true">
<param name="Volume" value="-300">
<embed type="application/x-mplaye r2" pluginspage="http://www.microsoft.com/Windows/MediaPlayer/"
src="http://www.mywebsite.org/file.m3u" name="MediaPlayer1" width=280 height=46 autostart=1 showcontrols=1
volume=-300>
</OBJECT>
Here's the a.apx
<ASX VERSION = "3.0"><TITLE>Title</TITLE>
<ENTRY> <REF HREF = "http://www.orsradio.com/wma/80s.asx" /> </ENTRY>
<ENTRY> <REF HREF = "http://www.streamaudio.com/stations/asx/WSB_AM.asx"/> </ENTRY>
</ASX>
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-oleobj
height="300">
<param name="fileName" value="a.asx">
<param name="animationatStart" value="true">
<param name="transparentatStart" value="true">
<param name="autoStart" value="true">
<param name="showControls" value="true">
<param name="Volume" value="-300">
<embed type="application/x-mplaye
src="http://www.mywebsite.org/file.m3u" name="MediaPlayer1" width=280 height=46 autostart=1 showcontrols=1
volume=-300>
</OBJECT>
Here's the a.apx
<ASX VERSION = "3.0"><TITLE>Title</TITLE>
<ENTRY> <REF HREF = "http://www.orsradio.com/wma/80s.asx" /> </ENTRY>
<ENTRY> <REF HREF = "http://www.streamaudio.com/stations/asx/WSB_AM.asx"/> </ENTRY>
</ASX>
I ment the a.asx
I attached the a.asx
Regards.
Hope this helps some what,,
I attached the a.asx
Regards.
Hope this helps some what,,
ASKER
I am sorry selvol,
Will that work on a Linux Server?
Thanks
Will that work on a Linux Server?
Thanks
ASKER
I am able to send the file name when I click the link using
var links = document.getElementById("c lips").get ElementsBy TagName("a ");
// loop those links and alter their click behaviour
for (var i = 0; i < links.length; i++) {
links[i].onclick = function() {
// play the clip specified in href- attribute
document.musicplayer.filen ame = (this.getAttribute("href", 2));
document.musicplayer.scr = (this.getAttribute("href", 2));
document.musicplayer.play( );
But what happens is it stops the music playing in music player, then loads up Real Player outside the web page and plays it.
I would prefer it to be in the musicplayer playing.
Thanks
var links = document.getElementById("c
// loop those links and alter their click behaviour
for (var i = 0; i < links.length; i++) {
links[i].onclick = function() {
// play the clip specified in href- attribute
document.musicplayer.filen
document.musicplayer.scr = (this.getAttribute("href",
document.musicplayer.play(
But what happens is it stops the music playing in music player, then loads up Real Player outside the web page and plays it.
I would prefer it to be in the musicplayer playing.
Thanks
The code I sent you will work on a linux server. As if were Html...
I did not have any problem changing the channel between the two stations in th a.apx file.
With the player staying on the page.
Possible unistall RPlayer???
I am on XP IE 8.
Hope it all works out for you.
I'll check back is a bit,
Regards
I did not have any problem changing the channel between the two stations in th a.apx file.
With the player staying on the page.
Possible unistall RPlayer???
I am on XP IE 8.
Hope it all works out for you.
I'll check back is a bit,
Regards
ASKER
Okay,
Not to smart on this, is a.asx a separate file?
Thanks
Not to smart on this, is a.asx a separate file?
Thanks
ASKER
I made it into a separate file but all I get is the player on screen
Apologie... Did not mean to leave you hanging;....
a is seperate,...
WOrkin on answer NOW and finished example....
a is seperate,...
WOrkin on answer NOW and finished example....
ASKER
selvol,
I thought it was working, but when I click on the link it is just opening, it is not running the script as it should.
I can not make a function with the script because then the whole div becomes clickable.
Getting really stuck and thank you for your help on this.
I thought it was working, but when I click on the link it is just opening, it is not running the script as it should.
I can not make a function with the script because then the whole div becomes clickable.
Getting really stuck and thank you for your help on this.
Can you send me the html for the layout of the page....
Or the exact stations you want.....
Is the page up yet? If so where is it??
@asu.edu <-second..
Swilli19 <---this first
Or the exact stations you want.....
Is the page up yet? If so where is it??
@asu.edu <-second..
Swilli19 <---this first
Hope this helps...
Here.
ASKER
selvol,
I sent you the html file to your email address.
Thanks
I sent you the html file to your email address.
Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thank you for all your help, I have been gone for a while.
I will email you with what I found.
Thanks
I will email you with what I found.
Thanks
But I thought I'd toss this out. Could not test this.....APologies
Have you Tried <a href="http://uni4.sa.streamaudio.com/KIXQ_FM" target="_self"> KIXQ FM</a>
OR <a href="http://uni4.sa.streamaudio.com/KIXQ_FM target="musicplayer" >KIXQ FM</a>
Here are some more param"s..
<param name="AllowChangeDisplaySi
<param name="AutoRewind" value="1">
<param name="Autosize" value="1">
<param name="AutoStart" value="1">
<param name="Balance" value="0">
<param name="BufferingTime" value="3">
<param name="ClickToPlay" value="1">
<param name="DisplaySize" value="4">
<param name="EnableContextMenu" value="1">
<param name="EnableFullScreenCont
<param name="EnableTracker" value="1">
<param name="Filename" value="crystalvid04.wmv">
<param name="Mute" value="0">
<param name="PlayCount" value="1">
<param name="ShowControls" value="1">
<param name="ShowAudioControls" value="1">
<param name="ShowDisplay" value="0">
<param name="ShowGotoBar" value="0">
<param name="ShowPositionControls
<param name="ShowStatusBar" value="0">
<param name="ShowTracker" value="1">
<param name="VideoBorderColor" value="0">
<param name="VideoBorderWidth" value="0">
<param name="Volume" value="-500">