Ticket #1143 (closed bug: worksforme)
Callbacks are not being made in FF
| Reported by: | zach | Owned by: | zach |
|---|---|---|---|
| Priority: | Milestone: | Player 5.5 | |
| Component: | flash | Keywords: | |
| Cc: | Forum thread: | http://www.longtailvideo.com/support/forums/jw-player/javascript-interaction/15302/methods-not-available-for-player-object |
Description
FF for Windows isn't calling back the following:
var player;
function playerReady(obj) {
alert('the videoplayer '+obj['id']+' has been instantiated');
player = document.getElementById(obj['id']);
var string;
for (itm in player){
if (itm.indexOf("Listener") != -1) string += itm+'\n';
}
alert(string);
player.addModelListener("TIME", "stopPlayer");
};
function stopPlayer(obj) {
if (obj['position'] > 5){
player.sendEvent('STOP');
if (confirm("Not a member yet? Get a FREE account to be able to watch the full video!")) {
document.location="http://usurg.eu/yousurg/index.php?option=com_chronocontact&chronoformname=usertype";
}
else {
document.location="http://usurg.eu/yousurg/";
}
}
}}}}
Change History
comment:2 Changed 2 years ago by zach
- Status changed from assigned to closed
- Resolution set to worksforme
This code works:
<script type="text/javascript">
var player;
function playerReady(obj) {
//alert('the videoplayer ' + obj['id'] + ' has been instantiated');
player = document.getElementById(obj.id);
player.addModelListener("TIME", "stopPlayer");
};
function stopPlayer(obj) {
if (obj.position > 2) {
player.sendEvent('STOP');
if (confirm("Not a member yet? Get a FREE account to be able to watch the full video!")) {
// goes to registration page
} else {
// goes to homepage
}
}
}
</script>
Note: See
TracTickets for help on using
tickets.
