Ingemar Stenmark var kanske ingen stor talar. Han bjöd inte på några långa utläggningar och journalisterna fick ofta dra ur svaren. Ändå har ”Stenis” levererat flera klassiska citat, som lever än i dag.
Här är de sju bästa.
.screen9-video-container{
margin-top: 32px;
margin-bottom: 32px;
}
(function (jQuery) {
let playerInitializing = false
function onVisibilityChange() {
var $container = jQuery('#video-71248-_fypKTXFTb54_kP_iKvGQQ');
if (isElementInViewport($container)){
if (!playerInitializing){
screen9_ajax_auth = "wteqk3FVvoaH69ojswoCRUN12lx-sDIgnrid5I-yAnpGcn2mZLJYXA";
let muted = true;
let options = {
autoplay: true,
muted: muted,
startTime: 0,
playsInline: true,
containerid: 'video-71248-_fypKTXFTb54_kP_iKvGQQ',
mediaid: '_fypKTXFTb54_kP_iKvGQQ',
};
let lastIsElementVisible;
screen9.api.embed(options, ({
player
}) => {
window.players['video-71248-_fypKTXFTb54_kP_iKvGQQ'] = player
console.log("screen9: loading Screen9 Player")
player.bind(screen9.player.Event.PLAYER_LOAD, () => {
console.log("screen9: video loaded");
})
player.bind(screen9.player.Event.PLAYER_RESUME, (e) => {
console.log("screen9: video resumed")
})
player.bind(screen9.player.Event.PLAYER_PAUSE, (e) => {
console.log("screen9: video paused")
})
player.bind(screen9.player.Event.AD_STARTED, (e) => {
console.log("screen9: ad loaded")
window.waitingForAd = false;
})
player.bind(screen9.player.Event.AD_ERROR, (e) => {
console.log("screen9: ad error!");
window.waitingForAd = false;
})
player.bind(screen9.player.Event.AD_REQUEST, (e) => {
console.log("screen9: ad request!");
window.waitingForAd = true;
lastIsElementVisible = window.isElementVisible;
})
player.bind(screen9.player.Event.AD_RESUME_CONTENT, (e) => {
console.log("screen9: ad resume content!")
window.stopContent = false;
if (window.isElementVisible !== lastIsElementVisible) {
if (window.isElementVisible) {
player.resume();
} else {
player.pause();
}
}
})
player.bind(screen9.player.Event.AD_PAUSE_CONTENT, (e) => {
console.log("screen9: ad pause content!")
})
player.bind(screen9.player.Event.AD_PAUSED, () => {
console.log("screen9: ad paused")
})
player.bind(screen9.player.Event.AD_RESUMED, () => {
console.log("screen9: ad resumed")
})
player.bind(screen9.player.Event.AD_COMPLETE, () => {
console.log("screen9: ad complete")
window.players['video-71248-_fypKTXFTb54_kP_iKvGQQ'].seek(0);
setTimeout(function(){window.player.resume();},500)
})
}, (error) => {
console.error("Something went wrong: " + error);
});
playerInitializing = true
}
}
if (window.players['video-71248-_fypKTXFTb54_kP_iKvGQQ'] && window.players['video-71248-_fypKTXFTb54_kP_iKvGQQ'].ready) {
window.isElementVisible = isElementInViewport($container);
if (window.isElementVisible){
if (window.waitingForAd) {
return;
}
window.players['video-71248-_fypKTXFTb54_kP_iKvGQQ'].resume()
} else {
if (window.waitingForAd) {
return;
}
window.players['video-71248-_fypKTXFTb54_kP_iKvGQQ'].pause()
}
}
}
function isElementInViewport(el) {
if (typeof jQuery === "function" && el instanceof jQuery) {
el = el[0];
}
var rect = el.getBoundingClientRect();
var windowHeight = window.innerHeight || document.documentElement.clientHeight;
return (
(rect.top >= 0 && rect.top = 0 && rect.bottom <= windowHeight)
);
}
jQuery(window).on('resize scroll', onVisibilityChange);
jQuery(window).on('DOMContentLoaded load', function () {
setTimeout(onVisibilityChange, 250);
});
})(window.jQuery)