0

I'm wondering is it possible to echo out an entire media player, such as windows media player,in a similar method to echoing out all other tags such as tables and divs?

The code i want to echo out, only if certain variables dictate, is this:

<OBJECT id='mediaPlayer' width="300" height="250"
      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'>	
      <param name='fileName' value="<?php echo $videolocation; ?>">
      <param name='animationatStart' value='true'>
      <param name='transparentatStart' value='false'>
      <param name='autoStart' value="false">
      <param name='showControls' value="true">
      <param name='loop' value="false">
      <EMBED type='application/x-mplayer2'
       pluginspage='http://microsoft.com/windows/mediaplayer/en/download/'
       id='mediaPlayer' name='mediaPlayer' displaysize='4' autosize='-1' 
       bgcolor='darkblue' showcontrols="true" showtracker='-1' 
       showdisplay='0' showstatusbar='-1' videoborder3d='-1' width="300" height="250"
       src="<?php echo $videolocation; ?>" autostart="true" designtimesp='5311' loop="true">	
       </EMBED>
       </OBJECT>

I have tried putting it all inside an echo statement such as:

if(strlen($variable1)>2)
{
echo "
//The whole script!
";
}

This doesn't work and was wishful thinking on my part; any suggestions would be very much appreciated.

2
Contributors
2
Replies
3
Views
7 Years
Discussion Span
Last Post by diafol
0

Actually believe it or not it does work, stupidly i forgot to escape the quotation marks in the script (either by using \before them or replacing them with '[if anyone gets the same problem!])
Thanks anyway!

0

If you've solved it - mark the thread solved to prevent members from wasting their time. Thanks.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.