Hello,
the following code produces some bug in IE and does not work.
However, I this code is correct and works well in other browsers
Thanks for feedback :)
Romain
the following code produces some bug in IE and does not work.
However, I this code is correct and works well in other browsers
<!doctype>
<html>
<head>
<script src="http://static.flowplayer.org/js/flowplayer-3.2.4.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js"></script>
</head>
<body>
<div id="player" style="width:500px;height:300px"></div>
<a href="#" onclick="renew();return false;">Renew the player</a>
<script type="text/javascript">
var n = 0;
var player;
function fill_player()
{
n++;
var wrapper_id = "wrapper"+n;
$('#player').append('<div id="'+wrapper_id+'"> </div>');
try{
player = flowplayer(wrapper_id, {
src: "http://releases.flowplayer.org/swf/flowplayer-3.2.5.swf"
},
{
clip: "video.mp4"
}
);
}
catch(err)
{
alert(err);
}
}
function renew()
{
if(typeof(player) != 'undefined' && typeof(player.unload) == 'function')
{
player.unload();
}
$('#player').empty();
fill_player();
}
$(document).ready(
function(){
fill_player();
}
);
</script>
</body>
</html>
Thanks for feedback :)
Romain