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

Local/offline playback (white screen)


I'm working on setting up a local, offline version of my website for developing/testing and am left with a JW Player issue. Here's the code:

<code> <div id='mediaspace'></div>
<script type="text/javascript">
jwplayer("mediaspace").setup({
flashplayer: "file:///c:/xampp/htdocs/TTP/jwplayer/player.swf",
file: "file:///c:/xampp/htdocs/20070417_aurora.mp4",
height: 504,
width: 720,
allowfullscreen: true,
allowscriptaccess: "always",
wmode: "opaque",
events: {
onPlay: function(event) {
var xmlHttp = getXMLHTTP();
xmlHttp.open("GET","sql/sendview.php?id=20070417_aurora",true);
xmlHttp.send();
}
}
});
</script><code>

Result: White box instead of player. If I use the player as online (that is, use "jwplayer/player.swf" for the player and "20070417_aurora.mp4" for the video file instead of the "file:///..." paths in above code) it plays back fine. Can anybody tell why using the offline notation does not work? I use Firefox and did switch local file access on. The "file:///" notation works fine elsewhere, just not with JW Player.

(The reason I want to use the "file:///" notation is that xampp is installed on an almost full SSD, so I want all the videos on a different drive and not inside the test site root folder.)

3 Community Answers

Ethan Feldman

JW Player Support Agent  
0 rated :

The API doesn’t work locally, that’s why.

JW Player

User  
0 rated :

That would explain it. :-) As far as I can tell using the API is necessary to register the number of views as I'm doing. Is local file access with the API something that upcoming versions of the player may support?

Ethan Feldman

JW Player Support Agent  
0 rated :

Unfortunately, it has to be in a web environment for it work.

This question has received the maximum number of answers.