Dave Rottino
Dave Rottino

Reputation: 1047

jwplayer events not firing

In the process of updating the video player for this website and I'm running into a problem. Can't get the event to fire on completion of the movie. Tried all the embedding options and scoured the API faq and forums. Does anyone know why this is not working. May want to peek at the source code. It's not pretty in there, but someone may see a conflict. I've checked the console.log in Firebug and it came up with no errors. Thanks in advance.

Dave

www.friedmanllp.com/home3.php

                <script type="text/javascript">
                    jwplayer('mediaplayer').setup({
                        flashplayer: 'video/intro.swf',
                        id: 'playerID',
                        width: '545',
                        height: '380',
                        autostart: true,
                        events: {
                            onComplete: function(e) {
                                alert('Works');
                            }
                        }
                    });
                </script>   

Upvotes: 1

Views: 6251

Answers (2)

Collin Price
Collin Price

Reputation: 5850

I just had the same issue. The fix I found was to make sure the flashplayer and jwplayer.js urls are on the same domain as the page being loaded. If they do not match the video will still play but events do not fire.

Upvotes: 0

Wasim Karani
Wasim Karani

Reputation: 8886

Try without e in onComplete event. For reference Check this out

             <script type="text/javascript">
                jwplayer('mediaplayer').setup({
                    flashplayer: 'video/intro.swf',
                    id: 'playerID',
                    width: '545',
                    height: '380',
                    autostart: true,
                    events: {
                        onComplete: function() {
                            alert('Works');
                        }
                    }
                });
            </script>

Upvotes: 1

Related Questions