Skip to content

Instantly share code, notes, and snippets.

@giannif
Last active December 12, 2015 09:59
Show Gist options
  • Save giannif/4755496 to your computer and use it in GitHub Desktop.
Save giannif/4755496 to your computer and use it in GitHub Desktop.
Endslate
(function() {
"use strict";
var player = window.MTVNPlayer.getPlayers()[0];
// this is required because the flash player doesn't emit a config event yet.
if(!player.config.module) {
player.config.module = {};
}
player.config.formFactorID = prompt("formFactorID"); // change this to test different form factors.
// adjust these urls to your liking.
player.config.module.endslate = {
"$": {
shim: true,
url: "http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"
},
"mtvn-util": "http://media.mtvnservices.com/player/api/module/mtvn-util/latest/mtvn-util.min.js",
"endslate-css": "http://media.mtvnservices.com/player/api/module/endslate/latest/style.css",
"endslate": "http://media.mtvnservices.com/player/api/module/endslate/latest/endslate.min.js"
};
player.trigger("endslate", {
upNext: {
items: player.playlistMetadata.items
}
});
})();
@giannif
Copy link
Author

giannif commented Feb 12, 2013

This needs to be used with at least embed api 2.7.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment