Nov. 05, 2009Emma paypal waiting
I have been using some very excellent code by mimi which seems to have stopped working with the latest swfobject or player - not sure which.
mimi coded in this thread
http://www.longtailvideo.com/support/forum/Setup-Problems/16501/Live-RMTP-stream-with-an-image-placeholder-#msg111980
and the code is below. Can anyone see what is wrong
http://www.mrsc.co.uk/flash/player.php
Fix this, make it work for me and post your email and I'll send you paypal $50 if you want - I'm in trouble
<script type="text/javascript">
var player = null;
var playlist = null;
var startFlag = true;
function playerReady(obj)
{
player = gid(obj.id);
addListeners();
};
function addListeners()
{
playlist = player.getPlaylist();
if(playlist !== null)
{
player.addModelListener('TIME', 'timeMonitor');
loopie();
}
else
{
setTimeout("addListeners()", 100);
}
};
function timeMonitor(obj)
{
if((obj.position > 0) && (!startFlag))
{
startFlag = true;
}
};
function loopie()
{
if(!startFlag)
{
player.sendEvent('PLAY', 'true');
setTimeout("loopie()", 5000);
}
};
function gid(name)
{
return document.getElementById(name);
};
</script>
Here are some helpful links to learn more about the JW Player™:
Earn money with ads from LongTail's AdSolution. Watch our demos and sign up now!
If you don’t buy a commercial license, you cannot use a JW Player™ on (i) a site that has ads; (ii) a corporate site; or a (iii) CMS. Our licenses are very inexpensive, so what are you waiting for? Buy a license today.