Win a copy of TDD for a Shopping Website LiveProject this week in the Testing forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

Embedding multple players with javascript

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am trying to add flash files to my web site using a function javascript. The script is working for wm, rp and qt.
Can anyone help me add flash to the mix. All the links are in the html that will triger the right player.
Here is my web site http://janusevi.tripod.com/
Here is the script:

// JavaScript Document

function cDisc(ob,tn){
ob.title=disc[tn];
}

function mPlay(stream,player){
var PlayerDiv=document.getElementById("mPlayer");

// document.all.mPlayer.innerHTML = "";

if (player=="wm"){
//WMP.controls.stop();
PlayerDiv.innerHTML = "<object classid='CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6' type='application/x-mplayer2' width='400' height='300' id='WMP' ><param name='enableContextMenu' value='0'/><param name='autoplay' value='true'/><param name='SendPlayStateChangeEvents' value='true'/><param name='url' value='"+stream+"'/><embed src='"+stream+"' width='400' height='300' autostart='1' autoplay='1' align='middle' type='application/x-mplayer2' pluginspage='http://www.microsoft.com/Windows/Downloads/Contents/MediaPlayer/' showcontrols='1' showstatusbar='0' showdisplay='0' autorewind='0' enablecontextmenu='0' border='0'></embed></object>";

document.title = "FAMILY JANUSEVI MEDIA";
return;
}
if (player=="rp"){
//RMP.controls.stop();
PlayerDiv.innerHTML = "<OBJECT ID='RMP' CLASSID='clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA' WIDTH='400' HEIGHT='300' ><PARAM NAME='SRC' VALUE='' /><PARAM NAME='CONSOLE' VALUE='_unique' /><PARAM NAME='CONTROLS' VALUE='ImageWindow,ControlPanel,StatusBar' /><PARAM NAME='CENTER' VALUE='true' /><embed src='' width='400'height='300' console='_unique' controls='ImageWindow,ControlPanel,StatusBar' center='true' name='RMP'></embed></OBJECT>";

document.title = "FAMILY JANUSEVI MEDIA";
RMP.SetSource(stream);
RMP.DoNextEntry();
RMP.DoPlay();
return;
}

if (player=="qt"){
//QTP.controls.stop();
PlayerDiv.innerHTML = "<object classid='clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B' codebase='http://www.apple.com/qtactivex/qtplugin.cab' width='400' height='300' id='QTP'><param name='src' value=''/><param name='autoplay' value='true'><param name='CONTROLLER' VALUE='true'><param name='SCALE' VALUE='tofit'><param name='pluginspage' value='http://www.apple.com/QuickTime/download/' /><embed src='' width='400' height='300' autoplay='true' controller='true' scale='tofit' pluginspage='http://www.apple.com/QuickTime/download/'></embed></object>";

document.title = "FAMILY JANUSEVI MEDIA";
QTP.src=stream;
return;
}

if (player=="flv"){
//FLV.controls.stop();

PlayerDiv.innerHTML = "<OBJECT classid='clsid 27CDB6E-AE6D-11cf-96B8-444553540000'codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0'WIDTH='400' HEIGHT='300' id='myMovieName'><PARAM NAME='movie' VALUE='" + flv +"'><PARAM NAME=quality VALUE=High><EMBED quality=High WIDTH='400' HEIGHT='300'NAME='myMovieName' ALIGN='' TYPE='application/x-shockwave-flash'PLUGINSPAGE='http://www.macromedia.com/go/getflashplayer' wmode='transparent' </EMBED></OBJECT>";

document.title = "FAMILY JANUSEVI MEDIA";
return;

}

if (player=="nw"){
document.title = "Opening New Window (Stream Website) for nw stream in new window";
window.open(stream);
return;
}
}
 
We can walk to school together. And we can both read this tiny ad:
free, earth-friendly heat - a kickstarter for putting coin in your pocket while saving the earth
https://coderanch.com/t/751654/free-earth-friendly-heat-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic