开发者

I have a JW Player implementation that won't work 'locally'

开发者 https://www.devze.com 2023-01-07 12:56 出处:网络
Users run my HTML files locally, straight from a CD. I want to allow them to choose a bunch of videos and create a playlist on the fly.

Users run my HTML files locally, straight from a CD.

I want to allow them to choose a bunch of videos and create a playlist on the fly.

This works very well if I run a web server but when I run the HTML itself it fails.

The player is created (using swfobject) and all my other code runs but playerReady never fire开发者_StackOverflow中文版s so I can never get the current play list to add to it.

Any ideas on how I can fix this or, more likely, work around it?


If the player is created, but you're not getting a playerReady, one of two things could be happening.

  1. There's another playerReady on the page that's catching your playerReady. Make sure that there's just one playerReady on the page.
  2. You haven't enabled JavaScript access for Flash. The code for that would look like this:

SWFObject:

var so = new SWFObject('player.swf','ply','470','320','9','#000000');
so.addParam('allowfullscreen','true');
so.addParam('allowscriptaccess','always');
so.addParam('wmode','opaque');
so.addVariable('file','video.flv');
so.write('mediaspace');

I should also note that there are some additional Flash security restrictions because you're accessing the player from disk. Namely, you can't access both a disk source and a network source (the Internet) simultaneously.

Best,

Zach

Developer, LongTail Video

0

精彩评论

暂无评论...
验证码 换一张
取 消