Order Now AdSolution Sign Up | Login » Bits on the Run Sign Up | Login »

Forums

/

BUFFER ModelListener doesn't work

7 replies [Last post]

hi, i have a prob:

<script type="text/javascript">
var player = null;
function playerReady(obj) {
player = document.getElementById(obj.id);
addL();
};
function addL() {
if (player) {
if (typeof player.addModelListener == 'function') {
player.addModelListener('STATE', 'stateL');
player.addModelListener('BUFFER', 'bufferL');
}
} else {
setTimeout('addL()', 100);
}
}
function bufferL(params) {
alert('DEBUG BUFFER PERCENTAGE '+params.percentage);
if (params.percentage == 100)
alert('delvid buf');
}
function stateL(params) {
if (params.newstate == 'COMPLETED')
alert('delvid sta');
}

window.onload = function() {
var so = new SWFObject('a.swf', 'pl', '720', '380', '9');
so.addParam('allowscriptaccess', 'always');
so.addParam('allowfullscreen', 'true');
so.addParam('flashvars', 'config=a.xml');
so.write('a');
};
</script>

the 'DEBUG'.. alert never shows, so the bufferL() never called
why and how can i solve?

thanks

Retreat backwards to a v4.6.341 player.

it's working, thank you!

BUT
i want to delete the php-generated temporary video after the playback ending or the user leaves the site.

please tell me how can i do this?!

thank you

Your server is generating that file - the player has no way to delete it.

ajax?

You can use AJAX to communicate with the server, but something on the server itself will have to delete the file.

This is not recommended as there is a huge security risk.

any idea?

This is not something we support