Централна прогноза

document.addEventListener(“DOMContentLoaded”, function () {
canAutoplay
.video({timeout: 1500, muted: true})
.then(function (response) {

let autoplayAllowed = true;
let autoplayMute = true;

// Options
let playerOptions = {
autoplay: autoplayAllowed,
responsive: true,
fluid: true,
language: ‘bg’,
muted: autoplayMute,
};

// Initialize player
let player = videojs(“video-375614”, playerOptions);

let imaOptions = {
adTagUrl: ‘https://www.bgonair.bg/video/playerjs/vmap.xml?d=137&p=article%3D394882%26category%3D187%26tags%3D&t=1758037385’,
adLabel: “Реклама”,
adLabelNofN: “от”,
showCountdown: true,
locale: “bg”,
preventLateAdStart: true,
muted: autoplayMute,
};

// IMA Plugin set options
player.ima(imaOptions);

var shareOptions = {
socials: [],

url: window.location.href,
//title: ”,
//description: ”,

image: ‘https://video2.ibg.bg/image/640×360/375614.jpg’,

// required for Facebook and Messenger
// fbAppId: ”,
// optional for Facebook
redirectUri: window.location.href + ‘#close’,

// optinal embed code
embedCode: “”
};

player.share(shareOptions);

// Analytics Plugin
player.analytics({
defaultAudioCategory: ‘Audio’,
defaultVideoCategory: ‘Video’,
mode: ‘GTAG’,
events: [
{
name: ‘play’,
label: ‘video play’,
action: ‘play’,
},
{
name: ‘pause’,
label: ‘video pause’,
action: ‘pause’,
},
{
name: ‘ended’,
label: ‘video ended’,
action: ‘ended’,
},
{
name: ‘fullscreenchange’,
label: {
open: ‘video fullscreen open’,
exit: ‘video fullscreen exit’
},
action: ‘fullscreen change’,
},
{
name: ‘volumechange’,
label: ‘volume changed’,
action: ‘volume changed’,
},
{
name: ‘resize’,
label: ‘resize’,
action: ‘resize’,
},
{
name: ‘error’,
label: ‘error’,
action: ‘error’,
},
{
name: ‘resolutionchange’,
action: ‘resolution change’,
},
{
name: ‘timeupdate’,
action: ‘time updated’,
}
]
});

});
});

Leave a Reply

Your email address will not be published. Required fields are marked *