Go
Not registered? Sign up!

playerReady flat out does not work

Google Translate
3 posts | return to the JavaScript Interaction forum | get the rss feed for this thread

Oct. 23, 2009Jeff

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>

Oct. 23, 2009Jeff

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.

Oct. 23, 2009hobbs

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=8ec9ea851cee2c5b

Add a reaction

You can also return to the category or try this search for related threads.


 

Search the Forums

Go

Support

Support Here are some helpful links to learn more about the JW Player™:

Monetize Your Video

Monetize Your Video Earn money with ads from LongTail's AdSolution. Watch our demos and sign up now!

Why Buy a License?

Why Buy a License? If you don’t buy a commercial license, you cannot use a JW Player™ on (i) a site that has ads; (ii) a corporate site; or a (iii) CMS. Our licenses are very inexpensive, so what are you waiting for? Buy a license today.