Name is required.
Email address is required.
Invalid email address
Answer is required.
Exceeding max length of 5KB

Show first frame as preview image


hello
I want the player to show the first frame of my movie as preview image. Is this supported by the player, or do i have to build this myself with javascript?

regards,

Ernst

36 Community Answers

JW Player

User  
-2 rated :

If your host allows you to run PHP scripts and if your host will allow you to install ffmpeg, you can use this script to request any frame of the video file to use as the preview image.

Call with:
bc.. s1.addVariable('image', 'http://my.domain.com/path-to-file/ffmpeg_image.php?file=video.flv&time=00:00:00&browser=false');



*ffmpeg_image.php*
bc.. <?php

// generate a preview image from an FLV file on-the-fly, or to save
// Will - 10-16-07
// call with: ffmpeg_image.php?file=video.flv&time=00:00:05&browser=true
// call with: ffmpeg_image.php?file=video.flv&percent=75.3&browser=true
// no time defaults to "00:00:00" (first frame), no browser defaults to "true"

$videofile = (isset($_GET['file'])) ? strval($_GET['file']) : 'video.flv';
$image = substr($videofile, 0, strlen($videofile) - 4);

// debug (" File: ", $videofile);
// debug (" Image: ", $image);

$time = (isset($_GET['time'])) ? strval($_GET['time']) : '00:00:00';

// check time format
if (!preg_match('/\d\d:\d\d:\d\d/', $time))
{
$time = "00:00:00";
}

// debug (" Time: ", $time);

if (isset($_GET['percent']))
{
$percent = $_GET['percent'];

// debug (" Percent: ", $percent);

ob_start();
passthru("ffmpeg.exe -i \"". $videofile . "\" 2>&1");
$duration = ob_get_contents();
ob_end_clean();

// debug ("Duration: ", $duration);

preg_match('/Duration: (.*?),/', $duration, $matches);
$duration = $matches[1];

// debug ("Duration: ", $duration);

$duration_array = split(':', $duration);
$duration = $duration_array[0] * 3600 + $duration_array[1] * 60 + $duration_array[2];
$time = $duration * $percent / 100;

// debug (" Time: ", $time);

$time = intval($time/3600) . ":" . intval(($time-(intval($time/3600)*3600))/60) . ":" . sprintf("%01.3f", ($time-(intval($time/60)*60)));

// debug (" Time: ", $time);

}

$browser = (isset($_GET['browser'])) ? strval($_GET['browser']) : 'true';

// debug (" Browser: ", $browser);

if ($browser == "true")
{
header('Content-Type: image/png');
passthru("ffmpeg.exe -vcodec png -i \"" . $videofile . "\" -ss " . $time . " -vframes 1 -f image2 -");
}
else
{
passthru("ffmpeg.exe -vcodec png -i \"" . $videofile . "\" -ss " . $time . " -vframes 1 -f image2 \"" . $image . "\"%d.png");
}


function debug($text1, $text2)
{
print "<pre>\n";
print $text1 . $text2 . "\n";
print "</pre>\n";
}

?>


JW Player

User  
0 rated :

thanks, but that was not what i had in mind.
first, we run a java environment, and second, it seems a bit overblown to create an image serverside of the first frame of the movie.
My choice would sooner be to just let the movie play for a sec, and then pause it.

But actually i had expected this as a standard feature. Not so, i guess...

regards,

Ernst

JW Player

User  
0 rated :

bc.. My choice would sooner be to just let the movie play for a sec, and then pause it.


If that's all you want to do, you can easily do that through the JavaScript API.

Search these forums, there are posts about how to autostart the player, then pause it. Mostly for the purpose of buffering or pre-loading, but it also does display the frame that you pause on.

The purpose of creating an image, either statically, then stored on the server, or dynamically, is to have an image available for other purposes, such as use in an HTML playlist or mouseover, or many other things.

JW Player

User  
0 rated :

Hello,

This subject is very interesting but I don't understand how to use that exactly...

Where must I put this code : bc.. s1.addVariable('image', 'http://my.domain.com/path-to-file/ffmpeg_image.php?file=video.flv&time=00:00:00&browser=false');
?

Thanks

JW Player

User  
0 rated :

Basic player HTML page code:
bc.. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">

<html lang="en">

<head>

<title>Basic JW Player</title>

<script type="text/javascript" src="swfobject.js"></script>

<script type='text/javascript'>
function createPlayer()
{
var s1 = new SWFObject('http://my.domain.com/mediaplayer.swf', 'playlist', '475', '508', '7');
s1.addParam('allowfullscreen', 'true');
s1.addVariable('width', '475');
s1.addVariable('height', '508');
s1.addVariable('displayheight', '350');
* s1.addVariable('image', 'http://my.domain.com/path-to-file/ffmpeg_image.php?file=video.flv&time=00:00:00&browser=false');*
//s1.addVariable('file', 'http://my.domain.com/playlist.xml');
//s1.addVariable('overstretch', 'true'); // expands to fit h & v "true" -will stretch them proportionally to fill the display
s1.addVariable('overstretch', 'false'); // expands to fit h or v "false" -will stretch them to fit
//s1.addVariable('overstretch', 'fit'); // expands to fit h & v "fit" -will stretch them disproportionally to fit both height and width
//s1.addVariable('overstretch', 'none'); // displays native size "none" -will show all items in their original dimensions
s1.addVariable('showdigits', 'true');
s1.addVariable('autostart', 'true');
s1.addVariable('shuffle', 'false');
s1.addVariable('repeat', 'list');
s1.addVariable('showicons', 'true');
s1.addVariable('thumbsinplaylist', 'true');
s1.addVariable('logo', 'http://my.domain.com/logo.png');
s1.addVariable('backcolor', '0xFFFFFF'); // face of buttons
s1.addVariable('frontcolor', '0x404040'); // button symbols & playlist text
s1.addVariable('lightcolor', '0x808080'); // highlighted playlist item
s1.addVariable('screencolor', '0x000000'); // screen background color
s1.write('player');
};
</script>

</head>

<body onload="createPlayer();">

<div id="player">
<a href="http://www.macromedia.com/go/getflashplayer">Get the Flash Plugin</a>
to see this video.
</div>

</body>

</html>


See the bold line... :)

Adjust *"my.domain.com"* to your doamin, the other parameters, such as size, to your desired player appearance and behavior.

JW Player

User  
0 rated :

You also need this line of code:
bc.. s1.addVariable('file', 'http://my.domain.com/video.flv');


JW Player

User  
0 rated :

salam
can someone tell me how can i extract first frame from FLV movie using PHP and also tell me plz the sequence of the code where i paste it

JW Player

User  
0 rated :

It's all in this thread in the posts above. :)

JW Player

User  
0 rated :

I'm thinking if you can't read you might want to give up on this sam. :)

JW Player

User  
0 rated :

Here's another script I found while looking around...
http://www.iepak.com/30/topicdetail.aspx

JW Player

User  
0 rated :

Hi, i think this is a very useful trick to display "poster" image of an flv file. But can it work with an avi file? And wha is ffmpeg anyway? Is it a software?

JW Player

User  
0 rated :

@will

can the script be used in an <embed> code?
can it be used like all flashvars, in an xml config script?

JW Player

User  
0 rated :

grg

JW Player

User  
0 rated :

Found this thread since I too am too lazy to provide a preview image everytime I upload a new flv. Struggled a bit since calling 'playpause' directly after swfobject write will throw a js error. But I finally got it to work. Haven't fully tested it with multiple players but I think it should work.

In addition to the js sendEvent and thisMovie methods, add this:

bc.. var bPause = false;
var aJwFlvAutoStop = new Array();
function getUpdate(typ,pr1,pr2,swf) {
//$("#movmsg").append(typ+" "+pr1+" "+pr2+" "+swf+"<br/>");
var bPresent = false;
var iNr = -1;
for (var i=0;i<aJwFlvAutoStop.length;i++) {
if (aJwFlvAutoStop[i][0]==swf) {
bPresent = true;
iNr = i;
}
}
if (!bPresent) {
aJwFlvAutoStop.push([swf,false]);
iNr = aJwFlvAutoStop.length-1;
}
bPaused = aJwFlvAutoStop[iNr][1];
if (!bPaused&&typ=="load"&&parseInt(pr1)>0) {
//$("#movmsg").append("-pause-<br/>");
sendEvent(swf,"playpause");
aJwFlvAutoStop[iNr][1] = true;
}
}


This will wait for the movie to load before pausing it. Needless to say: make sure the player has autoplay and enablejs set to true.

ps: the commented lines are some jquery outputs for you to see what is happening, you can safely delete these.

JW Player

User  
0 rated :

Just notice with multiple movies and emptying cache it will not always work. Change the last if statement tobc.. if (!bPaused&&typ=="state"&&pr1=="2") {
to stop it a moment later.

JW Player

User  
0 rated :

@jeroen @will @andersen

I tried this method of displaying frame 1 of the video as per above code. It is not working???

My Code
=======
<script type="text/javascript">
var currentPosition;
var currentVolume;
var currentItem;
var bPause = false;
var aJwFlvAutoStop = new Array();
function sendEvent(typ,prm) { thisMovie("mpl").sendEvent(typ,prm); };
function getUpdate(typ,pr1,pr2,pid) {
if(typ == "time") { currentPosition = pr1; }
else if(typ == "volume") { currentVolume = pr1; }
else if(typ == "item") { currentItem = pr1; setTimeout("(currentItem)",100); }
var id = document.getElementById(typ);
id.innerHTML = typ+ ": "+Math.round(pr1);
pr2 == undefined ? null: id.innerHTML += ", "+Math.round(pr2);
if(pid != "null") {
document.getElementById("pid").innerHTML = "(received from the player with id _"+pid+"_)";
}
};
function loadFile(obj) { thisMovie("mpl").loadFile(obj); };
function addItem(obj,idx) { thisMovie("mpl").addItem(obj,idx); }
function removeItem(idx) { thisMovie("mpl").removeItem(idx); }
function getItemData(idx) {
var obj = thisMovie("mpl").itemData(idx);
var nodes = "";
for(var i in obj) {
nodes += "<li>"+i+": "+obj[i]+"</li>";
}
document.getElementById("data").innerHTML = nodes;
};
function thisMovie(movieName) {
if(navigator.appName.indexOf("Microsoft") != -1) {
return window[movieName];
} else {
return document[movieName];
}
};


function getUpdate(typ,pr1,pr2,swf) {
//$("#movmsg").append(typ+" "+pr1+" "+pr2+" "+swf+"<br/>");
var bPresent = false;
var iNr = -1;
for (var i=0;i<aJwFlvAutoStop.length;i++) {
if (aJwFlvAutoStop[i][0]==swf) {
bPresent = true;
iNr = i;
}
}
if (!bPresent) {
aJwFlvAutoStop.push([swf,false]);
iNr = aJwFlvAutoStop.length-1;
}
bPaused = aJwFlvAutoStop[iNr][1];
if (!bPaused&&typ=="load"&&parseInt(pr1)>0) {
//$("#movmsg").append("-pause-<br/>");
sendEvent(swf,"playpause");
aJwFlvAutoStop[iNr][1] = true;
}
}
</script>
</head>
===================
//body

<div id="player">This text will be replaced</div>
<script type="text/javascript">
var so = new SWFObject('mediaplayer.swf','mpl','400','250','8');
so.addParam('allowscriptaccess','always');
so.addParam('allowfullscreen','true');
so.addParam("menu","false");
so.addVariable('height','250');
so.addVariable('width','400');
so.addVariable('logo','images/logo.jpg');
so.addVariable('file','video/video1.flv');
so.addVariable("lightcolor","0xE8E4E4");
so.addVariable("backcolor","0x4E4C4C");
so.addVariable("frontcolor","0xE7E7E7");
so.addVariable('bufferlength','3');
so.addVariable('overstretch','true');
so.addVariable('thumbsinplaylist','false');
so.addVariable('shuffle','false');
so.addVariable('autostart','true');
so.addVariable("enablejs","true");
so.addVariable("javascriptid","mpl");
so.write('player');
</script>
</div>

Please help me to get this working as creating image files for hundreds of movies is cumbersome. Thanx in adavnce :)

Kathy

JW Player

User  
0 rated :

Ya got too many getUpdate()s in that mess. Which one ya wanna use?

JW Player

User  
0 rated :

function getUpdate(typ,pr1,pr2,swf) {

referred by Sjeiti in his thread above....

JW Player

User  
0 rated :

This forum seems to be dead...

JW Player

User  
0 rated :

We're all at the beach!

JW Player

User  
0 rated :

Did anyone actually get the Javascipt here working? Mine doesn't - it just starts to play the video, doesn't stop nor display just the opening few milliseconds of the video.

JW Player

User  
0 rated :

In this thread, you can see the proper way to pause a player.

[url=http://www.jeroenwijering.com/?thread=9109#msg54136]*DELAY THE START OF MY VIDEO FOR BETTER STREAMING*[/url]

You're never going to pause the movie in the opening milliseconds, it takes 100s of milliseconds for things to happen in JavaScript. You can experiment with the delay time as low as 50ms, but it is erratic and unpredictable. You can't send the player a pause command until you have confirmed that it is playing (otherwise your image will never appear), then it takes approximately 100 milliseconds for the player to respond.

JW Player

User  
0 rated :

It would be nice if there was a way to retrieve the current frame number currently being displayed instead of having to do a conversion of time. The problem I have noticed in doing this is if there are 20 FPS and I receive a time of 2 seconds from the player. I can calculate the the first frame of that second which would be 40. There are 19 other frames that could currently be shown in the player though (41-59). In my case I have a button to which uses the getUpdate function to retrieve the time and does an Ajax request to generate a new Video Still frame and update a panel with the new generated image. They do not always match up.

I noticed in the code above you were using ffmpeg and php to generate a poster image. There is a php extension also out there called ffmpeg-php (http://ffmpeg-php.sourceforge.net/). Here is a function I use to generate stills in PHP

bc.. /**
* _createStill
* This will create a new still image based on the current seconds passed.
*
* @param string $sVideoPath
* Path to the flv on the server
* @param int $nSeconds
* Number of seconds to seek to
* @return string $sImagePath
* This still path on the server.
*/
function _createStill($sVideoPath, $nSeconds)
{
if(!PEAR::loadExtension("ffmpeg")) {
throw new Exception(
'Could not load ffmpeg extension!'
);
}

if(!PEAR::loadExtension("gd")) {
throw new Exception(
'Could not load gd extension!'
);
}

$oMovie = new ffmpeg_movie($sVideoPath);
if(is_null($oMovie)){
throw new Exception(
'FFMPEG failed to load the movie file'
);
}

if($nSeconds == 0){
$nSeconds = 1;
}

// $nFrameRate = $oMovie->getFrameRate();
$nFrameRate = 20; // JW Player uses 20FPS
$nFrameNum = floor($nFrameRate * $nSeconds);

if(!$oFrame = $oMovie->getFrame($nFrameNum)){
throw new Exception(
'Could not get stil frame from movie'
);
}else{
$oImage = $oFrame->toGDImage();
$sImgFile = "[your image path]";
imagejpeg($oImage, $sImgFile);
return $sImgFile;
}
}





JW Player

User  
0 rated :

The default *playheadUpdateInterval* is 250ms ([url=http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/fl/video/VideoPlayer.html]*VideoPlayer*[/url]). Searching through the ActionScript source, I don't see anywhere that the *playheadUpdateInterval* is set to some other value, therefore, the best resolution that you can get from the player is 250ms.

ffmpeg-php would be nice to have available. Unfortunately, the latest Windows builds are mid-2005; whereas the latest ffmpeg Windows binaries are: *ffmpeg.rev12572.7z 24-Mar-2008 21:11 2.5M*.

JW Player

User  
0 rated :

Before I ask my question, I should mention: I don't know PHP, Javascript, or actionscript. I can't develop or code flash... That being said, we're using this player (works great), and we need to figure out a way to throw a poster frame on the player (autostart being off), the frame being about halfway through the video.

The problem is, we don't have any flv files. We submit .movs to a fancy schmancy streaming flash server (rtmpe). As far as I'm concerned, magic happens to it at that point, and we end up with a flash video online. So basically, in our .fla of the player, we call up the rtmpe address of the .mov, and when you embed the swf of the player, the magic happens and we have a flash video.

So, this being the case, how can I give our embedded video a poster frame, seeing as there's no flv involved in the process?

JW Player

User  
0 rated :

@Thomas - play the .mov once before uploading - make a screen copy, save as .jpg or .png - and use this as preview image by setting the image flashvar...

JW Player

User  
0 rated :

I've already got a preview png. Remember that I'm a lost cause in figuring this stuff out - you'll have to babystep me through this. How do I set the image flashvar?

To recap: I have an swf object embedded in an html page. The swf was made from an fla that specifies a .mov located on a flash streaming server. The video works, but when you turn autoplay off, it loads with just a black screen for a background.
So is there a simple way for me to set my png as the poster image? Babysteps please: for I am a hopeless noob.

JW Player

User  
0 rated :

here's all the javascript in the embedded video right now:

<script type="text/javascript">
var s1 = new SWFObject("assets/flash/player.swf","mediaplayer","720","480","9.0.98", "#000000");
s1.addParam("allowfullscreen","true");
s1.addVariable("autostart","false");
s1.write("container");
</script>

So, here are my questions, specifically:

Where do I need to put the .png file - in the same directory as the "player.swf"?
What exactly do I need to add to my javascript here to make my .png a working poster image for this video, assuming my png is now located in the proper directory?

Keep in mind that this particular player.swf is ONLY used for this one specific video. We don't use it anywhere else. As I mentioned, the swf specifies the location of the .mov's location on the flash streaming server.

Hopefully this is just something simple like

s.addVariable("image",posterimage.png);

(I have no idea what the hell I'm writing, just taking a stab in the dark).

JW Player

User  
0 rated :

@Thomas - the posterimage.png can be anywhere you like (online) as long as you write the full address in the image line:

s.addVariable("image", "http://thomas_website.com/subdiretory/etc/etc/posterimage.png");

(dont forget the " )

i was wondering where you tell the player which video to play? have you modified the player and hardcoded the videoname?

JW Player

User  
0 rated :

anderson:

Yes, our programmer (not me personally, as I'm useless with this stuff) altered the .fla of the player to include a link to our streaming server, then exported a new .swf.

and thanks, I'll try adding a line to the code. When I attempted it the other day it didn't work out. but looking at it again, I think I had my syntax wrong (a semicolon instead of a comma, etc). I won't get to fix it up until next week, but I really appreciate the help!

JW Player

User  
0 rated :

All good so far,

Do I have to use an "image" variable though? Can I not just show the frame it's on?

I have got my video set to NOT auto-play, and I am telling it to seek to the nth second in, using the javascript "sendEvent".

The idea then is that it just shows the video, stopped, at that frame. Is that possible?

Thanks

JW Player

User  
0 rated :

Can somebody help me out. I want to show the first frame as a preview. How can I do that with this code? Thanks.

AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0','width','320','height','266','src','../../images/franzese','quality','high','pluginspage','http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash','movie','../../images/franzese' ); //end AC code
</script><noscript><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="320" height="266">
<param name="movie" value="../../images/franzese.swf" />
<param name="quality" value="high" />
<embed src="../../images/franzese.swf" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="320" height="266"></embed>

JW Player

User  
0 rated :

There is no way to stop on the first frame. Anyway, the first frame in most video files is usually blank.

The best that you can do is to PAUSE on the first keyframe, which might be 3 to 5 seconds into the video, depending on the keyframe parameter that was selected when the video was encoded. To do that, you need to use the JavaScript API to send the player a PAUSE command as soon as the player is loaded (state=0).

JW Player

User  
0 rated :

How would I do that with the code I've submitted? I am new at this. Thanks.

JW Player

User  
0 rated :

Unless you're on one of the social networking sites that restrict you to object/embed code, I would very highly recommend that you use swfobject v2.0 which is the most up-to-date method of embedding Flash.
bc.. <!DOCTYPEHTMLPUBLIC"-//W3C//DTDHTML4.01//EN""http://www.w3.org/TR/html4/strict.dtd">

<htmllang="en">

<head>

<title>BasicJWFLVMediaPlayer-JavaScriptAPI-swfobjectv2.0-pause-on-first-keyframe</title>

<styletype="text/css">
div.playercontainer
{
position:absolute;
top:200px;
left:350px;
width:320px;
height:266px;
}
</style>

<scripttype="text/javascript"src="http://my.domain.com/path/swfobject-2.0.js"></script>

<!--inlinescript#1-JWFLVMediaPlayer-->
<scripttype="text/javascript">
varplayItem=null;
varfile=null;

functioncreatePlayer()
{
varflashvars=
{
width:'320',
height:'266',
displayheight:'246',
//overstretch:'true',//expandstofith&v"true"-willstretchthemproportionallytofillthedisplay
overstretch:'false',//expandstofithorv"false"-willstretchthemtofit
//overstretch:'fit',//expandstofith&v"fit"-willstretchthemdisproportionallytofitbothheightandwidth
//overstretch:'none',//displaysnativesize"none"-willshowallitemsintheiroriginaldimensions
autostart:'true',
//shuffle:'false',
//repeat:'list',
showstop:'true',
showicons:'true',
showdigits:'true',
//thumbsinplaylist:'true',
logo:'http://my.domain.com/path/logo.png',
enablejs:'true',
javascriptid:'mpl',
searchbar:'false',
backcolor:'0xFFFFFF',//faceofbuttons
frontcolor:'0x404040',//buttonsymbols&playlisttext
lightcolor:'0x808080',//highlightedplaylistitem
screencolor:'0x000000'//screenbackgroundcolor
};

varparams=
{
menu:'false',
allowfullscreen:'true',
swliveconnect:'true'
};

varattributes=
{
id:'mpl',
name:'mpl'
};

if(!(file=swfobject.getQueryParamValue('playlist')))
{
//usedefaultplaylistorfile
flashvars.file='http://my.domain.com/path/playlist.xml';
}

/*
if(!(playItem=swfobject.getQueryParamValue('item')))
{
//usedefaultitem1
playItem='1';
}
*/

swfobject.embedSWF('http://my.domain.com/path/mediaplayer.swf','player','320','266','9.0.124',false,flashvars,params,attributes);

};
</script>

<!--inlinescript#1-JavaScriptAPI-->
<scripttype="text/javascript">
varcurrentPosition;
varcurrentVolume;
varcurrentItem;
varcurrentPid;
varplayerPaused=false;

functionsendEvent(swf,typ,prm)
{
thisMovie(swf).sendEvent(typ,prm);
};

functionloadFile(swf,obj)
{
thisMovie(swf).loadFile(obj);
};

functionaddItem(swf,obj,idx)
{
thisMovie(swf).addItem(obj,idx);
};

functionremoveItem(swf,idx)
{
thisMovie(swf).removeItem(idx);
};

*functiongetUpdate(typ,pr1,pr2,pid)
{
if(typ=='state')
{
if((pr1==2)&&(!playerPaused))
{
sendEvent('mpl','playpause');
playerPaused=true;
}*

/*
//...toplayaspecificitemusinggetQueryParamValue('item')
if((pr1==0)&&(playItem!=null)&&(playItem<thisMovie(pid).getLength()))
{
sendEvent('mpl','playitem',(playItem-1));
playItem=null;
}
*/

/*
if(pr1==3)
{
//dropoutoffullscreen
this.window.focus();

//loadanewpage
//window.location='http://www.google.com';
}
*/

}
elseif(typ=='time')
{
currentPosition=pr1;
}
elseif(typ=='volume')
{
currentVolume=pr1;
}
elseif(typ=='item')
{
currentItem=pr1;
setTimeout("getItemData(currentItem)",100);
}

/*
if(pid!='null')
{
document.getElementById('pid').innerHTML='Player*_'+pid+'_*Status:';
}
varid=document.getElementById(typ);
pr2==undefined?pr2Value='':pr2Value=','+Math.round(pr2);
id.innerHTML='<li>'+typ+':'+Math.round(pr1)+pr2Value+'</li>';
*/

};

/*
functiongetItemData(idx)
{
varobj=thisMovie('mpl').itemData(idx);
varnodes='';
for(variinobj)
{
nodes+='<li>'+i+':'+obj[i]+'</li>';
}
d=document.getElementById('data');
d.innerHTML=nodes;
};
*/

functionthisMovie(movieName)
{
returndocument.getElementsByName(movieName)[0];
};
</script>

</head>

<bodyonload="createPlayer();">

<divid="playercontainer"class="playercontainer">
<aid="player"class="player"href="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash">Upgrade yourAdobeFlashPlayertoseethisvideo.</a>
</div>

<!--
<divid="pid">
PID
</div>
<divid="state">
State
</div>
<divid="time">
Time
</div>
<divid="data">
Data
</div>
-->

</body>

</html>

JW Player

User  
0 rated :

Hey Everyone,

I'm working with the code below, and trying to get a posterimage. I followed the monkey tutorial, and it works locally, but does not work on my server. Any suggestions? Here is the flash html:

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>cb_1</title>
<script language="javascript">AC_FL_RunContent = 0;</script>
<script src="AC_RunActiveContent.js" language="javascript"></script>
</head>
<body bgcolor="#000000">
<!--url's used in the movie-->
<!--text used in the movie-->
<!-- saved from url=(0013)about:internet -->
<script language="javascript">
if (AC_FL_RunContent == 0) {
alert("This page requires AC_RunActiveContent.js.");
} else {
AC_FL_RunContent(
'codebase', 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0',
'width', '416',
'height', '234',
'src', 'cb_1',
'quality', 'high',
'pluginspage', 'http://www.macromedia.com/go/getflashplayer',
'align', 'middle',
'play', 'true',
'loop', 'true',
'scale', 'showall',
'wmode', 'window',
'devicefont', 'false',
'id', 'cb_1',
'bgcolor', '#000000',
'name', 'cb_1',
'menu', 'true',
'allowFullScreen', 'false',
'allowScriptAccess','sameDomain',
'movie', 'cb_1',
'salign', ''
); //end AC code
}
</script>
<noscript>
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="416" height="234" id="cb_1" align="middle">
<param name="allowScriptAccess" value="sameDomain" />
<param name="allowFullScreen" value="false" />
<param name="movie" value="cb_1.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#000000" /> <embed src="cb_1.swf" quality="high" bgcolor="#000000" width="416" height="234" name="cb_1" align="middle" allowScriptAccess="sameDomain" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object>
</noscript>
</body>
</html>

This question has received the maximum number of answers.