Last active
September 20, 2016 18:30
-
-
Save msukmanowsky/2ba49b9e531370dc1d3ce5d1fefd9e8b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script src="http://content.jwplatform.com/libraries/2SJ3KAcS.js"></script> | |
<div id="embed_container">Loading the player...</div> | |
<script type="text/javascript"> | |
var player = jwplayer("embed_container"); | |
player.setup({ | |
file: "http://content.jwplatform.com/videos/xxxxxxxx.mp4", | |
image: "http://content.jwplatform.com/thumbs/xxxxxxxx.jpg", | |
mediaid: "myvideoid12345", | |
width: 640, | |
height: 360, | |
title: 'Basic Video Embed', | |
description: 'A video with a basic title and description!' | |
}); | |
player.on('ready', function() { | |
player.on("play", function(){ | |
var playlistItem = player.getPlaylistItem(player.getPlaylistIndex()); | |
PARSELY.video.trackPlay( | |
playlistItem.mediaid, | |
{ | |
// required | |
title: playlistItem.title, | |
// recommended | |
image_url: playlistItem.image, | |
section: "My Video's Section", | |
pub_date_tmsp: 1474393968763, // milliseconds since unix epoch | |
// optional | |
tags: ["mytag1", "mytag2"], | |
authors: ["My Video's Author"] | |
}); | |
}); | |
player.on("pause", function(){ | |
var playlistItem = player.getPlaylistItem(player.getPlaylistIndex()); | |
PARSELY.video.trackPause(playlistItem.mediaid); | |
}); | |
player.on("stop", function(){ | |
var playlistItem = player.getPlaylistItem(player.getPlaylistIndex()); | |
PARSELY.video.trackPause(playlistItem.mediaid); | |
}); | |
}); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment