I've been searching the forums and cannot find a simple answer to this question.
I have ONE video player in ONE player - and want it to redirect to another page on the web afterward. That's it.
I've found scripts that are 20 pages long for php and all sorts of things. Is there a relatively simple way to redirect to a new web page after the video plays?
Your help is GREATLY appreciated in advance. Thank you.
The header script of course has the jwplayer.js in it. This script works and the video plays perfectly. At the end it doesn't redirect - I tried adding a part of your script... the part that says:
I'm not a sophisticated coder but I've been reading all the forums and trying every scenario. I still can't get this to work. The video plays fine, but no redirect at the end. Can someone take a look at this code and see what I'm doing wrong? I'm sure it's some small thing.
bc.. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <title>Port of Houston Authority</title> <script type='text/javascript' src='swfobject.js'> var player = null; function playerReady(obj) { player = document.getElementsByName(obj.id)[0]; player.addModelListener('STATE', 'stateMonitor'); }; function stateMonitor(obj) { if(obj.newstate == 'COMPLETED') { document.location.href = "http://pharila12reception.eventbrite.com/"; } }; </script> </head>
<script type='text/javascript'> var so = new SWFObject('player.swf','mpl','720','405','9'); so.addParam('allowfullscreen','true'); so.addParam('allowscriptaccess','always'); so.addParam('wmode','opaque'); so.addVariable('file','http://www.portofhouston.com/rila/files/PHA_720x405.flv'); so.addVariable('controlbar','none'); so.addVariable('autostart','true'); so.write('mediaspace'); </script>