diff --git a/resources/embed/embed.js b/resources/embed/embed.js
--- a/resources/embed/embed.js
+++ b/resources/embed/embed.js
#
@@ -8,7 +8,6 @@ Loads in player (basically videoJS and plugins) Javascript and writes a videoobj
#
window.BensPlayerInstances = (window.BensPlayerInstances === undefined) ? [] : window.BensPlayerInstances;
#
window.BensPD='https://videos.bentasker.co.uk/';
#
window.BensPlayerDomain='https://videos.bentasker.co.uk/';
#
@@ -21,7 +20,6 @@ window.BensPlayerDomainTor='http://dnkpodkuqowld7pnmpt5droubfzgv7tziz2fbiuufpvoc
#
window.BensPDI2P='http://bapmqkdc7xotvlym3bj75gdb4tlgg2poezkmz36w64qum4racpyq.b32.i2p/';
#
window.BensPlayerDomainI2P='http://bapmqkdc7xotvlym3bj75gdb4tlgg2poezkmz36w64qum4racpyq.b32.i2p/';
#
window.playerloadQueued = (window.playerloadQueued === undefined) ? 0 : window.window.playerloadQueued;
#
@@ -29,7 +27,6 @@ function cE(t){
#
return document.createElement(t);
#
// From https://stackoverflow.com/a/19757717
#
document.write=function(s){
#
var scripts = document.getElementsByTagName('script');
#
@@ -50,7 +47,6 @@ function doDocumentReady(fn){
#
function guessMimeFromUrl(vidurl){
#
/* VID-14: If a mimetype wasn't provided, try and figure it out from the url
#
@@ -74,7 +70,6 @@ function guessMimeFromUrl(vidurl){
#
return "application/x-mpegURL";
#
@@ -175,7 +170,6 @@ function prepareVars(vidurl){
#
function embedBensPlayer(vidurl,vidtype){
#
ret = prepareVars(vidurl);
#
@@ -238,7 +232,6 @@ function getBensToken(vidid,playerSettings){
#
var vurl = encodeURIComponent(playerSettings['vidurl'].replace(window.BensPD,''));
#
var url = window.BensPD + "token_endpoint?ref="+ref+"&vidpath="+vurl;
#
if (window.XMLHttpRequest){
#
// code for IE7+, Firefox, Chrome, Opera, Safari
#
@@ -283,24 +276,11 @@ function getBensToken(vidid,playerSettings){
#
function writePlayer(vidid,playerSettings){
#
- // TODO: Be good to make this one conditional. Detect whether we've either been passed a list, or a M3U file and not load playlist
#
- var e = cE('script');
#
- e.setAttribute('type','text/javascript');
#
- e.setAttribute('src',window.BensPD + 'resources/js/playlist/videojs-playlist.js');
#
// Get the width of our parent container to set video width later
#
var c = document.getElementById('BensplayerWrapper'+vidid);
#
var width = c.parentNode.clientWidth
#
// Now start setting up the player itself
#
d.id = "videowrapper"+vidid;
#
@@ -328,7 +308,6 @@ function writePlayer(vidid,playerSettings){
#
ss += "window.player" + vidid + ".on('playing', function() {submit(BensVidgatherInfo(window.player" + vidid + ".currentSrc().split('?')[0],'playing'))});";
#
// VID-9 check for metadata and write schema.org markup if it exists
#
@@ -349,7 +328,6 @@ function loadVJS(vidid,playerSettings){
#
e.onload = function () { writePlayer(vidid,playerSettings); };
#
@@ -375,14 +353,13 @@ function fetchPage(url,callback,errcallback,storage){
#
xmlhttp.onreadystatechange=function(){
#
if (xmlhttp.readyState==4){
#
- if(xmlhttp.status==200){
#
- callback(xmlhttp.responseText,storage,url)
#
- errcallback(xmlhttp.responseText)
#
+ if(xmlhttp.status==200){
#
+ callback(xmlhttp.responseText,storage,url)
#
+ errcallback(xmlhttp.responseText)
#
xmlhttp.open("GET",url,true);
#
@@ -401,7 +378,7 @@ function embedFailedNotif(vidid){
#
function BenswriteSchemaOrg(text,storage,url){
#
+ // Write scheme.org microdata into the page
#
if (!text || !storage || !url){
#
// Bail out and do nothing, it's not that important
#
@@ -441,12 +418,10 @@ function BenswriteSchemaOrg(text,storage,url){
#
m.setAttribute('itemprop','playerType');
#
m.setAttribute('content','html5');