Da_Chris
Erfahrenes Mitglied
Hallo Leute ich habe folgenden Code bin mir aber nicht sicher ob man der so das optimum ist.
Wäre super wenn mir einer von euch da Tips geben könnte.
War bis jetzt ein ewiges gefummel
Wäre super wenn mir einer von euch da Tips geben könnte.
War bis jetzt ein ewiges gefummel
Code:
function setFullScreen()
{
document.getElementById('wmp').fullScreen = true;
return false;
}
function loadPlayer(url,width,height);
{
if(BrowserDetect.browser == 'Explorer')
{
document.write('<Object id="wmp" style="visibility:hidden;"');
document.write(' CLASSID="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6" width="'+width+'" height="'+height+'">');
document.write(' <PARAM name="URL" value="'+url+'"/>');
document.write(' <PARAM name="fileName" value="'+url+'" />');
document.write(' <PARAM name="enabled" value="True"/>');
document.write(' <PARAM name="stretchToFit" value="True"/>');
document.write(' <PARAM name="fullScreen" value="False"/>');
document.write(' <PARAM name="autoStart" value="1">');
document.write(' <PARAM NAME="ShowAudioControls" VALUE="1" />');
document.write(' <PARAM NAME="ShowDisplay" VALUE="1" /> ');
document.write('</Object>');
}
else if(BrowserDetect.browser == 'Firefox')
{
document.write('<object id="wmp" name="wmp" style="visibility:hidden;"');
document.write(' type="application/x-ms-wmp"');
document.write(' src="'+url+'"');
document.write(' enabled="True" stretchToFit="true"');
document.write(' width="'+width+'" height="'+height+'" autoStart="true"><embed id="wmp" src="'+url+'" stretchToFit="True" loop="true" loop="0" pluginspage="http://www.microsoft.com/Windows/Downloads/Contents/Products/MediaPlayer/" width="'+width+'" height="'+height+'" type="application/x-ms-wmp"></embed></object>');
}
else
{
document.write(' <object ID="wmp" height="320" width="422" CLASSID="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6">');
document.write('<param name="autoStart" value="true">');
document.write('<param name="AutoStart" value="true">');
document.write('<param name="AnimationAtStart" value="true">');
document.write('<param name="TransparantAtStart" value="true">');
document.write('<param name="stretchToFit" value="true">');
document.write('<param name="URL" value="'+url+'">');
document.write('<embed height="'+height+'" width="'+width+'" stretchToFit="True" autostart="True" url="'+url+'" src="'+url+'">');
document.write('</embed>');
document.write('</object>');
}
}