FRIHOSTFORUMSFAQTOSBLOGSDIRECTORY
You are invited to Log in or Register a Frihost Account!

Simple php or javascript divx webplayer playlist

 


warallthetm
Well, if you havent heard of stage6 or the divx web player, google it.
The main problem is that It does not support playlists, I want a pre-video thats 10 seconds to come on before the main video. I tried comming up with a code, but my problems were:
A) My host dosnt support remote includes for security reasons
B) My code is utter crap XD

Here is what I got
Code:

<?php
// Define A Var for our get
$id = $_GET["hash"];

// Include the pre-trailer
$include = "http://blablabla.com/123.divx";

// After the video is done (about 10 seconds) redirect to the full movie
header("Refresh: 10; URL=http://video.stage6.com/$id/.divx");
// NN4 requires that we output something...ghey
echo " ";
?>

I'm not really a good php coder as you can see, but maybe this can be done with javascript, because I saw in thier developer sdk pack, they had a video player controlled by javascript:
Developer SDK

Also, http://www.divx.com/divx/webplayer/
will help..

I will pay alot of frih if someone can get this done fast. I prefer if you have aim or msn to i can contact you but if you dont its ok.
Aredon
What's wrong with what you are using?
Code:

header("Refresh: 10; URL=http://video.stage6.com/$id/.divx");


Could also add:
Code:

<meta http-equiv="refresh" content="10;url=http://video.stage6.com/<?=$id?>/.divx">


JavaScript can also time it:
Code:

<script type="text/javascript">
setTimeout("location.href=http://video.stage6.com/<?=$id?>/.divx",10*1000);
</script>



As far as the video loading... it could take over 10 seconds...
Not much you could do there unless you switched to flash and an action script since flash allows you to keep track of the run time in a variable and can communicate with JavaScript in order to trigger a function which could redirect the user. Better yet, Flash could just go directly from one movie to the next as soon as the first finishes. I can answer questions regarding Flash's power or action-script coding however I do not have a Flash compiler and am not the one to turn to for creating new flash player interfaces.
Reply to topic    Frihost Forum Index -> Miscellaneous -> Marketplace

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2007 Frihost, forums powered by phpBB.