correct js for embed bab player.
--- a/test/integration/integ_player_bab_ldt.html Thu May 10 18:11:46 2012 +0200
+++ b/test/integration/integ_player_bab_ldt.html Thu May 10 18:36:38 2012 +0200
@@ -1,1 +1,1 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="fr" xml:lang="fr">
<head>
<title>player_bab_ldt</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style type="text/css" media="screen">
html, body { height:100%; background-color: #990000;}
body { margin:0; padding:0; overflow:hidden; }
#flashContent { width:600px; height:420px; }
</style>
<script>
var player = null;
var output = null;
var progress = null;
function onBabPlayerReady(message)
{
player_p = document.getElementById("player_bab_ldt");
player = player_p.getElementsByTagName("embed")[0];
output = document.getElementById('demo_output');
progress = document.getElementById('demo_progress');
output_send('Player is ready !');
}
function onBabStateChange(t){
// States can be : seeking (3), paused (2), playing (1)
output_send("state = " + t);
}
function onBabVideoProgress(data)
{
progress.innerHTML = 'mediaTime: ' + data.mediaTime + ' s';
}
function output_send(message)
{
if (output)
{
output.value += "\n"+ message;
output.scrollTop = output.scrollHeight;
}
}
// External interface functions
function player_playVideo(){
if (player){
player.playVideo();
//output_send('call method: playVideo()');
}
}
function player_pauseVideo(){
if (player){
player.pauseVideo();
//output_send('call method: pauseVideo()');
}
}
function player_getCurrentTime(){
if (player){
var value = player.getCurrentTime();
output_send('call method: getCurrentTime() à ' + value);
}
}
function player_seekTo(){
if (player){
var time = Math.floor(Math.random() * 10);
player.seekTo(time);
//output_send('call method: seekTo(' + time + ')');
}
}
function player_isMuted(){
if (player){
var value = player.isMuted();
output_send('call method: isMuted() à ' + value);
}
}
function player_mute(){
if (player){
player.mute();
//output_send('call method: mute()');
}
}
function player_unMute(){
if (player){
player.unMute();
//output_send('call method: unMute()');
}
}
function player_setVolume(){
if (player){
// Entre 0 et 2
var volume = Math.random() * 2;
player.setVolume(volume);
output_send('call method: setVolume( ' + volume + ' )');
}
}
function player_getVolume(){
if (player){
var value = player.getVolume();
output_send('call method: getVolume() à ' + value);
}
}
</script>
</head>
<body>
<div id="flashContent">
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="550" height="400" id="player_bab_ldt" align="middle">
<param name="movie" value="../../assets/player_bab_ldt/player_bab_ldt.swf" />
<param name="quality" value="high" />
<param name="bgcolor" value="#ffffff" />
<param name="play" value="true" />
<param name="loop" value="true" />
<param name="wmode" value="transparent" />
<param name="scale" value="showall" />
<param name="menu" value="true" />
<param name="devicefont" value="false" />
<param name="salign" value="" />
<param name="allowScriptAccess" value="always" />
<param name="allowFullScreen" value="true" />
<param name="flashvars" value="urlData=fichiers_bab/yeelen_bab.ldt&urlSkin=fichiers_bab/SkinBoutABout.swf">
<embed src="../../assets/player_bab_ldt/player_bab_ldt.swf" quality="high" bgcolor="#869ca7"
width="500" height="375" name="ExternalInterfaceExample" align="middle"
play="true" loop="false" quality="high" allowScriptAccess="always"
type="application/x-shockwave-flash" allowFullScreen"true" wmode="transparent"
flashvars="urlData=fichiers_bab/yeelen_bab.ldt&urlSkin=fichiers_bab/SkinBoutABout.swf"
pluginspage="http://www.macromedia.com/go/getflashplayer">
</embed>
</object>
</div>
<div>
<input type="button" class="button" onclick="javascript:player_playVideo();" value="playVideo" />
<input type="button" class="button" onclick="javascript:player_pauseVideo();" value="pauseVideo" />
<input type="button" class="button" onclick="javascript:player_getCurrentTime();" value="getCurrentTime" />
<input type="button" class="button" onclick="javascript:player_seekTo();" value="seekTo" />
<input type="button" class="button" onclick="javascript:player_isMuted();" value="isMuted" />
<input type="button" class="button" onclick="javascript:player_mute();" value="mute" />
<input type="button" class="button" onclick="javascript:player_unMute();" value="unMute" />
<input type="button" class="button" onclick="javascript:player_getVolume();" value="getVolume" />
<input type="button" class="button" onclick="javascript:player_setVolume();" value="setVolume" />
<br/><textarea id="demo_output" rows="10" style="width:500px;"></textarea><textarea id="demo_progress" >bla</textarea>
</div>
</body>
</html>
\ No newline at end of file
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="fr" xml:lang="fr">
<head>
<title>player_bab_ldt</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style type="text/css" media="screen">
html, body { height:100%; background-color: #990000;}
body { margin:0; padding:0; overflow:hidden; }
#flashContent { width:600px; height:420px; }
</style>
<script>
var player = null;
var output = null;
var progress = null;
function onBabPlayerReady(message)
{
player_p = document.getElementById("player_bab_ldt");
player = player_p.getElementsByTagName("embed")[0];
output = document.getElementById('demo_output');
progress = document.getElementById('demo_progress');
output_send('Player is ready !');
}
function onBabStateChange(t){
// States can be : seeking (3), paused (2), playing (1)
output_send("state = " + t);
}
function onBabVideoProgress(data)
{
progress.value = 'mediaTime: ' + data.mediaTime + ' s';
}
function output_send(message)
{
if (output)
{
output.value += "\n"+ message;
output.scrollTop = output.scrollHeight;
}
}
// External interface functions
function player_playVideo(){
if (player){
player.playVideo();
//output_send('call method: playVideo()');
}
}
function player_pauseVideo(){
if (player){
player.pauseVideo();
//output_send('call method: pauseVideo()');
}
}
function player_getCurrentTime(){
if (player){
var value = player.getCurrentTime();
output_send('call method: getCurrentTime() à ' + value);
}
}
function player_seekTo(){
if (player){
var time = Math.floor(Math.random() * 10);
player.seekTo(time);
//output_send('call method: seekTo(' + time + ')');
}
}
function player_isMuted(){
if (player){
var value = player.isMuted();
output_send('call method: isMuted() à ' + value);
}
}
function player_mute(){
if (player){
player.mute();
//output_send('call method: mute()');
}
}
function player_unMute(){
if (player){
player.unMute();
//output_send('call method: unMute()');
}
}
function player_setVolume(){
if (player){
// Entre 0 et 2
var volume = Math.random() * 2;
player.setVolume(volume);
output_send('call method: setVolume( ' + volume + ' )');
}
}
function player_getVolume(){
if (player){
var value = player.getVolume();
output_send('call method: getVolume() à ' + value);
}
}
</script>
</head>
<body>
<div id="flashContent">
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="550" height="400" id="player_bab_ldt" align="middle">
<param name="movie" value="../../assets/player_bab_ldt/player_bab_ldt.swf" />
<param name="quality" value="high" />
<param name="bgcolor" value="#ffffff" />
<param name="play" value="true" />
<param name="loop" value="true" />
<param name="wmode" value="transparent" />
<param name="scale" value="showall" />
<param name="menu" value="true" />
<param name="devicefont" value="false" />
<param name="salign" value="" />
<param name="allowScriptAccess" value="always" />
<param name="allowFullScreen" value="true" />
<param name="flashvars" value="urlData=fichiers_bab/yeelen_bab.ldt&urlSkin=fichiers_bab/SkinBoutABout.swf">
<embed src="../../assets/player_bab_ldt/player_bab_ldt.swf" quality="high" bgcolor="#869ca7"
width="500" height="375" name="ExternalInterfaceExample" align="middle"
play="true" loop="false" quality="high" allowScriptAccess="always"
type="application/x-shockwave-flash" allowFullScreen"true" wmode="transparent"
flashvars="urlData=fichiers_bab/yeelen_bab.ldt&urlSkin=fichiers_bab/SkinBoutABout.swf"
pluginspage="http://www.macromedia.com/go/getflashplayer">
</embed>
</object>
</div>
<div>
<input type="button" class="button" onclick="javascript:player_playVideo();" value="playVideo" />
<input type="button" class="button" onclick="javascript:player_pauseVideo();" value="pauseVideo" />
<input type="button" class="button" onclick="javascript:player_getCurrentTime();" value="getCurrentTime" />
<input type="button" class="button" onclick="javascript:player_seekTo();" value="seekTo" />
<input type="button" class="button" onclick="javascript:player_isMuted();" value="isMuted" />
<input type="button" class="button" onclick="javascript:player_mute();" value="mute" />
<input type="button" class="button" onclick="javascript:player_unMute();" value="unMute" />
<input type="button" class="button" onclick="javascript:player_getVolume();" value="getVolume" />
<input type="button" class="button" onclick="javascript:player_setVolume();" value="setVolume" />
<br/><textarea id="demo_output" rows="10" style="width:500px;"></textarea><textarea id="demo_progress" >bla</textarea>
</div>
</body>
</html>
\ No newline at end of file