project Websites / videos.bentasker.co.uk avatar

Websites / videos.bentasker.co.uk: 07a47833




In hindsight, that was a bit silly - use a different function name for the video info gathering.

In hindsight, that was a bit silly - use a different function name for the video info gathering.

Otherwise, on a page that has page analytics, we may end up colliding

Commit 07a47833.

Authored 2021-12-27T11:30:55.000+00:00 by B Tasker in project Websites / videos.bentasker.co.uk

+2 lines -2 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
# @@ -259,7 +259,7 @@ function writePlayer(vidid,playerSettings){
# var s = cE('script');
# s.setAttribute('type','text/javascript');
# ss = "window.player" + vidid +" = videojs('BensVideo" + vidid + "',\"{'fluid':true}\", function onPlayerReady(){console.log('Player Ready'); submit(gatherInfo(window.player" + vidid + ".currentSrc().split('?')[0],'ready'))});";
# - ss += "window.player" + vidid + ".on('playing', function() {submit(gatherInfo(window.player" + vidid + ".currentSrc().split('?')[0],'playing'))});";
# + ss += "window.player" + vidid + ".on('playing', function() {submit(BensVidgatherInfo(window.player" + vidid + ".currentSrc().split('?')[0],'playing'))});";
# s.innerHTML = ss;
#
#
# @@ -524,7 +524,7 @@ function BenswriteSchemaOrg(text,storage,url){
# * Usage for videos is: submit(gatherInfo(vid))
# *
# */
# -function gatherInfo(vid, state){
# +function BensVidgatherInfo(vid, state){
# var tz = new Date().getTimezoneOffset();
#
# return {
#