Ver Mensaje Individual
  #1 (permalink)  
Antiguo 10/03/2005, 00:47
kez0
 
Fecha de Ingreso: enero-2004
Mensajes: 431
Antigüedad: 20 años, 10 meses
Puntos: 6
Controlar MediaPlayer

Veran estaba tratando de crear un reproductor para una estacion de radio usando media player y javascript e hice este codigo:

Código HTML:
<HTML>
<HEAD>
<SCRIPT LANGUAGE="JavaScript">
<!--
function subirv() {
var volumen = MediaPlayer.Volume
if(volumen != "0") {
var sube = volumen + 100;
MediaPlayer.Volume = sube;
}}
function bajarv() {
var volumen = MediaPlayer.Volume
if(volumen != "-9640") {
var baja = volumen - 100;
MediaPlayer.Volume = baja;
}
}
function para() {
var volumen = MediaPlayer.Volume
if(volumen != "-9640") {
MediaPlayer.Volume = -9540;
}}
function sigue() {
var volumen = MediaPlayer.Volume
if(volumen == "-9640") {
MediaPlayer.Volume = "0";
}}
//-->
</SCRIPT>

</HEAD>

<BODY>




<p><a href="javascript:subirv()">Subir Volumen</a></p>
<p>&nbsp;</p>
<p><a href="javascript:bajarv()">Bajar Volumen</a></p>
<p>&nbsp;</p>
<p><a href="javascript:para()">Parar</a></p>
<p>&nbsp;</p>
<p><a href="javascript:sigue()">Reproducir</a></p>
<p>&nbsp;</p>
<p>&nbsp;</p>




<CENTER><object id="MediaPlayer" classid="clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95" width="240" height="50">
        <p></p>
        <param name="AudioStream" value="-1">
        <param name="AutoSize" value="-1">
        <param name="AutoStart" value="-1">
        <param name="AnimationAtStart" value="-1">
        <param name="AllowScan" value="-1">

        <param name="AllowChangeDisplaySize" value="-1">
        <param name="AutoRewind" value="0">
        <param name="Balance" value="0">
        <param name="BaseURL" value>
        <param name="BufferingTime" value="5">
        <param name="CaptioningID" value>
        <param name="ClickToPlay" value="-1">
        <param name="CursorType" value="0">
        <param name="CurrentPosition" value="-1">

        <param name="CurrentMarker" value="0">
        <param name="DefaultFrame" value>
        <param name="DisplayBackColor" value="0">
        <param name="DisplayForeColor" value="16777215">
        <param name="DisplayMode" value="0">
        <param name="DisplaySize" value="0">
        <param name="Enabled" value="-1">
        <param name="EnableContextMenu" value="-1">
        <param name="EnablePositionControls" value="-1">

        <param name="EnableFullScreenControls" value="0">
        <param name="EnableTracker" value="-1">
        <param name="Filename" value="http://212.48.126.102:8084">
        <param name="InvokeURLs" value="-1">
        <param name="Language" value="-1">
        <param name="Mute" value="0">
        <param name="PlayCount" value="1">
        <param name="PreviewMode" value="0">
        <param name="Rate" value="1">


        <param name="SAMIStyle" value>
        <param name="SAMIFileName" value>
        <param name="SelectionStart" value="-1">
        <param name="SelectionEnd" value="-1">
        <param name="SendOpenStateChangeEvents" value="-1">
        <param name="SendWarningEvents" value="-1">
        <param name="SendErrorEvents" value="-1">
        <param name="SendKeyboardEvents" value="0">

        <param name="SendMouseClickEvents" value="0">
        <param name="SendMouseMoveEvents" value="0">
        <param name="SendPlayStateChangeEvents" value="-1">
        <param name="ShowCaptioning" value="0">
        <param name="ShowControls" value="-1">
        <param name="ShowAudioControls" value="-1">
        <param name="ShowDisplay" value="0">
        <param name="ShowGotoBar" value="0">
        <param name="ShowPositionControls" value="0">

        <param name="ShowStatusBar" value="-1">
        <param name="ShowTracker" value="0">
        <param name="TransparentAtStart" value="0">
        <param name="VideoBorderWidth" value="0">
        <param name="VideoBorderColor" value="0">
        <param name="VideoBorder3D" value="0">
        <param name="Volume" value="0">
        <param name="WindowlessVideo" value="0">
        <!--NETSCAPE PLUG-IN STARTS HERE-->

        <embed type="application/x-mplayer2"
src="http://212.48.126.102:8084/listen.pls" name="NSPlay" pluginspage="http://www.microsoft.com/isapi/redir.dll?prd=windows&sbp=mediaplayer&ar=media&sba=plugin" showcontrols="1" showdisplay="0" showstatusbar="1" autostart="true" width="240" height="50">
        </embed> </object>
</CENTER><BR>


</BODY>
</HTML> 
Al parecer funciona el problema es ke ql subir y bajar de volumen la transmision se detiene alguna solucion ??
__________________
El que teme preguntar, se averguenza de aprender.

Última edición por kez0; 10/03/2005 a las 10:21