Jump to content

problem in playing the selected video in the embedded quicktime player


josephChiaWY

Recommended Posts

Hi all,

 

Recently, i have met a problem in playing the selected video in the embedded quicktime player. I am creating a video gallery for people to view their .mov file on quicktime player. Below are parts of my code:

 

Code: ( php )

if($ext=="mov"){

 

echo  "<object classid='clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B' width=320 height=240 standby='Data is loading...' codebase='http://www.apple.com/qtactivex/qtplugin.cab'>

                  <param name=src value='$getVideoPath'>

                  <param name='autohref' value='true'>

                  <param name='controller' value='true'>

                  <param name='href' value='$getVideoPath'>

                  <param name='target' value='quicktimeplayer'>

                  <embed src='$getVideoPath' type='image/x-quicktime' width=320 height=240 autohref='true' controller='true' href='$getVideoPath' target='quicktimeplayer'>

                  </embed>

                  </object>";

}

 

The output results is a Quicktime logo being shown and none of the video selected is shown

 

*Note: $getVideoPath variable is the path where the user's video are stored.

$ext is the file name extension. So far only my file that is .avi is working on windows media player.

 

 

Link to comment
Share on other sites


<?php
//get the username from db where the email entered by the users matches the one in db
      $getVideoResult = MYSQL_QUERY("SELECT video_id, videoName, path from videos WHERE video_id='$getVideoId' AND email='$email'");

     //get the result
     $getVideoMatch = mysql_fetch_array($getVideoResult);
  
     $getVideoPath = $getVideoMatch['path'];
     $videoNameExt =$getVideoMatch['videoName'];

     $getVideoName = substr($videoNameExt, 0, strrpos($videoNameExt,"."));
         $ext = substr($videoNameExt, strrpos($videoNameExt, '.') + 1);

     $_SESSION['path'] =$getVideoPath;
		   
         echo "<img src=../Image/videoIcon.gif border=0\><br />";
     echo "<span class=style3><a href=$getVideoPath>". $getVideoName ."</a></span></td><br />";

     if($ext=="mov"){
echo  "<object classid='clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B' width=320 height=240 standby='Data is loading...' codebase='http://www.apple.com/qtactivex/qtplugin.cab'> 
			   <param name=src value='$getVideoPath'>
			   <param name='autohref' value='true'>
			   <param name='controller' value='true'>
			   <param name='href' value='$getVideoPath'>
			   <param name='target' value='quicktimeplayer'>
			   <embed src='$getVideoPath' type='image/x-quicktime' width=320 height=240 autohref='true' controller='true' href='$getVideoPath' target='quicktimeplayer'>
			   </embed>
			   </object>";
	 }	

     else{		
	    			
         echo "<OBJECT id='mediaPlayer' width=320 height=310
		       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=src value='$getVideoPath' >
		       <param name='animationatStart' value='1'>
		       <param name='transparentatStart' value='1'>
		       <param name='autoStart' value='1'>
		       <param name='ShowControls' value='1'>
		       <param name='ShowDisplay' value='0'>
		       <param name='ShowStatusBar' value='1'>
		       <param name='loop' value='0'>
		       <EMBED type='application/x-mplayer2'
		        pluginspage='http://microsoft.com/windows/mediaplayer/ en/download/'
		        id='mediaPlayer' name='mediaPlayer' displaysize='4' autosize='0'
		        bgcolor='darkblue' showcontrols='1' showtracker='1'
		        showdisplay='0' showstatusbar='0' videoborder3d='0' width=320 height=240>";
	                echo "<embed src = '$getVideoPath' autostart='1' designtimesp='5311' loop='1'></embed></OBJECT>";		
    }
  ?>

*if the video extension is not .mov file it will be using windows media player to play the videos.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.