Ell20 Posted April 4, 2008 Share Posted April 4, 2008 Hi, My users can upload videos to my site and stores the name of the video into the database. Is there anyway in which I can create a series of links for each of the videos they have uploaded (I can do this with while statement) which when clicked opens a popup with the embedded video? Ive had a look on around but couldnt find much. Any help would be appreciated Cheers Quote Link to comment Share on other sites More sharing options...
stuffradio Posted April 4, 2008 Share Posted April 4, 2008 Try going to: http://www.mioplanet.com/rsc/embed_mediaplayer.htm Quote Link to comment Share on other sites More sharing options...
Ell20 Posted April 4, 2008 Author Share Posted April 4, 2008 Thanks for the info but thats not really what im looking for I dont think. Quote Link to comment Share on other sites More sharing options...
stuffradio Posted April 4, 2008 Share Posted April 4, 2008 Ok so I think I understand what you're doing. Query the database and select the videos where the username that uploaded it is the same username. <?php $get_videos = mysql_query("SELECT * FROM `database` WHERE `username`='exampleusername'"); // Replace exampleusername with maybe a value that contains a dynamic username. In the url you could maybe have a option that says user=username and then it would get all the videos equal 'username' while ($video = mysql_fetch_array($get_videos)) { // echo the links here } ?> Hope that helps. Quote Link to comment Share on other sites More sharing options...
Ell20 Posted April 4, 2008 Author Share Posted April 4, 2008 Basically I have this at the moment which prints out the links: <?php $sql4 = "SELECT video_name, description FROM videos WHERE user_id = '$userid' AND validate = '1'"; $result4 = mysql_query($sql4); $i = 1; while ($row4 = mysql_fetch_assoc($result4)) { $video = $row4['video_name']; $description = $row4['description']; echo "<a href=\"../uploaded_videos/{$video}\" title=\"{$description}\" target=\"_blank\">Link $i</a>"." "; $i ++; } ?> This opens a pop up window which plays in Mozilla but not IE. So what I think I need is like a YouTube kind of thing where its embedded into a page and it plays the video in a little pop up window. Cheers Quote Link to comment Share on other sites More sharing options...
stuffradio Posted April 4, 2008 Share Posted April 4, 2008 Ok sure, in the page that gets opened up just use this code: <OBJECT id="VIDEO" width="320" height="240" style="position:absolute; left:0;top:0;" CLASSID="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6" type="application/x-oleobject"> <PARAM NAME="URL" VALUE="your file or url"> <PARAM NAME="SendPlayStateChangeEvents" VALUE="True"> <PARAM NAME="AutoStart" VALUE="True"> <PARAM name="uiMode" value="none"> <PARAM name="PlayCount" value="9999"> </OBJECT> That embeds a video player in to the page. Just change the line <PARAM NAME="URL" VALUE="your file or url"> change the value to the url of the video you're playing. Quote Link to comment Share on other sites More sharing options...
Ell20 Posted April 4, 2008 Author Share Posted April 4, 2008 I tried that but it still dosent seem to work in IE?? With this method surely it wont work as there are lots of videos uploaded thus the .html file is static with the name entered into the page? Cheers Quote Link to comment Share on other sites More sharing options...
stuffradio Posted April 4, 2008 Share Posted April 4, 2008 Ok so just check for the browser type, if the browser is IE than change the browser to Windows Media Player. Google Windows Media Player embed Quote Link to comment Share on other sites More sharing options...
Ell20 Posted April 4, 2008 Author Share Posted April 4, 2008 Surely even if I do that it still dosent solve the static nature of the html file meaning I would need a html file for each video uploaded! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.