Welcome to WebmasterWorld Guest from

Forum Moderators: not2easy

Message Too Old, No Replies

Help Needed for Playing Random Videos on webpage

Actually i want to make a website on which any media player(say wmp) runs m



2:10 pm on Jun 21, 2006 (gmt 0)

10+ Year Member

hi all.

Actually i want to make a website on which any media player(say wmp) runs my videos randomly from a playlist so that people cant download video files but can only watch them as they appears randomly.

or any other way to have static playlist files (http:// .. .. /playlist.asx) which runs all media files in any folder Randomly with encrypting files location.

Please Help me & suggest me a better way to do it.

Thanks in Advance for Your Help.


7:45 pm on Jun 21, 2006 (gmt 0)

5+ Year Member

why not use flash? they wont be able to download them if they are in flash.



4:23 pm on Jul 1, 2006 (gmt 0)

5+ Year Member

I have just knocked this up for you on this site, because it's easy.

Link your html file to my randomMovie.js, define the items for your array and then simply call it with renderMovie() somewhere between the body tags.

// ************ Start of randomMovie.js *************

// Our playlist array.
playlist[0] = '1.wmv'
playlist[1] = '1.wmv'
playlist[2] = '3.wmv'
playlist[3] = '4.wmv'

// Find the length of thr array
var arrayLen = playlist.length;

// Get a random number
var randomMovie = Math.round(Math.random()*(arrayLen-1));

function renderMovie(){

document.writeln('<OBJECT id="VIDEO" width="320" height="240"');
document.writeln('<PARAM NAME="URL" VALUE="'+ playlist[randomMovie] +'">');
document.writeln('<PARAM NAME="SendPlayStateChangeEvents" VALUE="True">');
document.writeln('<PARAM NAME="AutoStart" VALUE="True">');
document.writeln('<PARAM name="uiMode" value="none">');
document.writeln('<PARAM name="PlayCount" value="9999">');


// ************ End of randomMovie.js *************

anything else let me know


12:40 am on May 12, 2008 (gmt 0)

5+ Year Member

Could somebody explain how I would use the above script? I'm not very code friendly.


1:33 am on May 12, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member

If it can be seen, read or viewed it can be copied. At most you can expect to stop or slow down the non-technical user.

I know that doesn't answer your question but truthfully it's a futile effort. What you want to do would require URL rewriting and server side scripting, the crux of the problem is you're going to be serving the video to client. It can be saved using a variety of tools at that point.


1:43 am on May 12, 2008 (gmt 0)

5+ Year Member

I'm not concerned with people taking the video, I just want to make it randomly play a library of wmv videos.

Featured Threads

Hot Threads This Week

Hot Threads This Month