Order Now AdSolution Sign Up | Login » Bits on the Run Sign Up | Login »

Forums

/

playerReady flat out does not work

2 replies [Last post]

What the hell? I can't get even this simple example to work. The alert won't fire, nor will the api call telling the player to start:

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

<html lang="en">

<head>

<title>Simplest playerReady example</title>

<script type="text/javascript">

function playerReady(obj) {
alert('the videoplayer '+obj['id']+' has been instantiated');
player = document.getElementById(obj['id']);
player.sendEvent("PLAY","true");
};

</script>

</head>

<body>
<embed src="player.swf" id="player" name="player" width="300" height="300" allowscriptaccess="always" allowfullscreen="true" flashvars="file=video.flv" >
<body>

<html>

Finally figured out that JavaScript API won't work when browsing files locally. That should be noted in the page on the API page up top.

Before you find out the hard way that you can't load online files with an offline player and vice versa, along with hundreds of other limitations of the Adobe Flash Player, I suggest you read some of the Adobe Flash Player security documents here: http://www.google.com/#hl=en&source=hp&q=site%3Aadobe.com+flash+security&aq=f&aqi=&oq=&fp=8ec9ea851c...