// initialize jwplayer
var playerInstance = jwplayer (& # 39; player & # 39;); // player's dom elements
var playerContainerEl = document.querySelector (& # 39 ;. player-container & # 39;); // return the position of the video player from the top of the document
getElementOffsetTop (el) {function
var boundingClientRect = el.getBoundingClientRect ();
var bodyEl = document.body;
var docEl = document.documentElement;
var scrollTop = window.pageYOffset || docEl.scrollTop || bodyEl.scrollTop;
var clientTop = docEl.clientTop || bodyEl.clientTop || 0;
return Math.round (boundingClientRect.top + scrollTop – clientTop);
} // return the current scroll position y
function getScrollTop () {
var docEl = document.documentElement;
return (window.pageYOffset || docEl.scrollTop) – (docEl.clientTop || 0);
} // configure the jwplayer instance
playerInstance.setup ({
autostart: true,
playlist: & # 39; https: //cdn.jwplayer.com/v2/playlists/mYdavspX' ;,
primary: "html5",
setFullscreen: true,
width: 100% & # 39;
}); // when the instance of jwplayer is ready
playerInstance.on (& # 39; ready & # 39 ;, function () {
var config = playerInstance.getConfig ();
var utils = playerInstance.utils;
// get the height of the player element
var playerHeight = config.containerHeight;
// indicator that determines if the closure was clicked
closed var = true; // MODIFIED
// indicator that determines if the player is playing
var play = false; // ADDED
// event manager for when the close button is pressed
document.getElementsByClassName (& # 39; icon-close & # 39;)[0].addEventListener (& # 39 ;, click), () => {
closed = true;
onScrollViewHandler ();
});
playerInstance.on (play, function () {
closed = false;
play = true; // ADDED
}). on (pause), function () {
play = false; // ADDED
}). we ('adPlay', function () {
closed = false; // ADDED
play = true; // ADDED
}). we (& # 39; adPause & # 39 ;, function () {
play = false; // ADDED
}); // get the position of the player element at the top of the document
var playerOffsetTop = getElementOffsetTop (playerContainerEl); // set the drive container to match the height of the actual video element
playerContainerEl.style.height = playerHeight + & # 39; px & # 39 ;; // below, we handle the window scroll event without killing the performance.
function onScrollViewHandler () {
var minimized = getScrollTop ()> = playerOffsetTop; if (closed && minimized) {
minimized = false;
jwplayer (). pause ();
play = false; // ADDED
} else if (! minimized &&! playing) {
closed = true; // ADDED
}
utils.toggleClass (playerContainerEl, & # 39; player-minim & # 39; minimized);
// update the size of the player so that the controls are adjusted
playerInstance.resize ();
} // namespace to see if we're waiting for the end of setTimeout ()
var isScrollTimeout = false; // window onscroll event handler
window.onscroll = function () {
// ignore if we wait for a scroll update delay
if (isScrollTimeout) return;
// signal that a new waiting time will start
isScrollTimeout = true;
// otherwise, call the scroll event view handler
onScrollViewHandler ();
// set new timeout
setTimeout (function () {
// reset the wait time indicator to false (longer wait)
isScrollTimeout = false;
}, 80);
};});
David Vonderhaar said on Twitter late in the evening that he had been invited to disconnect from the world of Call of Duty day-to-day.
He says that this has been requested by someone whom he respects, and that he "respects" what he is told. Vahn also said that he respected the fact that he was asked to do this and that he meant "good luck to the heroes of the world of Call of Duty esports", including Hecz, Fwiz and Hastro.
Vahn gave even more information and retraced the memories of the past.
We contacted Activision for a comment. We will keep you informed when you learn more.