Current location: Hot Scripts Forums » Programming Languages » PHP » Fix flv player script


Fix flv player script

Reply
  #1 (permalink)  
Old 01-31-07, 08:21 PM
xavier039 xavier039 is offline
Newbie Coder
 
Join Date: Aug 2006
Posts: 56
Thanks: 0
Thanked 0 Times in 0 Posts
Fix flv player script

I have a site where users can upload a video and it is then converted into flv and played through a flv player. Well I downloaded a new flv player and I am having trouble installing it. I have it to the point where it will play a video but not the correct one. It always plays the same video. I check my config.xml file and the error is in there.
Code:
 	
<!-- relative path to videos XML file -->
	<VIDEO_FILE_PATH>./videos.xml</VIDEO_FILE_PATH>
	<VIDEOS_PATH>./video/</VIDEOS_PATH>
	  <CURRENT_VIDEO_FILE_PATH>./video/video1.flv</CURRENT_VIDEO_FILE_PATH>
	<CURRENT_VIDEO_FILE_TITLE>Some title</CURRENT_VIDEO_FILE_TITLE>
	<CURRENT_VIDEO_FILE_RUNTIME>auto</CURRENT_VIDEO_FILE_RUNTIME>
	<PHP_PATH>./</PHP_PATH>
The flv player will always play the video that is in the <CURRENT_VIDEO_FILE_PATH> which would make sense. What I need to do is change it so that it will play the correct file that is uploaded. It would be dynamic because it would change from one video to the next. Does anybody know how I should change it? Here is my original script in my template for the flv player (this one worked 100%)
Code:
<object type="application/x-shockwave-flash" width="320" height="240"
                        wmode="transparent" data="{$flvdourl}/flvplayer.swf?file={$flvdourl}/{$vinfo[0].flvdoname}&autoStart=false">
                        <param name="movie" value="{$flvdourl}/flvplayer.swf?file={$flvdourl}/{$vinfo[0].flvdoname}&autoStart=false" />
                        <param name="wmode" value="transparent" />
                </object>
I then changed it to my new flv player and changed it to this code
PHP Code:

 <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="420" height="350" align="middle">

<param name="allowScriptAccess" value="sameDomain" />
<param name="movie" value="youtube.swf?xml=config.xml<?php     if( $_GET['video'] != null ) echo "&video=".$_GET['video'];?>" />
<param name="quality" value="high" /><param name="bgcolor" value="#ffffff" />
<embed src="youtube.swf?xml=config.xml<?php     if( $_GET['video'] != null ) echo "&video=".$_GET['video'];?>" quality="high" bgcolor="#ffffff" width="450" height="369" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object>
Any recommendations or ideas? I just want it playing the correct video when a user selects it.

Here is a link to the new flv player I got http://www.tufat.com/s_youtube_video.htm
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #2 (permalink)  
Old 02-02-07, 01:39 AM
grafman grafman is offline
Coding Addict
 
Join Date: Dec 2006
Posts: 278
Thanks: 0
Thanked 0 Times in 0 Posts
You need to alter the upload script to change the video value to whatever it just uploaded in the "param" section of your applet.

What code/page uploads the file? html, php, ftp?

What calls the web page that has the applet embedded in it? This is where you'd make your change, but it has to know where the uploaded file is put.
__________________
"Things are difficult only while you don't understand them."
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #3 (permalink)  
Old 02-02-07, 01:47 AM
Christian's Avatar
Christian Christian is offline
Community VIP
 
Join Date: Mar 2005
Location: ProgrammingTalk
Posts: 2,449
Thanks: 0
Thanked 6 Times in 5 Posts
Moved to PHP.
__________________
:: ImperialBB :: New version in the works! :: http://www.imperialbb.com ::

:: Have a question about the board? The Rules? An Infraction/Warning? :: Contact Form ::
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Submit button....can it send info to my email w/out the use of php???? lisa33 HTML/XHTML/XML 7 10-17-06 12:46 PM
3 Column CSS Fluid Layout (IE 6 Problem) Heidenreich12 CSS 9 10-04-06 04:22 PM
use html to open application absvinyl HTML/XHTML/XML 5 09-18-06 03:04 PM
CSS Border Width Question. nova912 CSS 6 09-07-06 10:13 AM


All times are GMT -5. The time now is 12:23 PM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.