Page 1 of 1

streaming video with the help of php ... playing flv video..

Posted: Wed Jun 20, 2007 5:15 pm
by djdon11
Weirdan | Please use

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]


hey [s]frndsss[/s] [color=green]friends[/color]..

[s]plz[/s][color=green]please[/color] look at this link...

http://www.aurelis.org/Aurelinar/aurelinar1.php

this page contains a wimpy player object which runs clips of flv video ..
& there is three buttons just below the player .. this is ok 1 , this is ok 2 , this is ok 3.. 
i want to play diffrent clip on diffrent button click .. there is also a abutton below these all buttons tat is automaticaly to next i want to run all three video 1 by 1 when user press this last button....

here is the existing code of this page which plays a video clip on loading of the page ...... 
[s]plz[/s][color=green]please[/color] if anyone can help me for this issue........

the code is here............................

Code: Select all

<? 
$page_title="Aurelinar 1";
$page_tab=2;
$lang="D";
include($DOCUMENT_ROOT . "/Connections/Aurelis.php");
include_once($DOCUMENT_ROOT . "/includes/functions/get_label.php");
include($DOCUMENT_ROOT . "/header_aurelis.php");

?>

<!-- CONTENT -->
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
//-->
</script>

<table width="792" align="center" border="0" cellpadding="10" cellspacing="0">
  <tr> 
    <td width="231" height="122" align="left" valign="top"> 

<!-- Wimpy Player Code -->
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="244" height="207" id="wasp22811" name="wasp22811" align="middle">
<param name="allowScriptAccess" value="sameDomain" />
<param name="movie" value="http://www.aurelis.org/wimpywasp/wasp.swf" />
<param name="loop" value="false" />
<param name="menu" value="false" />
<param name="quality" value="high" />
<param name="scale" value="noscale" />
<param name="salign" value="lt" />
<param name="bgcolor" value="#000000" />
<param name="flashvars" value="theFile=http://www.aurelis.org/wimpywasp/example1.flv&startPlayingOnload=yes&bufferSeconds=5&videoSmoothing=yes" />
<embed src="http://www.aurelis.org/wimpywasp/wasp.swf" flashvars="theFile=http://www.aurelis.org/wimpywasp/example1.flv&startPlayingOnload=yes&bufferSeconds=5&videoSmoothing=yes" loop="false" menu="false" quality="high" scale="noscale" salign="lt" width="244" height="207" name="wasp22811" align="middle" bgcolor="#000000" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object>
<!-- End Wimpy Player Code -->
		
      <p> 		
      </p>
      <p>&nbsp;
	  
	  		<br><br>
			<font size="+5"><input type="reset" value="  This is OK1  " onClick="allclear();" id="clear"></font>
			<br><br>
			<font size="+5"><input type="reset" value="  This is OK2  " onClick="allclear();" id="clear"></font>
			<br><br>
			<font size="+5"><input type="reset" value="  This is OK3  " onClick="allclear();" id="clear"></font>
			<br><br>
			<font size="+5"><input type="reset" value="  This is OK4  " onClick="allclear();" id="clear"></font>
			<br><br>
			<br><br>
			<font size="+5"><input type="reset" value="  Automatically to Next  " onClick="allclear();" id="clear"></font>
			<br><br>
	  
	  </p>
      <p>&nbsp;</p>
      <p>&nbsp;</p>
      <p>&nbsp;</p>
      <p>&nbsp; </p>
      <p align="center"><a href="../aurelis_online/index.php"><img src="../images/Aur_OnLine.gif" width="160" height="59" border="0"></a> 
        <br>
        <a href="../aurelis_online/index.php">Start now </a>
    <p>&nbsp; </p></td>
    <td width="450" align="left" valign="top"> 
      <!-- /CONTENT -->
      <p><img name="Image" src="images/A1_01.jpg" width="522" height="412" alt=""></p></td>
  </tr>
</table>

<? include($DOCUMENT_ROOT . "/footer_aurelis.php"); ?>

Weirdan | Please use

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]

[quote="[url=http://forums.devnetwork.net/viewtopic.php?t=30037]Forum Rules[/url] Section 1.1"][b]11.[/b] Please use proper, complete spelling when posting in the forums. AOL Speak, leet speak and other abbreviated wording can confuse those that are trying to help you (or those that you are trying to help). Please keep in mind that there are many people from many countries that use our forums to read, post and learn. They do not always speak English as well as some of us, nor do they know these aberrant abbreviations. Therefore, use as few abbreviations as possible, especially when using such simple words.

Some examples of what not to do are ne1, any1 (anyone); u (you); ur (your or you're); 2 (to too); prolly (probably); afaik (as far as I know); etc.[/quote]

Posted: Wed Jun 20, 2007 6:43 pm
by Ollie Saunders
Well get your buttons to work probably first but marking them up correctly then you can use the values that come from them to change which video is output.

Code: Select all

switch ($_POST['someButton'])) {
    case 'a':
        ?>
<!-- embed and object stuff goes here -->
        <?php
        break;
    case 'b'
       etc. 
}

streaming video with php .. (reply)

Posted: Wed Jun 20, 2007 7:31 pm
by djdon11
should i create the new object for every diffrent case of switch statement....???

Posted: Thu Jun 21, 2007 9:39 am
by Ollie Saunders
yes

streaming video code in php .... to play flv video...(reply)

Posted: Thu Jun 21, 2007 9:54 am
by djdon11
Hey friend ..

i did as u suggest but there is three diffrent player object seen on my page if i make three diffrent object for three diffrent button...... so its been again a problem ...

Posted: Thu Jun 21, 2007 11:02 am
by Ollie Saunders
Make sure you put a break at the end of each case.
I wrote:

Code: Select all

case 'a':
        ?>
<!-- embed and object stuff goes here -->
        <?php
        break;
The next case may appear on the next line immediately after.

streaming video (reply)

Posted: Thu Jun 21, 2007 11:10 am
by djdon11
Hi Friend ...
Thanxx for your Advice....

i did as you say but with if condition not with the switch .. and its working fine now

but only one problem is there .. whenever page refreshed it starts last movie clip... can you have any idea for that..

and one more thing that now what should i do for the last button that is automatically to next .. how can i run all the 4 movie clips one by one...

here i paste the code .. which is working pretty fine for the 4 buttons...

Code: Select all

<? 
$page_title="Aurelinar 1";
$page_tab=2;
$lang="D";
include($DOCUMENT_ROOT . "/Connections/Aurelis.php");
include_once($DOCUMENT_ROOT . "/includes/functions/get_label.php");
include($DOCUMENT_ROOT . "/header_aurelis.php");

?>

<!-- CONTENT -->
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
//-->
</script>

<table width="792" align="center" border="0" cellpadding="10" cellspacing="0">
<form name="video" action="" method="post">
  <tr> 
    <td width="231" height="122" align="left" valign="top"> 

<!-- Wimpy Player Code -->
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="244" height="207" id="wasp22811" name="wasp22811" align="middle">
<param name="allowScriptAccess" value="sameDomain" />
<param name="movie" value="http://www.aurelis.org/wimpywasp/wasp.swf" />
<param name="loop" value="false" />
<param name="menu" value="false" />
<param name="quality" value="high" />
<param name="scale" value="noscale" />
<param name="salign" value="lt" />
<param name="bgcolor" value="#000000" />
<param name="flashvars" value="" />
<?php if($_POST['movie1']) {  ?>
<param name="flashvars" value="theFile=http://www.aurelis.org/wimpywasp/example1.flv&startPlayingOnload=yes&bufferSeconds=5&videoSmoothing=yes" />
<embed src="http://www.aurelis.org/wimpywasp/wasp.swf" flashvars="theFile=http://www.aurelis.org/wimpywasp/example1.flv&startPlayingOnload=yes&bufferSeconds=5&videoSmoothing=yes" loop="false" menu="false" quality="high" scale="noscale" salign="lt" width="244" height="207" name="wasp22811" align="middle" bgcolor="#000000" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
<?php } 
 if($_POST['movie2']) {  ?>
<param name="flashvars" value="theFile=http://www.aurelis.org/wimpywasp/example2.flv&startPlayingOnload=yes&bufferSeconds=5&videoSmoothing=yes" />
<embed src="http://www.aurelis.org/wimpywasp/wasp.swf" flashvars="theFile=http://www.aurelis.org/wimpywasp/example2.flv&startPlayingOnload=yes&bufferSeconds=5&videoSmoothing=yes" loop="false" menu="false" quality="high" scale="noscale" salign="lt" width="244" height="207" name="wasp22811" align="middle" bgcolor="#000000" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
<?php } 

 if($_POST['movie3']) {  ?>
<param name="flashvars" value="theFile=http://www.aurelis.org/wimpywasp/example3.flv&startPlayingOnload=yes&bufferSeconds=5&videoSmoothing=yes" />
<embed src="http://www.aurelis.org/wimpywasp/wasp.swf" flashvars="theFile=http://www.aurelis.org/wimpywasp/example3.flv&startPlayingOnload=yes&bufferSeconds=5&videoSmoothing=yes" loop="false" menu="false" quality="high" scale="noscale" salign="lt" width="244" height="207" name="wasp22811" align="middle" bgcolor="#000000" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
<?php } 

if($_POST['movie4']) {  ?>
<param name="flashvars" value="theFile=http://www.aurelis.org/wimpywasp/example6.flv&startPlayingOnload=yes&bufferSeconds=5&videoSmoothing=yes" />
<embed src="http://www.aurelis.org/wimpywasp/wasp.swf" flashvars="theFile=http://www.aurelis.org/wimpywasp/example6.flv&startPlayingOnload=yes&bufferSeconds=5&videoSmoothing=yes" loop="false" menu="false" quality="high" scale="noscale" salign="lt" width="244" height="207" name="wasp22811" align="middle" bgcolor="#000000" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
<?php } ?>
</object>
<!-- End Wimpy Player Code -->
		
      <p> 		
      </p>
      <p>&nbsp;
	  
	  		<br><br>
			<font size="+5"><input type="submit" value="  This is OK1  " name = "movie1" ></font>
			<br><br>
			<font size="+5"><input type="submit" value="  This is OK2  " name = "movie2" id="clear"></font>
			<br><br>
			<font size="+5"><input type="submit" value="  This is OK3  " name = "movie3" id="clear"></font>
			<br><br>
			<font size="+5"><input type="submit" value="  This is OK4  " name = "movie4" id="clear"></font>
			<br><br>
			<br><br>
			<font size="+5"><input type="reset" value="  Automatically to Next  " onClick="allclear();" id="clear"></font>
			<br><br>
	  
	  </p>
      <p>&nbsp;</p>
      <p>&nbsp;</p>
      <p>&nbsp;</p>
      <p>&nbsp; </p>
      <p align="center"><a href="../aurelis_online/index.php"><img src="../images/Aur_OnLine.gif" width="160" height="59" border="0"></a> 
        <br>
        <a href="../aurelis_online/index.php">Start now </a>
    <p>&nbsp; </p></td>
    <td width="450" align="left" valign="top"> 
      <!-- /CONTENT -->
      <p><img name="Image" src="images/A1_01.jpg" width="522" height="412" alt=""></p></td>
  </tr>
  </form>
</table>

<? include($DOCUMENT_ROOT . "/footer_aurelis.php"); ?>

streaming viseo reply

Posted: Fri Jun 22, 2007 12:06 pm
by djdon11
Hi friend...
i never got your reply......

i am looking for the 5th button .. how i can run all the movie clip one by one on pressing this last button... please help me out ...
as [s]u[/s] you did it before......

your friend ... Vaibhav
[url=http://forums.devnetwork.net/viewtopic.php?t=30037]Forum Rules[/url] Section 1.1 wrote:11. Please use proper, complete spelling when posting in the forums. AOL Speak, leet speak and other abbreviated wording can confuse those that are trying to help you (or those that you are trying to help). Please keep in mind that there are many people from many countries that use our forums to read, post and learn. They do not always speak English as well as some of us, nor do they know these aberrant abbreviations. Therefore, use as few abbreviations as possible, especially when using such simple words.

Some examples of what not to do are ne1, any1 (anyone); u (you); ur (your or you're); 2 (to too); prolly (probably); afaik (as far as I know); etc.