rankingCoach #1 Digital Marketing App for SMBs
Hear from our customers
{ if (!window[‘videojs’]) { console.warn(‘You did not load the javascript files required for video.js’); return; } if (!window[‘VideoJs’]) { // TODO move this from here window[‘VideoJs’] = { ids: [“510aff9bbb789d5fd4e7”], players: [], videoNames: {}, api: function (selector) { const found = document.querySelectorAll(`[data-video-player-selector=’${selector}’]`); let video = null; let videoJsEl = null; const first = found[0]; window[‘first’] = first; if (first) { video = $(first).querySelector(‘video’); } if (video) { videoJsEl = videojs(video); } return videoJsEl; }, populatePlayers: function () { const toRemove = []; this.players = this.ids.map((id) => { let player = null; try { player = videojs(id); } catch (e) { toRemove.push(id); console.warn(‘player does not exist in dom anymore’); } return player; }).filter(x => !!x) this.ids = this.ids.filter(x => toRemove.indexOf(x) { player.pause(); }) }, playAll: function () { this.populatePlayers(); this.players.forEach((player) => { player.play(); }) } } } else { window[‘VideoJs’][‘ids’].push(“510aff9bbb789d5fd4e7”); } let width = “undefined”; let height = “undefined”; let isYoutube = Boolean(1); let playsInline = Boolean(false); // sanitization over conversion from php width = width === ‘undefined’ ? undefined : width; height = height === ‘undefined’ ? undefined : height; const hideControlBar = false; const inactivityTimeout = 1000; const controlBar = hideControlBar ? false : { pictureInPictureToggle: false } const options = { src: “a3orlioTvv0#t=0.1”, autoplay: Boolean(1), controls: true, height: height, width: width, loop: Boolean(1), muted: Boolean(1), poster: “”, preload: “auto”, fluid: 1, // 0 means yes I want to play inline!!! playsinline: playsInline ? 0 : 1, controlBar: controlBar, inactivityTimeout: inactivityTimeout, } if (isYoutube) { options.techOrder = [“youtube”]; options.sources = [{“type”: “video/youtube”, “src”: “https://www.youtube-nocookie.com/watch?v=a3orlioTvv0”}], options.youtube = {modestbranding: 1, rel: 0, jsapi: 1, showinfo: 0, autohide: 1, enablePrivacyEnhancedMode: 1} delete options.src; } const element = document.getElementById(“510aff9bbb789d5fd4e7”); if (element) { element.style.width = width + ‘px’; element.style.height = height + ‘px’; window[‘test’] = element; const video = videojs(element, options); const videoName = “testimonialVideo” const id = “510aff9bbb789d5fd4e7” if (videoName) { VideoJs.videoNames[videoName] = video; } else { VideoJs.videoNames[id] = video; } } })(); ]]>
{ if (!window[‘videojs’]) { console.warn(‘You did not load the javascript files required for video.js’); return; } if (!window[‘VideoJs’]) { // TODO move this from here window[‘VideoJs’] = { ids: [“1a00c4796f7ce1829aa0”], players: [], videoNames: {}, api: function (selector) { const found = document.querySelectorAll(`[data-video-player-selector=’${selector}’]`); let video = null; let videoJsEl = null; const first = found[0]; window[‘first’] = first; if (first) { video = $(first).querySelector(‘video’); } if (video) { videoJsEl = videojs(video); } return videoJsEl; }, populatePlayers: function () { const toRemove = []; this.players = this.ids.map((id) => { let player = null; try { player = videojs(id); } catch (e) { toRemove.push(id); console.warn(‘player does not exist in dom anymore’); } return player; }).filter(x => !!x) this.ids = this.ids.filter(x => toRemove.indexOf(x) { player.pause(); }) }, playAll: function () { this.populatePlayers(); this.players.forEach((player) => { player.play(); }) } } } else { window[‘VideoJs’][‘ids’].push(“1a00c4796f7ce1829aa0”); } let width = “undefined”; let height = “undefined”; let isYoutube = Boolean(1); let playsInline = Boolean(1); // sanitization over conversion from php width = width === ‘undefined’ ? undefined : width; height = height === ‘undefined’ ? undefined : height; const hideControlBar = false; const inactivityTimeout = 1000; const controlBar = hideControlBar ? false : { pictureInPictureToggle: false } const options = { src: “a3orlioTvv0#t=0.1”, autoplay: Boolean(false), controls: true, height: height, width: width, loop: Boolean(1), muted: Boolean(1), poster: “”, preload: “auto”, fluid: 1, // 0 means yes I want to play inline!!! playsinline: playsInline ? 0 : 1, controlBar: controlBar, inactivityTimeout: inactivityTimeout, } if (isYoutube) { options.techOrder = [“youtube”]; options.sources = [{“type”: “video/youtube”, “src”: “https://www.youtube-nocookie.com/watch?v=a3orlioTvv0”}], options.youtube = {modestbranding: 1, rel: 0, jsapi: 1, showinfo: 0, autohide: 1, enablePrivacyEnhancedMode: 1} delete options.src; } const element = document.getElementById(“1a00c4796f7ce1829aa0”); if (element) { element.style.width = width + ‘px’; element.style.height = height + ‘px’; window[‘test’] = element; const video = videojs(element, options); const videoName = “testimonialVideoInline” const id = “1a00c4796f7ce1829aa0” if (videoName) { VideoJs.videoNames[videoName] = video; } else { VideoJs.videoNames[id] = video; } } })(); ]]>