5e3804082030270e9f0243b6.png


‘),
link: “https://www.rt.com/news/479938-horde-locusts-saudi-arabia/”
},
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-5e3803b185f54040992f0ee4’; // id текущего плеера
pauseMedia(playingVideoId); //запускаем функцию остановки всех играющих плееров кроме этого Код функции ниже по коду

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

if (mediaplayerContainer5e3803b185f54040992f0ee4) {
mediaplayerContainer5e3803b185f54040992f0ee4.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 (recomedationBlock5e3803b185f54040992f0ee4) {
recomedationBlock5e3803b185f54040992f0ee4.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);
}

var $video = $(‘#js-mediaplayer-5e3803b185f54040992f0ee4 video’);
$video[0].loop = true;
// $video[0].currentTime = 0;
$video[0].play();

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

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

About the Author:

Leave a Reply