‘),
link: “https://www.rt.com/news/478754-opcw-whistleblower-un-douma/”
},
events: {
onReady: function () {

if(ga && mediaMute === false) {
ga(‘send’, ‘event’, ‘JWPLAYER-GA’, ‘CLICK PLAY’, location.href);
ga(‘send’, ‘event’, ‘JW Player Article’, ‘Ready’, location.href); // Временно эти дублирующие счетчики остаются
}
},
onPlay: function () {

myStreamingTag.playVideoContentPart(metadata);
if (ga) {
if (mediaMute === false) {
ga(‘send’, ‘event’, ‘JWPLAYER-GA’, ‘CLICK PLAY’, location.href);
ga(‘send’, ‘event’, ‘JW Player Article’, ‘Play’, location.href);
}
}
var playingVideoId = ‘js-mediaplayer-5e2654882030277b520c32fc’; // id текущего плеера
pauseMedia(playingVideoId); //запускаем функцию остановки всех играющих плееров кроме этого Код функции ниже по коду

if (recomedationBlock5e2654882030277b520c32fc) {
recomedationBlock5e2654882030277b520c32fc.classList.remove(‘recomendation_active’);
}

if (mediaplayerContainer5e2654882030277b520c32fc) {
mediaplayerContainer5e2654882030277b520c32fc.classList.add(‘mediaplayer_played’);
}
localStorage.setItem(‘canfixed’, true);
},
onPause: function () {
myStreamingTag.stop();
if (mediaMute === false) {
if (ga) ga(‘send’, ‘event’, ‘JWPLAYER-GA’, ‘CLICK PAUSE’, location.href);
}

if (recomedationBlock5e2654882030277b520c32fc) {
recomedationBlock5e2654882030277b520c32fc.classList.add(‘recomendation_active’);
}
},
onComplete: function () {
myStreamingTag.stop();
if (ga && mediaMute === false) {
ga(‘send’, ‘event’, ‘JWPLAYER-GA’, ‘COMPLETE’, location.href);
ga(‘send’, ‘event’, ‘JW Player Article’, ‘Complete’, location.href);
}

if (recomedationBlock5e2654882030277b520c32fc) {
recomedationBlock5e2654882030277b520c32fc.classList.add(‘recomendation_active’);
}
}
}
});

jwplayer(“js-mediaplayer-5e2654882030277b520c32fc”).addButton(
“https://www.rt.com/static/libs/jwplayer/img/download.png”,
“Download”,
function () {
window.location.href = “https://cdnv.rt.com/files/2020.01/5e2654882030277b520c32fc.mp4?download=1”;
},
“download”
);

function pauseMedia(playingMediaId) {
var players = document.querySelectorAll(‘.jwplayer, object’);
var fixPlayer = document.querySelector(‘.mediaplayer_fixed’);
let shadowDiv = document.querySelector(‘.div_shadow’);
var plId = playingMediaId.split(‘-‘)[2];

for (var i = 0, max = players.length; i

Source link