project Websites / videos.bentasker.co.uk avatar

Websites / videos.bentasker.co.uk: 9f37ce02




Whitepsace tidy

Whitepsace tidy

Commit 9f37ce02.

Authored 2022-03-11T18:53:26.000+00:00 by B Tasker in project Websites / videos.bentasker.co.uk

+9 lines -34 lines

Commit Signature

Changes

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
# v0.18
# */
#
# -
# 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";
# break;
#
# -
# case 'avi':
# return 'video/avi';
# break;
# @@ -175,7 +170,6 @@ function prepareVars(vidurl){
#
# /* Legacy embed */
# function embedBensPlayer(vidurl,vidtype){
# -
# ret = prepareVars(vidurl);
# vidtype = ret[0]
# vidid = ret[1]
# @@ -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;
#
# -
# var xmlhttp;
# 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
# - // if not needed
# - /*
# - var e = cE('script');
# - e.setAttribute('type','text/javascript');
# - e.setAttribute('src',window.BensPD + 'resources/js/playlist/videojs-playlist.js');
# - c.appendChild(e);
# - */
#
# // 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
# var d = cE('div');
# 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'))});";
# s.innerHTML = ss;
#
# -
# c.appendChild(s);
#
# // 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); };
# }
# c.appendChild(e);
# -
# }
#
#
# @@ -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)
# - }else{
# - errcallback(xmlhttp.responseText)
# - }
# -
# -} }
# -
# + if(xmlhttp.status==200){
# + callback(xmlhttp.responseText,storage,url)
# + }else{
# + errcallback(xmlhttp.responseText)
# + }
# + }
# + }
# xmlhttp.open("GET",url,true);
# xmlhttp.send();
# }
# @@ -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){
# d.appendChild(m);
# }
#
# -
# var m = cE('meta');
# m.setAttribute('itemprop','playerType');
# m.setAttribute('content','html5');
# - d.appendChild(m);
# -
# + d.appendChild(m);
# }
#
#
#