How to redirect JWP...
Clear all

How to redirect JWPlayer video after it finishes playing

380433b0c0305034cd333db1e6823e78?s=110&d=identicon&r=x - Forum
Member Admin

The trick to making the redirect work is to create a separate tag for the on.complete function.

So let's say this is your video code:

<div id="myElement"></div>
<script type="text/javascript">
file: '',
image: '//',
title: 'Vic Dorfman Music',
width: '100%',
aspectratio: '16:9',
controls: 'false',
autostart: 'true'

*(replace with the URL of your video file or the URL of a YouTube video)

Embed this video code as is, WITHOUT the on.complete function inside the snippet.

Then embed a separate snippet below it like so:

<script type="text/javascript">
jwplayer().onComplete(function() {window.location = "";});

As long as you separate these two Javascript snippets the redirect will work fine.

Make sure to replace above with your redirect URL.

When your video ends, the visitor will be redirect to this URL.

Topic starter Posted : 02/06/2015 6:20 am