
Getting file parameter from a url link
Im trying to get jwplayer 6 to get its file parameter from a url link. This was possible with older version of the player but I cannot get it to work with jwplayer6.
The code that worked for the older player is as follows:
bc.. <html>
<head>
<title></title>
<style type="text/css">
#wrapper1 { position:absolute; left:64px; top:128px; width:320px; height:21px; background-color:#CCCC00; }
</style>
<script type="text/javascript" src="swfobject.js"></script>
<script type="text/javascript">
function deletePlayer(theWrapper, thePlaceholder, thePlayerId) {
swfobject.removeSWF(thePlayerId);
var tmp=document.getElementById(theWrapper);
if (tmp) { tmp.innerHTML = "<div id='" + thePlaceholder + "'></div>"; }
}
function createPlayer(thePlaceholder, thePlayerId, theWidth, theHeight, theFile, theImage, theLink, theLogo, theAutostart) {
var flashvars = {
config:"",
author:"",
captions:"",
description:"",
duration:"0",
file:theFile,
image:theImage,
link:theLink,
start:"0",
title:"",
type:"",
controlbar:"bottom",
logo:theLogo,
playlist:"none",
playlistsize:"180",
skin:"",
autostart:theAutostart,
bufferlength:"1",
displayclick:"play",
item:"0",
mute:"false",
quality:"true",
repeat:"none",
shuffle:"false",
stretching:"uniform",
volume:"90",
abouttext:"",
aboutlink:"",
linktarget:"_blank",
streamer:"",
tracecall:""
}
var params = {
allowfullscreen:"true",
allowscriptaccess:"always"
}
var attributes = {
id:thePlayerId,
name:thePlayerId
}
swfobject.embedSWF("player.swf", thePlaceholder, theWidth, theHeight, "9.0.115", false, flashvars, params, attributes);
}
function initPlayer(theFile, theImage, theLogo, theAutostart) {
deletePlayer('wrapper1', 'placeholder1', 'player1');
createPlayer('placeholder1', 'player1',
'320', '21',
theFile,
theImage,
'http://www.domain.com',
theLogo,
theAutostart)
}
</script>
<head>
<body onload="initPlayer('http://domain.com/files/test1.mp3', '','', false);">
<div id="wrapper1">
<div id="placeholder1"></div>
</div>
<a href="javascript:initPlayer('http://domain.com/files/test1.mp3', '', '', true);">Play audio 1</a><br>
<a href="javascript:initPlayer('http://domain.com/files/test2.mp3', '', '', true);">Play audio 2</a><br>
<a href="javascript:initPlayer('http://domain.com/files/test3.mp3', '', '', true);">Play audio 3</a><br>
</body>
</html>
Does anyone know how to get it to work in the same way with jwplayer6 using html5 instead of flash?
Thanks
BB
Thanks