How to create dynamic flv player
Changing video source in the player

3 ways of changing video source on the fly.

1) Pass movie link(URL) parameter in the flv player using Javascript function - swfobject.getObjectById('WSplayer') .JS_PlayVideo('movie.flv') Read more
2) Use GET parameters in URL, e.g. or Read more
3) Generate player code with dynamic video URL <param name="FlashVars" value="_dynamicVideo={video:movie.flv}"/> Read more

1. Pass video source URL using Javascript function.

Suppose that you have flv player with several videos in the playlist. To start a video from the list you can use "JS_PlayVideoNum" function with number of the video. e.g. swfobject .getObjectById('WSplayer').JS_PlayVideoNum(3)
If you don't want to keep all videos in the playlist, use function "JS_PlayVideo", swfobject .getObjectById('WSplayer').JS_PlayVideo('video.flv')
HTML code examples:
<button onclick="swfobject.getObjectById('WSplayer').JS_PlayVideoNum(1)"> PlayVideo1 </button>
<button onclick="swfobject.getObjectById('WSplayer').JS_PlayVideo('video.flv')"> PlayVideoUrl </button>
<a href="javascript:swfobject.getObjectById('WSplayer').JS_PlayVideo('video.flv')">Anchor link</a>

2. Using GET parameters in URL.

For instance you have a player with many videos in playlist. In order for your customers to be able to easily navigate through all your videos and view a specific video, instead of scrolling through a list with small thumbnail images inside the player, you have a gallery page with an explanation to each video. When the customer clicks on an image on a different html page to view the video, they are taken to the html page with the player and that specific video starts to play.

Use links links like these:

Where movie=number in playlist

If you don't have all video files in the playlist, you can use links like these:

Where movie=video file URL (local files from the same server)

Also you can use full path to Youtube page, Vimeo page or your own video file:

Where movie=video file URL (full path to video)

3. Generate player code with dynamic video URL.

If your page with flv player created by PHP (or other server side language), you can add DynamicVideo object in the player code. The object with the video source link must be added in the FlashVars. All fields in the object except of the "video" are optional.
Examples of FlashVars object:
// (short)
<param name="FlashVars" value="_dynamicVideo={video:movie.flv}"/>

// (with optional parameters)
<param name="FlashVars" value="_dynamicVideo={video:movie.flv, preview:preview.jpg, advideo:adMovie.flv, adLink:adLink, thumbnail:thumbnail.jpg, description:descriptionText, subtitle:subtitleFilePath}"/>

// (along with other FlashVars)
 <param name="FlashVars" value="_dynamicVideo={video:movie.flv}&_objectID=WSplayer&_configXMLPath=Player_files/config.xml&_playListXML_Path=Player_files/playList.xml" />

* The above examples require Webstunning FLV Player version 4.4.0 or higher.

If you have any problems with the implementation of the above examples, please send your testing page link to our support team and describe your problem. We are always ready to help.