SINCE 2023

VN99NEWS

VN99NEWS là website tổng hợp tin tức Việt Nam, cung cấp những thông tin tin tức mới nhất một cách nhanh chóng, tin cậy và đa dạng. Nó không chỉ tập trung vào các vấn đề trong nước ở Việt Nam mà còn cam kết đưa tiếng nói của Việt Nam ra trường quốc tế. Tên “VN99” “Trusted News from Vietnam in 99 Seconds”, nhấn mạnh cam kết của chúng tôi trong việc cung cấp tin tức đáng tin cậy trong một khoảng thời gian ngắn.

VN99NEWS

SINCE 2023

Giao thông Hà Nội hỗn loạn


Nước ngập từ sáng chưa rút, đến giờ tan tầm người dân rời công sở, đi đón con khiến nhiều tuyến phố vừa ngập vừa tắc, giao thông hỗn loạn, chiều 30/9.

var v_image_player_us=’‘;var v_event_article=’3909′;var v_event_no_us=’2201′;var v_ma_ten_video_khong_hien_thi_us=’cd_nivea_fifa,cd_nivea_affcup,cp_special_worldcup,cp_special_nation_leagues,cp_special_asian_cup_ban_quyen,cd_special_u22_dna,cp_special_chung_ket_c1_19,cp_special_copa_america,cp_special_icc_cup,cp_special_tennis_no_us,cd_nivea_nha,cp_special_seagames_ban_quyen,cp_special_u23_chau_a_ban_quyen,cp_special_ligue1,cp_special_laliga,cp_special_euro_ban_quyen,cp_special_grand_slam,cp_special_atp_1000,cp_special_c1_ban_quyen,cp_special_aff_ban_quyen,cp_special_ttcn_test,cp_special_24h_worldcup,cp_special_nu_worldcup,cp_special_bundesliga,cp_special_fa_cup,cp_special_u23_dna_ban_quyen,cp_special_asiad_ban_quyen,cp_special_vongloai_worldcup,cp_special_u19,cp_special_olympic,cp_special_fifa_club,cp_special_fpt_fifa_club’;var v_autoplay_bai_tuong_thuat= true;var v_cdn_domain = ‘https://cdn.24h.com.vn/’; var url_data_json_lives = ‘https://cdn.24h.com.vn/upload/html-live/live-11472.json?time=’; var v_so_giay_load_data_json_tuong_thuat=10000; window.addEventListener(‘load’, function(){_realtime_tuong_thuat(11472);});.liveCnt span[style^=”aspect-ratio”] {display: block;margin: 0 auto}.liveCnt span[style^=”aspect-ratio”] {display: block;margin: 0 auto}.liveCnt span[style^=”aspect-ratio”] {display: block;margin: 0 auto}.liveCnt span[style^=”aspect-ratio”] {display: block;margin: 0 auto}.liveCnt span[style^=”aspect-ratio”] {display: block;margin: 0 auto}.liveCnt span[style^=”aspect-ratio”] {display: block;margin: 0 auto}.liveCnt span[style^=”aspect-ratio”] {display: block;margin: 0 auto}.liveCnt span[style^=”aspect-ratio”] {display: block;margin: 0 auto}.liveCnt span[style^=”aspect-ratio”] {display: block;margin: 0 auto}.liveCnt span[style^=”aspect-ratio”] {display: block;margin: 0 auto}.liveCnt span[style^=”aspect-ratio”] {display: block;margin: 0 auto}.liveCnt span[style^=”aspect-ratio”] {display: block;margin: 0 auto}.liveCnt span[style^=”aspect-ratio”] {display: block;margin: 0 auto}.liveCnt span[style^=”aspect-ratio”] {display: block;margin: 0 auto}.liveCnt span[style^=”aspect-ratio”] {display: block;margin: 0 auto}.liveCnt span[style^=”aspect-ratio”] {display: block;margin: 0 auto}.liveCnt span[style^=”aspect-ratio”] {display: block;margin: 0 auto}.liveCnt span[style^=”aspect-ratio”] {display: block;margin: 0 auto}.liveCnt span[style^=”aspect-ratio”] {display: block;margin: 0 auto}.liveCnt span[style^=”aspect-ratio”] {display: block;margin: 0 auto}.liveCnt span[style^=”aspect-ratio”] {display: block;margin: 0 auto}.liveCnt span[style^=”aspect-ratio”] {display: block;margin: 0 auto}.liveCnt span[style^=”aspect-ratio”] {display: block;margin: 0 auto}.liveCnt span[style^=”aspect-ratio”] {display: block;margin: 0 auto}.liveCnt span[style^=”aspect-ratio”] {display: block;margin: 0 auto}.liveCnt span[style^=”aspect-ratio”] {display: block;margin: 0 auto}

Giao thông Hà Nội hỗn loạn - 1

Giao thông Hà Nội hỗn loạn - 2

Giao thông Hà Nội hỗn loạn - 3

Giao thông Hà Nội hỗn loạn - 4

Diễn biến

Mới nhất
Cũ nhất

Diễn biến chính

ĐÓNG

Mới nhất
Cũ nhất


19h10

Đi bộ 6 km về nhà

Rời cơ quan trên phố Thái Hà lúc 17h, chị Thu Hằng đợi hơn một tiếng nhưng không bắt được xe buýt về nhà ở Vĩnh Tuy nên quyết định đi bộ. Các tuyến phố xung quanh như Tây Sơn, Thái Hà nước ngập quá đầu gối. Trên đường qua Trường Chinh, Giải Phóng, chị thấy giao thông hỗn loạn, nhiều người đứng ven đường, dắt xe chết máy đi tìm chỗ sửa, không ít người cũng chọn đi bộ về nhà.

Một số đoạn đã hết ngập, chị định bắt xe buýt nhưng đành bỏ cuộc khi thấy chật kín người. Đến Minh Khai, tưởng đường đã thông, chị lại gặp cảnh tắc cứng từ đoạn cầu Vĩnh Tuy. Sau hơn hai tiếng đi bộ, chị Hằng về đến nhà trong tình trạng ướt sũng, mệt mỏi đến mức không muốn ăn uống. Đã nhiều lần trải qua cảnh ngập lụt, tắc đường, chị nhận xét “chưa bao giờ thấy hỗn loạn như hôm nay kể từ trận lụt năm 2008”.

Người dân đợi xe bus trên phố Thái Hà chiều 30/9. Ảnh: Thu Hằng

Người dân đợi xe bus trên phố Thái Hà chiều 30/9. Ảnh: Thu Hằng

//

//

// 0) {
// console.log(“AE volByCookie VAR : “+volByCookie);
vid_vol_var = volByCookie;
}
}
// console.log(“AE VIDVOL VAR : “+vid_vol_var);
var vidLoaded = false,
dynamicId,
vidId,
parentVid = “v-24hContainer_zplayer_66b891”,
videoElmStr = ‘

‘+
‘To view this video please enable JavaScript, and consider upgrading to a web browser that ‘+
supports HTML5 video ‘+
‘ ‘ +
”,
videozplayer_66b891,
videoAds1Conf = {
“poster”: “https://cdn.24h.com.vn/upload/3-2025/images/2025-09-30/1759235801-dibovenha_19h10.jpg”,

“offsetWatchPercent”: 20,
“stopOtherOnPlay”: true,
“parentVid”: parentVid,
“offHighlightOnBannerBottom”:false,
“vidErrorLog”: 1,
“skipAble”: true,
“skipTime”: 5000,
/*CDN_DOMAIN_HLS*/

“skipAdsBtnContent”: “Skip Ad”,
“showAdVol”: true,
“VIDEOID”: “zplayer_66b891”,
/*MINI_VIDEO*/
“viewportAutoPlay”: true,
“vidVol” : vid_vol_var,
//”adVolIncrease”: 0.25,
//”showVolIncreasement”:1,
//”adVol” : “0.15”,
“trackSlowMedia”:1,
“secondToLoadMedia”:3000,
“secondToLoadMeta”:3000,
“prerollTimeEnd” : 31,
“midrollTimeEnd” : 15,
“postrollTimeEnd” : 30,
“skipAdsBtnPos”: “bottom-left”,

“fastSeek”: {step: 5},
“userAgent”: “Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.7 Safari/605.1.15”,
“adLoadTimeout” : 8000

,”vastUri”: “https%3A%2F%2Fpubads.g.doubleclick.net%2Fgampad%2Fads%3Fsz%3D640x360%26iu%3D%2F124557882%2F24h%2Fus%2Fdesktop%2Fdaily_news%2Fpreroll%26impl%3Ds%26gdfp_req%3D1%26env%3Dvp%26output%3Dvast%26unviewed_position_start%3D1%26url%3Dhttps%253A%252F%252Fwww.24h.com.vn%252Ftin-tuc-trong-ngay%252Fgiao-thong-ha-noi-hon-loan-gio-tan-tam-vi-mua-lon-c46a1702162.html%26description_url%3Dhttps%253A%252F%252Fwww.24h.com.vn%252Ftin-tuc-trong-ngay%252Fgiao-thong-ha-noi-hon-loan-gio-tan-tam-vi-mua-lon-c46a1702162.html%26correlator%3D1759237330%26ambient%3D1%26plcmt%3D2″
,”vastUriPost” : “https%3A%2F%2Fpubads.g.doubleclick.net%2Fgampad%2Fads%3Fsz%3D528x297%26iu%3D%2F124557882%2F24h%2Fus%2Fdesktop%2Fdaily_news%2Fpostroll%26impl%3Ds%26gdfp_req%3D1%26env%3Dvp%26output%3Dvast%26unviewed_position_start%3D1%26url%3Dhttps%253A%252F%252Fwww.24h.com.vn%252Ftin-tuc-trong-ngay%252Fgiao-thong-ha-noi-hon-loan-gio-tan-tam-vi-mua-lon-c46a1702162.html%26description_url%3Dhttps%253A%252F%252Fwww.24h.com.vn%252Ftin-tuc-trong-ngay%252Fgiao-thong-ha-noi-hon-loan-gio-tan-tam-vi-mua-lon-c46a1702162.html%26correlator%3D1759237330%26ambient%3D1%26plcmt%3D2″
,”vastUriMid” : “https%3A%2F%2Fvideo.24h.com.vn%2Fupload%2Fhtml%2Ftempvast.xml”
,”midTime”: 10
/*FALL_BACK*/
/*PLAYLIST_ITEM*/
/*DRM_VIDEO*/

//{set_highlight_zplayer_html5}
/*ID_BANNER_SPONSOR*/
}
if (volByCookie != null) {
if (volByCookie <= 0) {
// console.log("AE volByCookie VAR set MUTED : "+volByCookie);
videoAds1Conf.muted = 1;
}
}
if(document.getElementById(parentVid).innerHTML.trim() == ""){
loadVidzplayer_66b891();
vidLoaded = true;
}

var count_time_update_zplayer_66b891 = 0;

function loadVidzplayer_66b891(){
dynamicId = new Date().valueOf();
vidId = "my-video-multiple1_"+dynamicId;
videoAds1Conf.VIDEOID = vidId;
if(vidLoaded==true){
videoAds1Conf.viewportAutoPlay = false;
}

var newVideStr = videoElmStr.replace(/__VIDIDzplayer_66b891__/g, vidId);

document.getElementById(parentVid).innerHTML = newVideStr;
if (typeof adBlockEnabled_Unique != "undefined"){
// XLCYCMHENG-42783 – player – async lib ima3 + multi video – fix bug adBlockEnabled không đồng nhất
adBlockEnabled = adBlockEnabled_Unique;
}
videozplayer_66b891 = new videoObj(videoAds1Conf);

// console.log("AE LOAD PLAYER");
// console.log(videoAds1Conf);
// console.log("AE THIS VOLUME LOAD PLAYER muted VAR :"+videoAds1Conf.muteByUser);
//console.log("AE THIS VOLUME LOAD PLAYER is muted :"+videozplayer_66b891.player.muted());
//console.log("AE THIS VOLUME LOAD PLAYER: "+videozplayer_66b891.player.volume());
//console.log("AE THIS VOLUME LOAD PLAYER CURRENT VOLUME : "+current_vol_zplayer_66b891);
if ((typeof(videoAds1Conf.muteByUser) != "undefined" && videoAds1Conf.muteByUser == 1) || (volByCookie != null && volByCookie 0) {
videoAds1Conf.vidVol = current_vol_zplayer_66b891;
videoAds1Conf.muteByUser = 0;
} else {
videoAds1Conf.muteByUser = 1;
videoAds1Conf.vidVol = 0;
}
var videoConf = videoAds1Conf;
videoConf.viewportAutoPlay = false;
// console.log(“AE videoConf: “, videoConf);
var element = document.getElementById(videoConf.VIDEOID);
// element.parentNode.removeChild(element);
// videozplayer_66b891 = undefined;
videozplayer_66b891.player.dispose();
loadVidzplayer_66b891();
});

videozplayer_66b891.player.on(“loadeddata”, function(){
// 20220224 fix lỗi không khởi tạo đc playerInitHeight
if (this.playerInitHeight <= 0){
this.playerInitHeight = Math.round(this.getById(this.VIDEOID).getBoundingClientRect().height)
this.dbglog("this.playerInitHeight: " + this.playerInitHeight)

this.playerHasSponsorInitHeight = Math.floor(this.getById(this.VIDEOID).getBoundingClientRect().height) – 1;// làm tròn xuống & -1
this.dbglog("this.playerHasSponsorInitHeight: " + this.playerHasSponsorInitHeight);
}
}.bind(videozplayer_66b891));

videozplayer_66b891.player.on("volumechange", function(){
var new_vd_volume = videozplayer_66b891.player.volume();
// console.log("AE volume change");
// console.log("AE THIS VOLUME AFTER CHANGE: "+videozplayer_66b891.player.volume());
// console.log("AE volume change is mute : "+videozplayer_66b891.player.muted());
var is_vd_muted = videozplayer_66b891.player.muted();
var check_set_cookie = false;
if (new_vd_volume 10) {
is_vd_muted = true;
}
if (is_vd_muted == true) {
// console.log(“AE is_vd_muted TRUE”);
if (current_vol_zplayer_66b891 > 0 && count_time_update_zplayer_66b891 > 10) {
check_set_cookie = true;
}
current_vol_zplayer_66b891 = 0;
videozplayer_66b891.player.muted(1);
setTimeout(function(){
videozplayer_66b891.player.muted(1);
},300);
} else {
// console.log(“AE is_vd_muted FALSE”);
if (volByCookie <= 0 && count_time_update_zplayer_66b891 < 5) {
check_set_cookie = false;
} else {
check_set_cookie = true;
}
current_vol_zplayer_66b891 = new_vd_volume;
}
// console.log("AE check_set_cookie: "+check_set_cookie);
if (check_set_cookie == true) {
setCookie("videoVolumeByUser", current_vol_zplayer_66b891, 30*24, "/", "24h.com.vn", "");// lưu cookie 30 ngày
// console.log("AE SET COOKIE");
} else {
// console.log("AE NOTTTT SET COOKIE");
}
// console.log("AE THIS VOLUME AFTER CHANGE LATER: "+current_vol_zplayer_66b891);
}.bind(videozplayer_66b891));

videozplayer_66b891.player.ready(function () {
// XLCYCMHENG-38546 – [24H] Tối ưu khoảng trống trên/dưới banner sponsor_video_top / sponsor_video_botton
if (this.idBannerBottom != ""){
let vidEl = this.getById(this.VIDEOID);
let vidHeight = vidEl.getBoundingClientRect().height;

// làm tròn xuống & -1 height div chứa player
let parentHeight = Math.floor(vidHeight) – 1;
vidEl.parentNode.style.height = parentHeight + "px";
vidEl.parentNode.style.overflowY = "hidden";

// căn player lùi lên 0.7px
vidEl.style.marginTop = "-0.7px";

// 20220110: fix lỗi khi xem chế độ theater
let style = document.createElement("style");
style.type = "text/css";
style.innerHTML = ".theaterDisplay .video-js.vjs-16-9{margin-top: 0px !important}";
document.getElementsByTagName("head")[0].appendChild(style);
}

// XLCYCMHENG-44429 – 24h – Lỗi giao diện khi thu nhỏ màn hình – lỗi chiều cao theaterMod khi zoom
if (this.theaterMod && this.theaterMod.height) {
let style = document.createElement("style");
style.type = "text/css";
style.innerHTML = ".theaterDisplay .video-js.vjs-16-9-custom.zoomed:not(.mini-player){padding-top: 0px !important}";
document.getElementsByTagName("head")[0].appendChild(style);
}

// bổ sung class zoomed-out / zoomed-in theo chế độ zoom thực tế
function updateVideoZoomState() {
let vidEl = this.getById(this.VIDEOID);

const zoom = Math.round(window.devicePixelRatio * 100);

vidEl.classList.remove("zoomed", "zoomed-out", "zoomed-in");
if (zoom != 100) {
vidEl.classList.add("zoomed", zoom chưa xử lý; > 0 -> item cần nhảy tới; đã xử lý xong
let playTimeResuming = 0; // 0 -> chưa xử lý; > 0 -> thời điểm cần nhảy tới; đã xử lý xong
let useStorage = true; // sử dụng Storage để lưu trữ – không bị giới hạn số lượng, dung lượng, thời gian; không bị gửi lên server khi request trang
let minDuration = 10;
let adsTimeResuming = 0;
let adsBefore = true;
// XLCYCMHENG-39918 – player – resume watching – manager keys
// Math.floor(Date.now() / 1000) -> thời gian hiện tại (giây) theo UTC
let timeLiveKey = 720;
let updatetimeKey = “player__resume_watching__updatetime”;

// lấy item + thời gian đã xem từ cookie
let watching = “”;

if (useStorage && typeof Storage !== “undefined”){
// XLCYCMHENG-39918 – player – resume watching – manager keys
// khai báo hàm lấy thời điểm cập nhật key
var player__resume_watching__updatetime__get = function (key) {
if (typeof key == “undefined” || !key){return 0;}

let default_time = (new Date(“2022-10-01 00:00:00”)).getTime(); // mặc định nếu không có thời điểm cập nhật cũ
let updatetime = default_time;
let updatetime_all_text = localStorage.getItem(updatetimeKey);
if (updatetime_all_text != “”){
try {
let updatetime_all_obj = JSON.parse(updatetime_all_text);
if (typeof updatetime_all_obj == “object” && updatetime_all_obj !== null && typeof updatetime_all_obj[key] != “undefined”){
updatetime = parseInt(updatetime_all_obj[key]);
if (isNaN(updatetime)){
updatetime = default_time;
}
}
} catch (err){}
}

return updatetime;
};

// XLCYCMHENG-39918 – player – resume watching – manager keys
// khai báo hàm lưu thời điểm cập nhật key
var player__resume_watching__updatetime__set = function (key, remove_key) {
if (typeof key == “undefined” || !key){return false;}

if (typeof remove_key == “undefined”){
remove_key = false;
}

let updatetime_all_obj = {};
let updatetime_all_text = localStorage.getItem(updatetimeKey);
if (updatetime_all_text != “”){
try {
updatetime_all_obj = JSON.parse(updatetime_all_text);
} catch (err){}
}
if (typeof updatetime_all_obj != “object” || updatetime_all_obj === null){
updatetime_all_obj = {};

// danh sách các key có trong localStorage
let arr_all_key = Object.keys(localStorage);
if (typeof arr_all_key == “object” && arr_all_key !== null){
try {
// các key lưu lịch sử xem tiếp cũ chưa từng được đưa vào danh sách thời điểm cập nhật
let arr_key = arr_all_key.filter(key => key.match(/player__resume_watching_(.*)/));
if (typeof arr_key == “object” && arr_key !== null){
for (let i in arr_key) {
updatetime_all_obj[arr_key[i]] = Math.floor(Date.now() / 1000);
}
}
} catch (err){}
}
}

if (!remove_key){// cập nhật thời điểm cập nhật
updatetime_all_obj[key] = Math.floor(Date.now() / 1000);

try {
localStorage.setItem(updatetimeKey, JSON.stringify(updatetime_all_obj));
} catch (err){
console.log(“player: => set localStorage updatetimeKey after update – error: ” + err.message);
}
} else if (typeof updatetime_all_obj[key] != “undefined”){// remove nếu có thời điểm cập nhật cũ
delete updatetime_all_obj[key];

try {
localStorage.setItem(updatetimeKey, JSON.stringify(updatetime_all_obj));
} catch (err){
console.log(“player: => set localStorage updatetimeKey after delete – error: ” + err.message);
}
}

return true;
};

// lấy lịch sử đang xem
watching = localStorage.getItem(cookieKey);

console.log(“player: => get localStorage resume watching: ” + watching);

// có key -> check hết hạn key thì xóa, không dùng
if (timeLiveKey > 0 && watching !== null && watching !== “”){
let updatetime = player__resume_watching__updatetime__get(cookieKey);
if (updatetime + 60 * 60 * timeLiveKey remove expires localStorage resume watching: ” + cookieKey);
} catch (err){
console.log(“player: => remove expires localStorage resume watching: ” + cookieKey + ” – error: ” + err.message);
}
}
}
} else {
watching = getCookie(cookieKey);

console.log(“player: => get cookie resume watching: ” + watching);
}

if (!watching || typeof watching != “string”){
watching = “”;
}

if (watching != “”){
let arr_watching = watching.split(“:”);
if (arr_watching.length >= 2){
let watchingItem = parseInt(arr_watching[0]);
let watchingTime = parseFloat(arr_watching[1]);

if (!isNaN(watchingItem) && watchingItem > 0){
playItemResuming = watchingItem;// lưu item cần nhảy tới khi bắt đầu chạy video
}

if (!isNaN(watchingTime) && watchingTime > 0){
playTimeResuming = watchingTime;// lưu thời gian cần nhảy tới khi bắt đầu chạy video

adsTimeResuming = watchingTime;// lưu thời gian quảng cáo cần xử lý
}

if (playItemResuming > 0 || playTimeResuming > 0){
if (playItemResuming > 0){
adsTimeResuming = 100000;// playlist xem từ item thứ 2 -> chặn luôn preroll và midroll
}

console.log(“player: => need resume watching to item:” + playItemResuming + “; time:” + playTimeResuming);
}
}
}

videozplayer_66b891.player.on([
“resume-watching”,
], function (e) {
if (minDuration > 0 && typeof this.tracking != “undefined” && typeof this.tracking.video != “undefined”){
let duration = 0;

if (typeof this.tracking.video.playlistTotalMins != “undefined”){
duration = this.tracking.video.playlistTotalMins;
}

if (typeof this.tracking.video.vidDuration != “undefined”){
duration = this.tracking.video.vidDuration;
}

if (duration > 0 && duration hủy cố gắng phát tiếp
playItemResuming = -1;
playTimeResuming = -1;
// hủy cố gắng chặn quảng cáo
adsTimeResuming = -1;
}
}

if (playItemResuming > 0 || playTimeResuming > 0){
let currentItem = this.isPlaylist ? this.player.playlist.currentItem() : 0;

if (playItemResuming > 0 && this.isPlaylist && this.player.playlist.lastIndex() > 0){
if (playItemResuming > this.player.playlist.lastIndex()){
playItemResuming %= (this.player.playlist.lastIndex() + 1);
}

if (this.player.playlist.currentItem() != playItemResuming){
this.player.playlist.currentItem(playItemResuming);// nhảy tới item

console.log(“player:event:” + e.type + ” => resume watching item:” + this.player.playlist.currentItem());
}
}

if (currentItem != playItemResuming && playTimeResuming > 0){
// hẹn trigger vào sự kiện play/loadeddata tiếp theo (sau khi load được item) -> thay đổi time sau
this.player.one([
“play”,
“loadeddata”,
], function (e) {
if (playItemResuming > 0 || playTimeResuming > 0){
console.log(“player:event:” + e.type + ” => triggerEvt:resume-watching”);

this.triggerEvt(“resume-watching”);
}
}.bind(this));

return;
}

if (playTimeResuming > 0){
this.player.currentTime(playTimeResuming);
}

playItem = this.isPlaylist ? this.player.playlist.currentItem() : 0;
playTime = this.player.currentTime();

console.log(“player:event:” + e.type + ” => resume watching item:” + playItem + “; time:” + playTime);

// kích hoạt sự kiện onPlay nếu chưa chạy để đảm bảo tracking
if (!this.getState(“sentPlay”) && !this.player.paused()) {
this.triggerEvt(“onPlay”);

console.log(“player:event:” + e.type + ” => triggerEvt:onPlay”);
}
}
}.bind(videozplayer_66b891));
videozplayer_66b891.player.one([
“play”,
“loadeddata”,
], function (e) {
if (playItemResuming > 0 || playTimeResuming > 0){
if (adsBefore){
let hasPreroll = false;

if (this.isPlaylist){
let currentItem = this.player.playlist.currentItem();
let currentItemSource = this.playlistConf;
let currentSrc = currentItemSource[currentItem].sources[0];

let adTag = typeof currentSrc != “undefined” && typeof currentSrc.adTagUrl != “undefined” ? currentSrc.adTagUrl : false;
if (!adTag || adTag === “”) {
adTag = this.tempVast;
}

hasPreroll = !adTag ? false : true;
} else {
let vastUri = this.vastUri;
if (!vastUri || vastUri === “”) {
vastUri = this.tempVast;
}

hasPreroll = !vastUri ? false : true;
}

if (hasPreroll){
this.handlePreroll();
} else {
console.log(“player:event:” + e.type + ” => triggerEvt:resume-watching”);

this.triggerEvt(“resume-watching”);
}
} else {
console.log(“player:event:” + e.type + ” => triggerEvt:resume-watching”);

this.triggerEvt(“resume-watching”);
}
}
}.bind(videozplayer_66b891));
videozplayer_66b891.player.one([
“adend”,
“adskip”,
“nopreroll”,
“adscanceled”,
“adserror”,
], function (e) {
if (playItemResuming > 0 || playTimeResuming > 0){
// hẹn trigger vào sự kiện playing tiếp theo
this.player.one([
“playing”,
], function (e) {
if (playItemResuming > 0 || playTimeResuming > 0){
console.log(“player:event:” + e.type + ” => triggerEvt:resume-watching”);

this.triggerEvt(“resume-watching”);
}
}.bind(this));
}
}.bind(videozplayer_66b891));
videozplayer_66b891.player.on(“timeupdated”, function (e) {
let currentItem = this.isPlaylist ? this.player.playlist.currentItem() : 0;
let currentTime = this.player.currentTime();

if (currentItem != playItem || Math.abs(currentTime – playTime) > 0.5){// lưu cookie khi có sai khác trên 0.5s
playItem = currentItem;
playTime = currentTime;

if (useStorage && typeof Storage !== “undefined”){
try {
localStorage.setItem(cookieKey, playItem+”:”+playTime);

// console.log(“player:event:” + e.type + ” => set localStorage resume watching to item:” + currentItem + “; time:” + currentTime);
} catch (err){
console.log(“player:event:” + e.type + ” => set localStorage resume watching to item:” + currentItem + “; time:” + currentTime + “; err:” + err.message);
}

// XLCYCMHENG-39918 – player – resume watching – manager keys
player__resume_watching__updatetime__set(cookieKey);
} else {
setCookie(cookieKey, currentItem+”:”+currentTime, (timeLiveKey > 0 ? timeLiveKey : 720), “/”, “24h.com.vn”, “”);

// console.log(“player:event:” + e.type + ” => set cookie resume watching to item:” + currentItem + “; time:” + currentTime);
}
}

if (playItemResuming > 0 || playTimeResuming > 0){
if (currentItem >= playItemResuming && currentTime >= playTimeResuming + 5){
// hủy cố gắng phát tiếp từ cookie khi đã resume thành công & chạy được 1 khoảng
playItemResuming = -1;
playTimeResuming = -1;
// hủy cố gắng chặn quảng cáo
adsTimeResuming = -1;
}
}

// kích hoạt sự kiện onPlay nếu chưa chạy để đảm bảo tracking
if (!this.getState(“sentPlay”) && !this.player.paused()) {
this.triggerEvt(“onPlay”);

console.log(“player:event:” + e.type + ” => triggerEvt:onPlay”);
}
}.bind(videozplayer_66b891));
videozplayer_66b891.player.on([
“seeking”,
“seeked”,
], function (e) {
// hủy cố gắng phát tiếp từ cookie khi user tự thay đổi thời gian xem
playItemResuming = -1;
playTimeResuming = -1;
// hủy cố gắng chặn quảng cáo
adsTimeResuming = -1;
});
videozplayer_66b891.player.on([
“endVid”,
“onPostRollStart”,
“videoended”,
], function (e) {
// hủy cố gắng phát tiếp từ cookie khi đã kết thúc
playItemResuming = -1;
playTimeResuming = -1;
// hủy cố gắng chặn quảng cáo
adsTimeResuming = -1;

playItem = 0;
playTime = 0;

// xóa thông tin lịch sử đang xem
if (useStorage && typeof Storage !== “undefined”){
try {
localStorage.removeItem(cookieKey);

console.log(“player:event:” + e.type + ” => remove localStorage resume watching”);
} catch (err){
console.log(“player:event:” + e.type + ” => remove localStorage resume watching – error: ” + err.message);
}

// XLCYCMHENG-39918 – player – resume watching – manager keys
player__resume_watching__updatetime__set(cookieKey, true);
} else {
setCookie(cookieKey, playItem+”:”+playTime, 1, “/”, “24h.com.vn”, “”);

console.log(“player:event:” + e.type + ” => remove cookie resume watching”);
}
});
videozplayer_66b891.player.on([
“readyforpreroll”,
], function (e) {
if (!adsBefore && adsTimeResuming > 0){
let closeAds = “”;

if (this.player.ads.isInAdMode()){// preroll
if (adsTimeResuming > 5){// thời điểm xem tiếp quá 5s
closeAds = “preroll”;
}
} else {// midroll
let duration = this.player.duration();
if (!duration){
duration = 0;
}
if (adsTimeResuming > 0 && duration > 0 && (
(this.midTime && adsTimeResuming > this.midTime)
|| adsTimeResuming > duration / 2
)
){
closeAds = “midroll”;
}
}

if (closeAds != “”){
this.closeAd();

console.log(“player:event:” + e.type + ” => cancel ” + closeAds + ” – closeAd”);

if (this.player.paused()) {// cố khởi chạy tiếp nếu đang bị dừng
if (this.autoplayRequiresMute){// bắt buộc phải mute -> tắt tiếng để play đc luôn
this.player.muted(true);
}

this.player.play();
}
}
}
}.bind(videozplayer_66b891));
/*RESUME_WATCHING_EVENTS-END*/

videozplayer_66b891.player.on(“onPrerollError”, function(name) {
var objVideos = videojs(vidId+”_html5_api”);
});
videozplayer_66b891.player.on(“AE_completed”, function(name) {
// console.log(“AE_completed AE_completed :”+current_vol_zplayer_66b891);
var is_vd_mute = videozplayer_66b891.player.muted();
if (is_vd_mute == true) {

//videozplayer_66b891.player.volume(0);

setTimeout(function(){
videozplayer_66b891.player.muted(1);
// console.log(“AE_completed AE_completed set MUTED”);
},400);

}
});
videozplayer_66b891.player.on(“onPlay”, function(name) {
// console.log(“onPlay AE_started AE_started :”+current_vol_zplayer_66b891);
var is_vd_mute = videozplayer_66b891.player.muted();
if (is_vd_mute == true) {
if (current_vol_zplayer_66b891 > 0) {
// console.log(“AE SET VOLUME 1111111”);
videozplayer_66b891.player.volume(current_vol_zplayer_66b891);
}
videozplayer_66b891.player.muted(1);
// console.log(“AE MUTE LOAD PLAYER ACTION SET MUTE 111111: “);
}
// console.log(“AE THIS VOLUME is muted :”+videozplayer_66b891.player.muted());
// console.log(“AE THIS VOLUME: “+videozplayer_66b891.player.volume());
// begin 5/10/2017 TuyenNT xu_ly_gan_ga_video_theo_loai_giai_dau_frontend_pc
send_tracking_video(‘none’, ‘Null’, 1702162, 46, ‘daily_news’, ‘pc’, ‘play’, ‘no’, ‘no’, 1, ‘video_noi_dung’);
// end 5/10/2017 TuyenNT xu_ly_gan_ga_video_theo_loai_giai_dau_frontend_pc
//Begin 14-07-2017 : Thangnb tracking_google_tag_manager_video

//End 14-07-2017 : Thangnb tracking_google_tag_manager_video
send_tracking_video(”, ‘none’, 0, 0, ”, ‘pc’, ”, ‘no’, ‘no’, 3, ‘video_noi_dung’);
});
// Begin 12-12-2018 trungcq XLCYCMHENG_33549_xu_ly_scroll_to_top
videozplayer_66b891.player.on(“playerMinimized”, function(name) {
// console.log(“Listener playerMinimized: “);
if ($(“#arrowPageUp”).length) {
$(“#arrowPageUp”).css(“bottom”,”157px”);
$(“#backpage”).css(“bottom”,”200px”);
}
});
videozplayer_66b891.player.on(“playerUnMinimized”, function(name) {
// console.log(“Listener playerUnMinimized: “);
if ($(“#arrowPageUp”).length) {
$(“#arrowPageUp”).css(“bottom”,”20px”);
}
});
videozplayer_66b891.player.on(“miniPlayerClosed”, function(name) {
// console.log(“Listener miniPlayerClosed: “);
if ($(“#arrowPageUp”).length) {
$(“#arrowPageUp”).css(“bottom”,”20px”);
}
});

// End 12-12-2018 trungcq XLCYCMHENG_33549_xu_ly_scroll_to_top

var v_event_tracking_impression_prerollzplayer_66b891 = document.getElementById(“zplayer_66b891_ga_preroll”);
// các trường hợp mã lỗi của trình duyệt trả về
videozplayer_66b891.player.on(“AE_impression”, function(name) {
// Gọi GA load video
if(v_event_tracking_impression_prerollzplayer_66b891){
// Tao thẻ div để chưa link GA
$(“

“).insertBefore(“#zplayer_66b891_ga_preroll”);
if(document.getElementById(“link_ga_tracking_impression_preroll_zplayer_66b891”)){
window.addEventListener(“load”, function(){send_tracking_video(”, ‘none’, 1702162, 46, ‘daily_news’, ‘pc’, ‘impression’, ‘no’, ‘no’, 2, ‘video_noi_dung’);});
}
}
});

var v_event_tracking_click_prerollzplayer_66b891 = document.getElementById(“zplayer_66b891_ga_preroll”);
// các trường hợp mã lỗi của trình duyệt trả về
videozplayer_66b891.player.on(“AE_clicked”, function(name) {
// Gọi GA load video
if(v_event_tracking_click_prerollzplayer_66b891){
// Tao thẻ div để chưa link GA
$(“

“).insertBefore(“#zplayer_66b891_ga_preroll”);
if(document.getElementById(“link_ga_tracking_click_preroll_zplayer_66b891”)){
window.addEventListener(“load”, function(){send_tracking_video(”, ‘none’, 1702162, 46, ‘daily_news’, ‘pc’, ‘ads_click’, ‘no’, ‘no’, 2, ‘video_noi_dung’);});
}
}
});

var v_err_log_1zplayer_66b891 = document.getElementById(“zplayer_66b891_ga_error1”);
// các trường hợp mã lỗi của trình duyệt trả về
videozplayer_66b891.player.on(“MEDIA_ERROR_1″, function (name) {
// Gọi GA load video
if(v_err_log_1zplayer_66b891){
send_tracking_video(”, ‘none’, 1702162, 0, ”, ‘pc’, ‘error_ERROR_1’, ‘no’, ‘no’, 1, ‘video_noi_dung’);
}
});
var v_err_log_2zplayer_66b891 = document.getElementById(“zplayer_66b891_ga_error2”);
videozplayer_66b891.player.on(“MEDIA_ERROR_2″, function (name) {
// Gọi GA load video
if(v_err_log_2zplayer_66b891){
send_tracking_video(”, ‘none’, 1702162, 0, ”, ‘pc’, ‘error_ERROR_2’, ‘no’, ‘no’, 1, ‘video_noi_dung’);
}
});
var v_err_log_3zplayer_66b891 = document.getElementById(“zplayer_66b891_ga_error3”);
videozplayer_66b891.player.on(“MEDIA_ERROR_3″, function (name) {
// Gọi GA load video
if(v_err_log_3zplayer_66b891){
send_tracking_video(”, ‘none’, 1702162, 0, ”, ‘pc’, ‘error_ERROR_3’, ‘no’, ‘no’, 1, ‘video_noi_dung’);
}
});
var v_err_log_4zplayer_66b891 = document.getElementById(“zplayer_66b891_ga_error4”);
videozplayer_66b891.player.on(“MEDIA_ERROR_4″, function (name) {
// Gọi GA load video
if(v_err_log_4zplayer_66b891){
send_tracking_video(”, ‘none’, 1702162, 0, ”, ‘pc’, ‘error_ERROR_4’, ‘no’, ‘no’, 1, ‘video_noi_dung’);
}
});
var v_err_log_5zplayer_66b891 = document.getElementById(“zplayer_66b891_ga_error5”);
videozplayer_66b891.player.on(“MEDIA_ERROR_5″, function (name) {
// Gọi GA load video
if(v_err_log_5zplayer_66b891){
send_tracking_video(”, ‘none’, 1702162, 0, ”, ‘pc’, ‘error_ERROR_5’, ‘no’, ‘no’, 1, ‘video_noi_dung’);
}
});

videozplayer_66b891.player.on(“track_slow_playlist_next_1”, function(){
console.log(“track_slow_playlist_next_1”);
$(“

“).insertBefore(“#zplayer_66b891_ga_media_slow_waiting”);

var v_track_slow_playlist_zplayer_66b8911 = document.getElementById(“link_slow_playlist_next_zplayer_66b8911”);
if(v_track_slow_playlist_zplayer_66b8911){
window.addEventListener(“load”, function(){send_tracking_video(”, ‘none’, 1702162, 0, ”, ‘pc’, ‘slow_playlist_next’, ‘no’, ‘no’, 1, ‘video_noi_dung’);});
}
});

videozplayer_66b891.player.on(“track_slow_playlist_next_2”, function(){
console.log(“track_slow_playlist_next_2”);
$(“

“).insertBefore(“#zplayer_66b891_ga_media_slow_waiting”);

var v_track_slow_playlist_zplayer_66b8912 = document.getElementById(“link_slow_playlist_next_zplayer_66b8912”);
if(v_track_slow_playlist_zplayer_66b8912){
window.addEventListener(“load”, function(){send_tracking_video(”, ‘none’, 1702162, 0, ”, ‘pc’, ‘slow_playlist_next’, ‘no’, ‘no’, 1, ‘video_noi_dung’);});
}
});

videozplayer_66b891.player.on(“track_slow_playlist_next_3”, function(){
console.log(“track_slow_playlist_next_3”);
$(“

“).insertBefore(“#zplayer_66b891_ga_media_slow_waiting”);

var v_track_slow_playlist_zplayer_66b8913 = document.getElementById(“link_slow_playlist_next_zplayer_66b8913”);
if(v_track_slow_playlist_zplayer_66b8913){
window.addEventListener(“load”, function(){send_tracking_video(”, ‘none’, 1702162, 0, ”, ‘pc’, ‘slow_playlist_next’, ‘no’, ‘no’, 1, ‘video_noi_dung’);});
}
});

videozplayer_66b891.player.on(“track_slow_playlist_next_4”, function(){
console.log(“track_slow_playlist_next_4”);
$(“

“).insertBefore(“#zplayer_66b891_ga_media_slow_waiting”);

var v_track_slow_playlist_zplayer_66b8914 = document.getElementById(“link_slow_playlist_next_zplayer_66b8914”);
if(v_track_slow_playlist_zplayer_66b8914){
window.addEventListener(“load”, function(){send_tracking_video(”, ‘none’, 1702162, 0, ”, ‘pc’, ‘slow_playlist_next’, ‘no’, ‘no’, 1, ‘video_noi_dung’);});
}
});

videozplayer_66b891.player.on(“track_slow_playlist_next_5”, function(){
console.log(“track_slow_playlist_next_5”);
$(“

“).insertBefore(“#zplayer_66b891_ga_media_slow_waiting”);

var v_track_slow_playlist_zplayer_66b8915 = document.getElementById(“link_slow_playlist_next_zplayer_66b8915”);
if(v_track_slow_playlist_zplayer_66b8915){
window.addEventListener(“load”, function(){send_tracking_video(”, ‘none’, 1702162, 0, ”, ‘pc’, ‘slow_playlist_next’, ‘no’, ‘no’, 1, ‘video_noi_dung’);});
}
});

videozplayer_66b891.player.on(“track_slow_playlist_next_6”, function(){
console.log(“track_slow_playlist_next_6”);
$(“

“).insertBefore(“#zplayer_66b891_ga_media_slow_waiting”);

var v_track_slow_playlist_zplayer_66b8916 = document.getElementById(“link_slow_playlist_next_zplayer_66b8916”);
if(v_track_slow_playlist_zplayer_66b8916){
window.addEventListener(“load”, function(){send_tracking_video(”, ‘none’, 1702162, 0, ”, ‘pc’, ‘slow_playlist_next’, ‘no’, ‘no’, 1, ‘video_noi_dung’);});
}
});

videozplayer_66b891.player.on(“track_slow_playlist_next_7”, function(){
console.log(“track_slow_playlist_next_7”);
$(“

“).insertBefore(“#zplayer_66b891_ga_media_slow_waiting”);

var v_track_slow_playlist_zplayer_66b8917 = document.getElementById(“link_slow_playlist_next_zplayer_66b8917”);
if(v_track_slow_playlist_zplayer_66b8917){
window.addEventListener(“load”, function(){send_tracking_video(”, ‘none’, 1702162, 0, ”, ‘pc’, ‘slow_playlist_next’, ‘no’, ‘no’, 1, ‘video_noi_dung’);});
}
});

videozplayer_66b891.player.on(“track_slow_playlist_next_8”, function(){
console.log(“track_slow_playlist_next_8”);
$(“

“).insertBefore(“#zplayer_66b891_ga_media_slow_waiting”);

var v_track_slow_playlist_zplayer_66b8918 = document.getElementById(“link_slow_playlist_next_zplayer_66b8918”);
if(v_track_slow_playlist_zplayer_66b8918){
window.addEventListener(“load”, function(){send_tracking_video(”, ‘none’, 1702162, 0, ”, ‘pc’, ‘slow_playlist_next’, ‘no’, ‘no’, 1, ‘video_noi_dung’);});
}
});

videozplayer_66b891.player.on(“track_slow_playlist_next_9”, function(){
console.log(“track_slow_playlist_next_9”);
$(“

“).insertBefore(“#zplayer_66b891_ga_media_slow_waiting”);

var v_track_slow_playlist_zplayer_66b8919 = document.getElementById(“link_slow_playlist_next_zplayer_66b8919”);
if(v_track_slow_playlist_zplayer_66b8919){
window.addEventListener(“load”, function(){send_tracking_video(”, ‘none’, 1702162, 0, ”, ‘pc’, ‘slow_playlist_next’, ‘no’, ‘no’, 1, ‘video_noi_dung’);});
}
});

videozplayer_66b891.player.on(“track_slow_playlist_next_10”, function(){
console.log(“track_slow_playlist_next_10”);
$(“

“).insertBefore(“#zplayer_66b891_ga_media_slow_waiting”);

var v_track_slow_playlist_zplayer_66b89110 = document.getElementById(“link_slow_playlist_next_zplayer_66b89110”);
if(v_track_slow_playlist_zplayer_66b89110){
window.addEventListener(“load”, function(){send_tracking_video(”, ‘none’, 1702162, 0, ”, ‘pc’, ‘slow_playlist_next’, ‘no’, ‘no’, 1, ‘video_noi_dung’);});
}
});

videozplayer_66b891.player.on(“timeupdated”, function () {
if (count_time_update_zplayer_66b891 < 50) {
count_time_update_zplayer_66b891++;
// console.log(“AE TIME UPDATE: “+count_time_update_zplayer_66b891);
}
if(v_load_recommend_boxzplayer_66b891 && typeof(v_thoi_luong_hien_thi) != “undefined” && v_thoi_luong_hien_thi != “”){
try{
var v_time_current = videozplayer_66b891.player.currentTime();
if(v_time_current > 0){
if(v_time_current >= v_thoi_luong_hien_thi){
function getJsonRecomment(url,callback){
if(url == “”){
return “”;
}
dynamicIdLive = new Date().valueOf();
url = url+dynamicIdLive;
var xhr = new XMLHttpRequest();
// Get url
xhr.open(“GET”, url, true);
// Kiểu phản hồi
xhr.responseType = “json”;
xhr.timeout = 50000; // Set timeout to 2 seconds
xhr.ontimeout = function () {console.log(url+” – timeout”);}
// Load data
xhr.onload = function() {
var status = xhr.status;
if (status == 200) {
callback(xhr.response);
}else{
console.log(“B3: status != 200”);
}
};
xhr.send();
}
if(typeof v_url_json_data_recomment != “undefined”){
getJsonRecomment(v_url_json_data_recomment,function(v_object_recomend){
if(typeof v_object_recomend != “undefined” && parseInt(v_object_recomend.length) > 0){
var recomment_arr_video_ngay_hien_tai = _getStorageJson24h(“recomment_video_ngay_hien_tai_data_news_id”);
var recomment_video_ngay_hom_qua_data_news_id = _getStorageJson24h(“recomment_video_ngay_hom_qua_data_news_id”);
// Lặp để loại bỏ những bài đang xem
var arr_recomend_video = new Array();
var k=0;
var v_so_luong_tin_hien_thi = parseInt(v_object_recomend[0][“c_tong_so_luong_tin_hien_thi”]);
for(j=0;j 0){
if(v_recomment_news_id== parseInt(v_object_recomend[j][“c_new_id”])){
continue;
}
if(typeof(recomment_arr_video_ngay_hien_tai) != “undefined” && recomment_arr_video_ngay_hien_tai.indexOf(parseInt(v_object_recomend[j][“c_new_id”])) >= 0){
continue;
}
if(typeof(recomment_video_ngay_hom_qua_data_news_id) != “undefined” && recomment_video_ngay_hom_qua_data_news_id.indexOf(parseInt(v_object_recomend[j][“c_new_id”])) >= 0){
continue;
}
}
arr_recomend_video[k] = v_object_recomend[j];
k++;
if(k >= v_so_luong_tin_hien_thi){
break;
}
}
var v_total_page_recommend =0;
v_total_page_recommend = parseInt(Math.ceil(parseInt(arr_recomend_video.length)/parseInt(v_object_recomend[0][“c_number_items”])));
// Tao HTML video recommend
arr_recomend_video[0][“c_tracking_onclick”] = “”;
arr_recomend_video[0][“c_tracking_onload”] = “”;
arr_recomend_video[0][“c_tracking_onload_gatag”] = “”;
var v_html_recomend = tao_html_recommend_video_tu_object(arr_recomend_video,”zplayer_66b891″);
// Gắn HTML vào chuỗi
if(v_html_recomend !=””){
// Nếu tồn tại video highlight
if ($(“#vjs-marker-tableinfo-zplayer_66b891”).length) {
$(“#vjs-marker-tableinfo-zplayer_66b891”).after(v_html_recomend);
} else {
if ($(“#zplayer_66b891_ga_preroll”).length) {
$(“#zplayer_66b891_ga_preroll”).before(v_html_recomend);
}
}
// Hiển thị dạng slide
if ($(“#box_recommend_zplayer_66b891”).length) {
$(“#box_recommend_zplayer_66b891”).show(1000);
setTimeout(function(){
create_slide_page_number_recommend_video_json(“swiper_recommend_v2018zplayer_66b891”, “swpier_container_zplayer_66b891″,”swiper_active_slide_zplayer_66b891”, “pagination-zplayer_66b891″,”wrapper_zplayer_66b891”,v_total_page_recommend, “swiper-slide slide_zplayer_66b891”, “prvVid_recommendzplayer_66b891”, “nxtVid_recommendzplayer_66b891”);
$(“#box_recommend_zplayer_66b891”).css(“height”, “”);
}, 900);
}
}
}
});
}
v_load_recommend_boxzplayer_66b891 = false;
}
}
}catch(e){
console.log([“Errors”, e]);
}
}
});

videozplayer_66b891.player.on(“MEDIA_SLOW_WAITING”, function (evt, data) {
//console.log(data.waitTime);
var v_slow_waiting_zplayer_66b891 = document.getElementById(“zplayer_66b891_ga_media_slow_waiting”);
if(v_slow_waiting_zplayer_66b891){
//đổi ms về s
v_so_giay_load = parseInt(data.waitTime/1000);
send_tracking_video(”, ”, 1702162, ”, ”, ”, ‘media_slow_waiting’, ”, ”, 6, v_so_giay_load);
}
//console.log(“listener MEDIA_SLOW_WAITING: “);
});
videozplayer_66b891.player.on(“MEDIA_SLOW_METADATA”, function (evt, data) {
//console.log(data.waitTime);
var v_slow_metadata_zplayer_66b891 = document.getElementById(“zplayer_66b891_ga_media_slow_metadata”);
if(v_slow_metadata_zplayer_66b891){
//đổi ms về s
v_so_giay_load_metadata = parseInt(data.waitTime/1000);
send_tracking_video(”, ”, 1702162, ”, ”, ”, ‘media_slow_metadata’, ”, ”, 6, v_so_giay_load_metadata);
}
//console.log(“listener MEDIA_SLOW_METADATA: “);
});
videozplayer_66b891.player.on(‘onPrerollStart’, function(name){
//console.log(‘ON PREROLL START’);

/* begin 4/10/2017 TuyenNT xu_ly_gan_ga_video_theo_loai_giai_dau_frontend_pc */
send_tracking_video(‘none’, ‘Null’, 1702162, 46, ‘daily_news’, ‘pc’, ‘preroll_impression’, ‘no’, ‘no’, 1, ‘video_noi_dung’);
/* end 4/10/2017 TuyenNT xu_ly_gan_ga_video_theo_loai_giai_dau_frontend_pc */

});videozplayer_66b891.player.on(‘onOverlayStart’, function(name){
//console.log(‘ON OVERLAY START’);

/* begin 4/10/2017 TuyenNT xu_ly_gan_ga_video_theo_loai_giai_dau_frontend_pc */
send_tracking_video(‘none’, ‘Null’, 1702162, 46, ‘daily_news’, ‘pc’, ‘overlay_impression’, ‘no’, ‘no’, 1, ‘video_noi_dung’);
/* end 4/10/2017 TuyenNT xu_ly_gan_ga_video_theo_loai_giai_dau_frontend_pc */

});videozplayer_66b891.player.on(‘onPostRollStart’, function(name){
//console.log(‘ON POSTROLL START’);

/* begin 4/10/2017 TuyenNT xu_ly_gan_ga_video_theo_loai_giai_dau_frontend_pc */
send_tracking_video(‘none’, ‘Null’, 1702162, 46, ‘daily_news’, ‘pc’, ‘postroll_impression’, ‘no’, ‘no’, 1, ‘video_noi_dung’);
/* end 4/10/2017 TuyenNT xu_ly_gan_ga_video_theo_loai_giai_dau_frontend_pc */

});

videozplayer_66b891.player.on([
“play”,
“playing”,
“adstart”,
“adplaying”,
], function (evt, data) {

if (typeof stop_video_news_live == “function”){
stop_video_news_live(“___”);
}

});

videozplayer_66b891.player.one([
“play”,
], function (e) {
let vastUri = this.vastUri;
let vastUriPost = this.vastUriPost;
let vastUriMid = this.vastUriMid;

// Neu co cau hinh autoplay nhung trình duyet k cho phep auto play thi gan tham so bang vpmute = 0
if(this.viewportAutoPlay == true && this.willAutoplay === false){
if(vastUri != “”){
this.vastUri = vastUri + “&vpmute=0”;
}
if(vastUriPost != “”){
this.vastUriPost = vastUriPost + “&vpmute=0”;
}
if(vastUriMid != “”){
this.vastUriMid = vastUriMid + “&vpmute=0”;
}
}
}.bind(videozplayer_66b891));

videozplayer_66b891.player.on([
“contentchanged”,
], function (e) {
this.player.one([
“playing”,
], function (e) {
var currentItem = this.isPlaylist ? this.player.playlist.currentItem() : 0;

// đợi player xử lý 1s mới bắt đầu check xem có chạy được không
setTimeout(function(){
// đã thay đổi item –> bỏ qua
var chk_currentItem = this.isPlaylist ? this.player.playlist.currentItem() : 0;
if (chk_currentItem != currentItem){
return;
}

var has_timeupdate = false;

this.player.one([
“timeupdate”,
], function (e) {
has_timeupdate = true;
});

setTimeout(function(){
if (has_timeupdate){
return;
}

if (this.player.paused()){
return;
}

this.dbglog(“timeupdate_missing –> try to restart”);

this.player.pause();
setTimeout(function(){
this.player.play();
}.bind(this), 100);
}.bind(this), 300);
}.bind(this), 1000);
}.bind(this));
}.bind(videozplayer_66b891));

videozplayer_66b891.player.on(“onStop”, function(name) {
//console.log(“listener onStop: “);

});

videozplayer_66b891.player.on(“onFullscreen”, function(name) {
// 20250808 – XLCYCMHENG-44473 – xử lý bỏ neo khi mở chế độ fullscreen
// đang ở chế độ neo
if (this.hasClass(“mini-player”)){
this.removeClasses([“mini-player”, “pc-mini-player”]);
this.minPlayerHideCloseBtn();
this.unminimizeOnFullscreen = true;
}
}.bind(videozplayer_66b891));
videozplayer_66b891.player.on(“onFullscreenOff”, function(name) {
// 20250808 – XLCYCMHENG-44473 – xử lý neo lại khi thoát chế độ fullscreen
// từng bỏ neo khi mở chế độ fullscreen
if (typeof this.unminimizeOnFullscreen != “undefined” && this.unminimizeOnFullscreen){
this.addClasses([“mini-player”, “pc-mini-player”]);
this.minPlayerDisplayCloseBtn();
this.unminimizeOnFullscreen = false;
}
}.bind(videozplayer_66b891));
}
videoAdsInitzplayer_66b891 = true;
}
// Ga video load luôn được chạy
window.addEventListener(“load”, function(){});window.addEventListener(“load”, function(){send_tracking_video(‘none’, ‘Null’, 1702162, 46, ‘daily_news’, ‘pc’, ‘view’, ‘no’, ‘no’, 1, ‘video_noi_dung’);});
function inViewport( element ){
// Get the elements position relative to the viewport
var bb = element.getBoundingClientRect();
// Check if the element is outside the viewport
// Then invert the returned value because you want to know the opposite
return !(bb.top > innerHeight || bb.bottom < 0);
}
var zplayer_66b891VpElm = document.getElementById( “zplayer_66b891” );

var viszplayer_66b891 = (function () {
var stateKey, eventKey, keys = {
hidden: “visibilitychange”,
webkitHidden: “webkitvisibilitychange”,
mozHidden: “mozvisibilitychange”,
msHidden: “msvisibilitychange”
};
for (stateKey in keys) {
if (stateKey in document) {
eventKey = keys[stateKey];
break;
}
}
return function (c) {
if (c) document.addEventListener(eventKey, c);
return !document[stateKey];
}
})();

var videoAds1Elmzplayer_66b891 = document.getElementById(“v-24hContainer_zplayer_66b891”);
document.addEventListener(“DOMContentLoaded”, function () {
if(videoAds1Elmzplayer_66b891){
var videoAdsInitzplayer_66b891 = false;
var checkTabActivezplayer_66b891 = setInterval(function () {
if (inViewport(videoAds1Elmzplayer_66b891) && viszplayer_66b891() && !videoAdsInitzplayer_66b891 && typeof(window.videojs) !== “undefined” && (typeof(google) !== “undefined” || adBlockCheckedStatus) && videoObj) {
initvideozplayer_66b891();
clearInterval(checkTabActivezplayer_66b891);
}
// 20230817 fix lỗi lần đầu vào đợi onload check chặn quảng cáo quá lâu
// XLCYCMHENG-42783 – async lib ima3 -> tăng thời gian chờ load ima3
else if (typeof videoObjRoot != “undefined” && videoObjRoot){
if (typeof videoAdsInitzplayer_66b891_fix_AdBlockCheck == “undefined”){
setTimeout(function(){
if (typeof adBlockCheckedStatus != “undefined” && !adBlockCheckedStatus){
adBlockCheckedStatus = true;
adBlockEnabled = false;
}
}, 2000);

videoAdsInitzplayer_66b891_fix_AdBlockCheck = true;
}
}
}, 100);
}
}, false);

//]]>

//

Hành trình đi bộ về nhà của chị Hằng. Video: Thu Hằng


18h30

Vượt biển nước đi mua thực phẩm

Khu vực đường Chính Kinh (phường Thanh Xuân) tối đen như đêm dù mới 18h30. Nước ngập gần đầu gối người lớn, nhiều hộ dân sau nhiều giờ phải ở trong nhà đã bì bõm lội nước đi mua đồ ăn. Một số người vất vả dắt xe máy về, nhờ người quen hỗ trợ đưa phương tiện lên chỗ cao.

Nhiều ôtô buộc phải bỏ lại giữa dòng nước. Các hộ dân xung quanh đóng kín cửa để ngăn nước và rác tràn vào nhà.

Đường Chính Kinh lúc 18h30. Ảnh: Hoàng Giang

Đường Chính Kinh lúc 18h30. Ảnh: Hoàng Giang

Người dân lội nước đi mua thực phẩm về nấu ăn tối. Ảnh: Hoàng Giang

Người dân lội nước đi mua thực phẩm về nấu ăn tối. Ảnh: Hoàng Giang

Ôtô phải để lại trên đường. Ảnh: Hoàng Giang

Ôtô phải để lại trên đường. Ảnh: Hoàng Giang


18h15

Lội nước về nhà trong bóng tối

Lúc 18h, trời Hà Nội đã tối, nhiều người dân vẫn lội nước trên phố tìm đường về nhà. Đoạn đường Phạm Hùng hướng về bến xe Mỹ Đình ngập sâu.

Giao thông Hà Nội hỗn loạn - 9

Giao thông Hà Nội hỗn loạn - 10

Giao thông Hà Nội hỗn loạn - 11

Ảnh: Ngọc Thành

Ảnh: Ngọc Thành

//

// 0) {
// console.log(“AE volByCookie VAR : “+volByCookie);
vid_vol_var = volByCookie;
}
}
// console.log(“AE VIDVOL VAR : “+vid_vol_var);
var vidLoaded = false,
dynamicId,
vidId,
parentVid = “v-24hContainer_zplayer_2aa2b2”,
videoElmStr = ‘

‘+
‘To view this video please enable JavaScript, and consider upgrading to a web browser that ‘+
supports HTML5 video ‘+
‘ ‘ +
”,
videozplayer_2aa2b2,
videoAds1Conf = {
“poster”: “https://cdn.24h.com.vn/upload/3-2025/images/2025-09-30/1759232645-taungam.jpg”,

“offsetWatchPercent”: 20,
“stopOtherOnPlay”: true,
“parentVid”: parentVid,
“offHighlightOnBannerBottom”:false,
“vidErrorLog”: 1,
“skipAble”: true,
“skipTime”: 5000,
/*CDN_DOMAIN_HLS*/

“skipAdsBtnContent”: “Skip Ad”,
“showAdVol”: true,
“VIDEOID”: “zplayer_2aa2b2”,
/*MINI_VIDEO*/
“viewportAutoPlay”: true,
“vidVol” : vid_vol_var,
//”adVolIncrease”: 0.25,
//”showVolIncreasement”:1,
//”adVol” : “0.15”,
“trackSlowMedia”:1,
“secondToLoadMedia”:3000,
“secondToLoadMeta”:3000,
“prerollTimeEnd” : 31,
“midrollTimeEnd” : 15,
“postrollTimeEnd” : 30,
“skipAdsBtnPos”: “bottom-left”,

“fastSeek”: {step: 5},
“userAgent”: “Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.7 Safari/605.1.15”,
“adLoadTimeout” : 8000

,”vastUri”: “https%3A%2F%2Fpubads.g.doubleclick.net%2Fgampad%2Fads%3Fsz%3D640x360%26iu%3D%2F124557882%2F24h%2Fus%2Fdesktop%2Fdaily_news%2Fpreroll%26impl%3Ds%26gdfp_req%3D1%26env%3Dvp%26output%3Dvast%26unviewed_position_start%3D1%26url%3Dhttps%253A%252F%252Fwww.24h.com.vn%252Ftin-tuc-trong-ngay%252Fgiao-thong-ha-noi-hon-loan-gio-tan-tam-vi-mua-lon-c46a1702162.html%26description_url%3Dhttps%253A%252F%252Fwww.24h.com.vn%252Ftin-tuc-trong-ngay%252Fgiao-thong-ha-noi-hon-loan-gio-tan-tam-vi-mua-lon-c46a1702162.html%26correlator%3D1759237330%26ambient%3D1%26plcmt%3D2″
,”vastUriPost” : “https%3A%2F%2Fpubads.g.doubleclick.net%2Fgampad%2Fads%3Fsz%3D528x297%26iu%3D%2F124557882%2F24h%2Fus%2Fdesktop%2Fdaily_news%2Fpostroll%26impl%3Ds%26gdfp_req%3D1%26env%3Dvp%26output%3Dvast%26unviewed_position_start%3D1%26url%3Dhttps%253A%252F%252Fwww.24h.com.vn%252Ftin-tuc-trong-ngay%252Fgiao-thong-ha-noi-hon-loan-gio-tan-tam-vi-mua-lon-c46a1702162.html%26description_url%3Dhttps%253A%252F%252Fwww.24h.com.vn%252Ftin-tuc-trong-ngay%252Fgiao-thong-ha-noi-hon-loan-gio-tan-tam-vi-mua-lon-c46a1702162.html%26correlator%3D1759237330%26ambient%3D1%26plcmt%3D2″
,”vastUriMid” : “https%3A%2F%2Fvideo.24h.com.vn%2Fupload%2Fhtml%2Ftempvast.xml”
,”midTime”: 10
/*FALL_BACK*/
/*PLAYLIST_ITEM*/
/*DRM_VIDEO*/

//{set_highlight_zplayer_html5}
/*ID_BANNER_SPONSOR*/
}
if (volByCookie != null) {
if (volByCookie <= 0) {
// console.log("AE volByCookie VAR set MUTED : "+volByCookie);
videoAds1Conf.muted = 1;
}
}
if(document.getElementById(parentVid).innerHTML.trim() == ""){
loadVidzplayer_2aa2b2();
vidLoaded = true;
}

var count_time_update_zplayer_2aa2b2 = 0;

function loadVidzplayer_2aa2b2(){
dynamicId = new Date().valueOf();
vidId = "my-video-multiple1_"+dynamicId;
videoAds1Conf.VIDEOID = vidId;
if(vidLoaded==true){
videoAds1Conf.viewportAutoPlay = false;
}

var newVideStr = videoElmStr.replace(/__VIDIDzplayer_2aa2b2__/g, vidId);

document.getElementById(parentVid).innerHTML = newVideStr;
if (typeof adBlockEnabled_Unique != "undefined"){
// XLCYCMHENG-42783 – player – async lib ima3 + multi video – fix bug adBlockEnabled không đồng nhất
adBlockEnabled = adBlockEnabled_Unique;
}
videozplayer_2aa2b2 = new videoObj(videoAds1Conf);

// console.log("AE LOAD PLAYER");
// console.log(videoAds1Conf);
// console.log("AE THIS VOLUME LOAD PLAYER muted VAR :"+videoAds1Conf.muteByUser);
//console.log("AE THIS VOLUME LOAD PLAYER is muted :"+videozplayer_2aa2b2.player.muted());
//console.log("AE THIS VOLUME LOAD PLAYER: "+videozplayer_2aa2b2.player.volume());
//console.log("AE THIS VOLUME LOAD PLAYER CURRENT VOLUME : "+current_vol_zplayer_2aa2b2);
if ((typeof(videoAds1Conf.muteByUser) != "undefined" && videoAds1Conf.muteByUser == 1) || (volByCookie != null && volByCookie 0) {
videoAds1Conf.vidVol = current_vol_zplayer_2aa2b2;
videoAds1Conf.muteByUser = 0;
} else {
videoAds1Conf.muteByUser = 1;
videoAds1Conf.vidVol = 0;
}
var videoConf = videoAds1Conf;
videoConf.viewportAutoPlay = false;
// console.log(“AE videoConf: “, videoConf);
var element = document.getElementById(videoConf.VIDEOID);
// element.parentNode.removeChild(element);
// videozplayer_2aa2b2 = undefined;
videozplayer_2aa2b2.player.dispose();
loadVidzplayer_2aa2b2();
});

videozplayer_2aa2b2.player.on(“loadeddata”, function(){
// 20220224 fix lỗi không khởi tạo đc playerInitHeight
if (this.playerInitHeight <= 0){
this.playerInitHeight = Math.round(this.getById(this.VIDEOID).getBoundingClientRect().height)
this.dbglog("this.playerInitHeight: " + this.playerInitHeight)

this.playerHasSponsorInitHeight = Math.floor(this.getById(this.VIDEOID).getBoundingClientRect().height) – 1;// làm tròn xuống & -1
this.dbglog("this.playerHasSponsorInitHeight: " + this.playerHasSponsorInitHeight);
}
}.bind(videozplayer_2aa2b2));

videozplayer_2aa2b2.player.on("volumechange", function(){
var new_vd_volume = videozplayer_2aa2b2.player.volume();
// console.log("AE volume change");
// console.log("AE THIS VOLUME AFTER CHANGE: "+videozplayer_2aa2b2.player.volume());
// console.log("AE volume change is mute : "+videozplayer_2aa2b2.player.muted());
var is_vd_muted = videozplayer_2aa2b2.player.muted();
var check_set_cookie = false;
if (new_vd_volume 10) {
is_vd_muted = true;
}
if (is_vd_muted == true) {
// console.log(“AE is_vd_muted TRUE”);
if (current_vol_zplayer_2aa2b2 > 0 && count_time_update_zplayer_2aa2b2 > 10) {
check_set_cookie = true;
}
current_vol_zplayer_2aa2b2 = 0;
videozplayer_2aa2b2.player.muted(1);
setTimeout(function(){
videozplayer_2aa2b2.player.muted(1);
},300);
} else {
// console.log(“AE is_vd_muted FALSE”);
if (volByCookie <= 0 && count_time_update_zplayer_2aa2b2 < 5) {
check_set_cookie = false;
} else {
check_set_cookie = true;
}
current_vol_zplayer_2aa2b2 = new_vd_volume;
}
// console.log("AE check_set_cookie: "+check_set_cookie);
if (check_set_cookie == true) {
setCookie("videoVolumeByUser", current_vol_zplayer_2aa2b2, 30*24, "/", "24h.com.vn", "");// lưu cookie 30 ngày
// console.log("AE SET COOKIE");
} else {
// console.log("AE NOTTTT SET COOKIE");
}
// console.log("AE THIS VOLUME AFTER CHANGE LATER: "+current_vol_zplayer_2aa2b2);
}.bind(videozplayer_2aa2b2));

videozplayer_2aa2b2.player.ready(function () {
// XLCYCMHENG-38546 – [24H] Tối ưu khoảng trống trên/dưới banner sponsor_video_top / sponsor_video_botton
if (this.idBannerBottom != ""){
let vidEl = this.getById(this.VIDEOID);
let vidHeight = vidEl.getBoundingClientRect().height;

// làm tròn xuống & -1 height div chứa player
let parentHeight = Math.floor(vidHeight) – 1;
vidEl.parentNode.style.height = parentHeight + "px";
vidEl.parentNode.style.overflowY = "hidden";

// căn player lùi lên 0.7px
vidEl.style.marginTop = "-0.7px";

// 20220110: fix lỗi khi xem chế độ theater
let style = document.createElement("style");
style.type = "text/css";
style.innerHTML = ".theaterDisplay .video-js.vjs-16-9{margin-top: 0px !important}";
document.getElementsByTagName("head")[0].appendChild(style);
}

// XLCYCMHENG-44429 – 24h – Lỗi giao diện khi thu nhỏ màn hình – lỗi chiều cao theaterMod khi zoom
if (this.theaterMod && this.theaterMod.height) {
let style = document.createElement("style");
style.type = "text/css";
style.innerHTML = ".theaterDisplay .video-js.vjs-16-9-custom.zoomed:not(.mini-player){padding-top: 0px !important}";
document.getElementsByTagName("head")[0].appendChild(style);
}

// bổ sung class zoomed-out / zoomed-in theo chế độ zoom thực tế
function updateVideoZoomState() {
let vidEl = this.getById(this.VIDEOID);

const zoom = Math.round(window.devicePixelRatio * 100);

vidEl.classList.remove("zoomed", "zoomed-out", "zoomed-in");
if (zoom != 100) {
vidEl.classList.add("zoomed", zoom chưa xử lý; > 0 -> item cần nhảy tới; đã xử lý xong
let playTimeResuming = 0; // 0 -> chưa xử lý; > 0 -> thời điểm cần nhảy tới; đã xử lý xong
let useStorage = true; // sử dụng Storage để lưu trữ – không bị giới hạn số lượng, dung lượng, thời gian; không bị gửi lên server khi request trang
let minDuration = 10;
let adsTimeResuming = 0;
let adsBefore = true;
// XLCYCMHENG-39918 – player – resume watching – manager keys
// Math.floor(Date.now() / 1000) -> thời gian hiện tại (giây) theo UTC
let timeLiveKey = 720;
let updatetimeKey = “player__resume_watching__updatetime”;

// lấy item + thời gian đã xem từ cookie
let watching = “”;

if (useStorage && typeof Storage !== “undefined”){
// XLCYCMHENG-39918 – player – resume watching – manager keys
// khai báo hàm lấy thời điểm cập nhật key
var player__resume_watching__updatetime__get = function (key) {
if (typeof key == “undefined” || !key){return 0;}

let default_time = (new Date(“2022-10-01 00:00:00”)).getTime(); // mặc định nếu không có thời điểm cập nhật cũ
let updatetime = default_time;
let updatetime_all_text = localStorage.getItem(updatetimeKey);
if (updatetime_all_text != “”){
try {
let updatetime_all_obj = JSON.parse(updatetime_all_text);
if (typeof updatetime_all_obj == “object” && updatetime_all_obj !== null && typeof updatetime_all_obj[key] != “undefined”){
updatetime = parseInt(updatetime_all_obj[key]);
if (isNaN(updatetime)){
updatetime = default_time;
}
}
} catch (err){}
}

return updatetime;
};

// XLCYCMHENG-39918 – player – resume watching – manager keys
// khai báo hàm lưu thời điểm cập nhật key
var player__resume_watching__updatetime__set = function (key, remove_key) {
if (typeof key == “undefined” || !key){return false;}

if (typeof remove_key == “undefined”){
remove_key = false;
}

let updatetime_all_obj = {};
let updatetime_all_text = localStorage.getItem(updatetimeKey);
if (updatetime_all_text != “”){
try {
updatetime_all_obj = JSON.parse(updatetime_all_text);
} catch (err){}
}
if (typeof updatetime_all_obj != “object” || updatetime_all_obj === null){
updatetime_all_obj = {};

// danh sách các key có trong localStorage
let arr_all_key = Object.keys(localStorage);
if (typeof arr_all_key == “object” && arr_all_key !== null){
try {
// các key lưu lịch sử xem tiếp cũ chưa từng được đưa vào danh sách thời điểm cập nhật
let arr_key = arr_all_key.filter(key => key.match(/player__resume_watching_(.*)/));
if (typeof arr_key == “object” && arr_key !== null){
for (let i in arr_key) {
updatetime_all_obj[arr_key[i]] = Math.floor(Date.now() / 1000);
}
}
} catch (err){}
}
}

if (!remove_key){// cập nhật thời điểm cập nhật
updatetime_all_obj[key] = Math.floor(Date.now() / 1000);

try {
localStorage.setItem(updatetimeKey, JSON.stringify(updatetime_all_obj));
} catch (err){
console.log(“player: => set localStorage updatetimeKey after update – error: ” + err.message);
}
} else if (typeof updatetime_all_obj[key] != “undefined”){// remove nếu có thời điểm cập nhật cũ
delete updatetime_all_obj[key];

try {
localStorage.setItem(updatetimeKey, JSON.stringify(updatetime_all_obj));
} catch (err){
console.log(“player: => set localStorage updatetimeKey after delete – error: ” + err.message);
}
}

return true;
};

// lấy lịch sử đang xem
watching = localStorage.getItem(cookieKey);

console.log(“player: => get localStorage resume watching: ” + watching);

// có key -> check hết hạn key thì xóa, không dùng
if (timeLiveKey > 0 && watching !== null && watching !== “”){
let updatetime = player__resume_watching__updatetime__get(cookieKey);
if (updatetime + 60 * 60 * timeLiveKey remove expires localStorage resume watching: ” + cookieKey);
} catch (err){
console.log(“player: => remove expires localStorage resume watching: ” + cookieKey + ” – error: ” + err.message);
}
}
}
} else {
watching = getCookie(cookieKey);

console.log(“player: => get cookie resume watching: ” + watching);
}

if (!watching || typeof watching != “string”){
watching = “”;
}

if (watching != “”){
let arr_watching = watching.split(“:”);
if (arr_watching.length >= 2){
let watchingItem = parseInt(arr_watching[0]);
let watchingTime = parseFloat(arr_watching[1]);

if (!isNaN(watchingItem) && watchingItem > 0){
playItemResuming = watchingItem;// lưu item cần nhảy tới khi bắt đầu chạy video
}

if (!isNaN(watchingTime) && watchingTime > 0){
playTimeResuming = watchingTime;// lưu thời gian cần nhảy tới khi bắt đầu chạy video

adsTimeResuming = watchingTime;// lưu thời gian quảng cáo cần xử lý
}

if (playItemResuming > 0 || playTimeResuming > 0){
if (playItemResuming > 0){
adsTimeResuming = 100000;// playlist xem từ item thứ 2 -> chặn luôn preroll và midroll
}

console.log(“player: => need resume watching to item:” + playItemResuming + “; time:” + playTimeResuming);
}
}
}

videozplayer_2aa2b2.player.on([
“resume-watching”,
], function (e) {
if (minDuration > 0 && typeof this.tracking != “undefined” && typeof this.tracking.video != “undefined”){
let duration = 0;

if (typeof this.tracking.video.playlistTotalMins != “undefined”){
duration = this.tracking.video.playlistTotalMins;
}

if (typeof this.tracking.video.vidDuration != “undefined”){
duration = this.tracking.video.vidDuration;
}

if (duration > 0 && duration hủy cố gắng phát tiếp
playItemResuming = -1;
playTimeResuming = -1;
// hủy cố gắng chặn quảng cáo
adsTimeResuming = -1;
}
}

if (playItemResuming > 0 || playTimeResuming > 0){
let currentItem = this.isPlaylist ? this.player.playlist.currentItem() : 0;

if (playItemResuming > 0 && this.isPlaylist && this.player.playlist.lastIndex() > 0){
if (playItemResuming > this.player.playlist.lastIndex()){
playItemResuming %= (this.player.playlist.lastIndex() + 1);
}

if (this.player.playlist.currentItem() != playItemResuming){
this.player.playlist.currentItem(playItemResuming);// nhảy tới item

console.log(“player:event:” + e.type + ” => resume watching item:” + this.player.playlist.currentItem());
}
}

if (currentItem != playItemResuming && playTimeResuming > 0){
// hẹn trigger vào sự kiện play/loadeddata tiếp theo (sau khi load được item) -> thay đổi time sau
this.player.one([
“play”,
“loadeddata”,
], function (e) {
if (playItemResuming > 0 || playTimeResuming > 0){
console.log(“player:event:” + e.type + ” => triggerEvt:resume-watching”);

this.triggerEvt(“resume-watching”);
}
}.bind(this));

return;
}

if (playTimeResuming > 0){
this.player.currentTime(playTimeResuming);
}

playItem = this.isPlaylist ? this.player.playlist.currentItem() : 0;
playTime = this.player.currentTime();

console.log(“player:event:” + e.type + ” => resume watching item:” + playItem + “; time:” + playTime);

// kích hoạt sự kiện onPlay nếu chưa chạy để đảm bảo tracking
if (!this.getState(“sentPlay”) && !this.player.paused()) {
this.triggerEvt(“onPlay”);

console.log(“player:event:” + e.type + ” => triggerEvt:onPlay”);
}
}
}.bind(videozplayer_2aa2b2));
videozplayer_2aa2b2.player.one([
“play”,
“loadeddata”,
], function (e) {
if (playItemResuming > 0 || playTimeResuming > 0){
if (adsBefore){
let hasPreroll = false;

if (this.isPlaylist){
let currentItem = this.player.playlist.currentItem();
let currentItemSource = this.playlistConf;
let currentSrc = currentItemSource[currentItem].sources[0];

let adTag = typeof currentSrc != “undefined” && typeof currentSrc.adTagUrl != “undefined” ? currentSrc.adTagUrl : false;
if (!adTag || adTag === “”) {
adTag = this.tempVast;
}

hasPreroll = !adTag ? false : true;
} else {
let vastUri = this.vastUri;
if (!vastUri || vastUri === “”) {
vastUri = this.tempVast;
}

hasPreroll = !vastUri ? false : true;
}

if (hasPreroll){
this.handlePreroll();
} else {
console.log(“player:event:” + e.type + ” => triggerEvt:resume-watching”);

this.triggerEvt(“resume-watching”);
}
} else {
console.log(“player:event:” + e.type + ” => triggerEvt:resume-watching”);

this.triggerEvt(“resume-watching”);
}
}
}.bind(videozplayer_2aa2b2));
videozplayer_2aa2b2.player.one([
“adend”,
“adskip”,
“nopreroll”,
“adscanceled”,
“adserror”,
], function (e) {
if (playItemResuming > 0 || playTimeResuming > 0){
// hẹn trigger vào sự kiện playing tiếp theo
this.player.one([
“playing”,
], function (e) {
if (playItemResuming > 0 || playTimeResuming > 0){
console.log(“player:event:” + e.type + ” => triggerEvt:resume-watching”);

this.triggerEvt(“resume-watching”);
}
}.bind(this));
}
}.bind(videozplayer_2aa2b2));
videozplayer_2aa2b2.player.on(“timeupdated”, function (e) {
let currentItem = this.isPlaylist ? this.player.playlist.currentItem() : 0;
let currentTime = this.player.currentTime();

if (currentItem != playItem || Math.abs(currentTime – playTime) > 0.5){// lưu cookie khi có sai khác trên 0.5s
playItem = currentItem;
playTime = currentTime;

if (useStorage && typeof Storage !== “undefined”){
try {
localStorage.setItem(cookieKey, playItem+”:”+playTime);

// console.log(“player:event:” + e.type + ” => set localStorage resume watching to item:” + currentItem + “; time:” + currentTime);
} catch (err){
console.log(“player:event:” + e.type + ” => set localStorage resume watching to item:” + currentItem + “; time:” + currentTime + “; err:” + err.message);
}

// XLCYCMHENG-39918 – player – resume watching – manager keys
player__resume_watching__updatetime__set(cookieKey);
} else {
setCookie(cookieKey, currentItem+”:”+currentTime, (timeLiveKey > 0 ? timeLiveKey : 720), “/”, “24h.com.vn”, “”);

// console.log(“player:event:” + e.type + ” => set cookie resume watching to item:” + currentItem + “; time:” + currentTime);
}
}

if (playItemResuming > 0 || playTimeResuming > 0){
if (currentItem >= playItemResuming && currentTime >= playTimeResuming + 5){
// hủy cố gắng phát tiếp từ cookie khi đã resume thành công & chạy được 1 khoảng
playItemResuming = -1;
playTimeResuming = -1;
// hủy cố gắng chặn quảng cáo
adsTimeResuming = -1;
}
}

// kích hoạt sự kiện onPlay nếu chưa chạy để đảm bảo tracking
if (!this.getState(“sentPlay”) && !this.player.paused()) {
this.triggerEvt(“onPlay”);

console.log(“player:event:” + e.type + ” => triggerEvt:onPlay”);
}
}.bind(videozplayer_2aa2b2));
videozplayer_2aa2b2.player.on([
“seeking”,
“seeked”,
], function (e) {
// hủy cố gắng phát tiếp từ cookie khi user tự thay đổi thời gian xem
playItemResuming = -1;
playTimeResuming = -1;
// hủy cố gắng chặn quảng cáo
adsTimeResuming = -1;
});
videozplayer_2aa2b2.player.on([
“endVid”,
“onPostRollStart”,
“videoended”,
], function (e) {
// hủy cố gắng phát tiếp từ cookie khi đã kết thúc
playItemResuming = -1;
playTimeResuming = -1;
// hủy cố gắng chặn quảng cáo
adsTimeResuming = -1;

playItem = 0;
playTime = 0;

// xóa thông tin lịch sử đang xem
if (useStorage && typeof Storage !== “undefined”){
try {
localStorage.removeItem(cookieKey);

console.log(“player:event:” + e.type + ” => remove localStorage resume watching”);
} catch (err){
console.log(“player:event:” + e.type + ” => remove localStorage resume watching – error: ” + err.message);
}

// XLCYCMHENG-39918 – player – resume watching – manager keys
player__resume_watching__updatetime__set(cookieKey, true);
} else {
setCookie(cookieKey, playItem+”:”+playTime, 1, “/”, “24h.com.vn”, “”);

console.log(“player:event:” + e.type + ” => remove cookie resume watching”);
}
});
videozplayer_2aa2b2.player.on([
“readyforpreroll”,
], function (e) {
if (!adsBefore && adsTimeResuming > 0){
let closeAds = “”;

if (this.player.ads.isInAdMode()){// preroll
if (adsTimeResuming > 5){// thời điểm xem tiếp quá 5s
closeAds = “preroll”;
}
} else {// midroll
let duration = this.player.duration();
if (!duration){
duration = 0;
}
if (adsTimeResuming > 0 && duration > 0 && (
(this.midTime && adsTimeResuming > this.midTime)
|| adsTimeResuming > duration / 2
)
){
closeAds = “midroll”;
}
}

if (closeAds != “”){
this.closeAd();

console.log(“player:event:” + e.type + ” => cancel ” + closeAds + ” – closeAd”);

if (this.player.paused()) {// cố khởi chạy tiếp nếu đang bị dừng
if (this.autoplayRequiresMute){// bắt buộc phải mute -> tắt tiếng để play đc luôn
this.player.muted(true);
}

this.player.play();
}
}
}
}.bind(videozplayer_2aa2b2));
/*RESUME_WATCHING_EVENTS-END*/

videozplayer_2aa2b2.player.on(“onPrerollError”, function(name) {
var objVideos = videojs(vidId+”_html5_api”);
});
videozplayer_2aa2b2.player.on(“AE_completed”, function(name) {
// console.log(“AE_completed AE_completed :”+current_vol_zplayer_2aa2b2);
var is_vd_mute = videozplayer_2aa2b2.player.muted();
if (is_vd_mute == true) {

//videozplayer_2aa2b2.player.volume(0);

setTimeout(function(){
videozplayer_2aa2b2.player.muted(1);
// console.log(“AE_completed AE_completed set MUTED”);
},400);

}
});
videozplayer_2aa2b2.player.on(“onPlay”, function(name) {
// console.log(“onPlay AE_started AE_started :”+current_vol_zplayer_2aa2b2);
var is_vd_mute = videozplayer_2aa2b2.player.muted();
if (is_vd_mute == true) {
if (current_vol_zplayer_2aa2b2 > 0) {
// console.log(“AE SET VOLUME 1111111”);
videozplayer_2aa2b2.player.volume(current_vol_zplayer_2aa2b2);
}
videozplayer_2aa2b2.player.muted(1);
// console.log(“AE MUTE LOAD PLAYER ACTION SET MUTE 111111: “);
}
// console.log(“AE THIS VOLUME is muted :”+videozplayer_2aa2b2.player.muted());
// console.log(“AE THIS VOLUME: “+videozplayer_2aa2b2.player.volume());
// begin 5/10/2017 TuyenNT xu_ly_gan_ga_video_theo_loai_giai_dau_frontend_pc
send_tracking_video(‘none’, ‘Null’, 1702162, 46, ‘daily_news’, ‘pc’, ‘play’, ‘no’, ‘no’, 1, ‘video_noi_dung’);
// end 5/10/2017 TuyenNT xu_ly_gan_ga_video_theo_loai_giai_dau_frontend_pc
//Begin 14-07-2017 : Thangnb tracking_google_tag_manager_video

//End 14-07-2017 : Thangnb tracking_google_tag_manager_video
send_tracking_video(”, ‘none’, 0, 0, ”, ‘pc’, ”, ‘no’, ‘no’, 3, ‘video_noi_dung’);
});
// Begin 12-12-2018 trungcq XLCYCMHENG_33549_xu_ly_scroll_to_top
videozplayer_2aa2b2.player.on(“playerMinimized”, function(name) {
// console.log(“Listener playerMinimized: “);
if ($(“#arrowPageUp”).length) {
$(“#arrowPageUp”).css(“bottom”,”157px”);
$(“#backpage”).css(“bottom”,”200px”);
}
});
videozplayer_2aa2b2.player.on(“playerUnMinimized”, function(name) {
// console.log(“Listener playerUnMinimized: “);
if ($(“#arrowPageUp”).length) {
$(“#arrowPageUp”).css(“bottom”,”20px”);
}
});
videozplayer_2aa2b2.player.on(“miniPlayerClosed”, function(name) {
// console.log(“Listener miniPlayerClosed: “);
if ($(“#arrowPageUp”).length) {
$(“#arrowPageUp”).css(“bottom”,”20px”);
}
});

// End 12-12-2018 trungcq XLCYCMHENG_33549_xu_ly_scroll_to_top

var v_event_tracking_impression_prerollzplayer_2aa2b2 = document.getElementById(“zplayer_2aa2b2_ga_preroll”);
// các trường hợp mã lỗi của trình duyệt trả về
videozplayer_2aa2b2.player.on(“AE_impression”, function(name) {
// Gọi GA load video
if(v_event_tracking_impression_prerollzplayer_2aa2b2){
// Tao thẻ div để chưa link GA
$(“

“).insertBefore(“#zplayer_2aa2b2_ga_preroll”);
if(document.getElementById(“link_ga_tracking_impression_preroll_zplayer_2aa2b2”)){
window.addEventListener(“load”, function(){send_tracking_video(”, ‘none’, 1702162, 46, ‘daily_news’, ‘pc’, ‘impression’, ‘no’, ‘no’, 2, ‘video_noi_dung’);});
}
}
});

var v_event_tracking_click_prerollzplayer_2aa2b2 = document.getElementById(“zplayer_2aa2b2_ga_preroll”);
// các trường hợp mã lỗi của trình duyệt trả về
videozplayer_2aa2b2.player.on(“AE_clicked”, function(name) {
// Gọi GA load video
if(v_event_tracking_click_prerollzplayer_2aa2b2){
// Tao thẻ div để chưa link GA
$(“

“).insertBefore(“#zplayer_2aa2b2_ga_preroll”);
if(document.getElementById(“link_ga_tracking_click_preroll_zplayer_2aa2b2”)){
window.addEventListener(“load”, function(){send_tracking_video(”, ‘none’, 1702162, 46, ‘daily_news’, ‘pc’, ‘ads_click’, ‘no’, ‘no’, 2, ‘video_noi_dung’);});
}
}
});

var v_err_log_1zplayer_2aa2b2 = document.getElementById(“zplayer_2aa2b2_ga_error1”);
// các trường hợp mã lỗi của trình duyệt trả về
videozplayer_2aa2b2.player.on(“MEDIA_ERROR_1″, function (name) {
// Gọi GA load video
if(v_err_log_1zplayer_2aa2b2){
send_tracking_video(”, ‘none’, 1702162, 0, ”, ‘pc’, ‘error_ERROR_1’, ‘no’, ‘no’, 1, ‘video_noi_dung’);
}
});
var v_err_log_2zplayer_2aa2b2 = document.getElementById(“zplayer_2aa2b2_ga_error2”);
videozplayer_2aa2b2.player.on(“MEDIA_ERROR_2″, function (name) {
// Gọi GA load video
if(v_err_log_2zplayer_2aa2b2){
send_tracking_video(”, ‘none’, 1702162, 0, ”, ‘pc’, ‘error_ERROR_2’, ‘no’, ‘no’, 1, ‘video_noi_dung’);
}
});
var v_err_log_3zplayer_2aa2b2 = document.getElementById(“zplayer_2aa2b2_ga_error3”);
videozplayer_2aa2b2.player.on(“MEDIA_ERROR_3″, function (name) {
// Gọi GA load video
if(v_err_log_3zplayer_2aa2b2){
send_tracking_video(”, ‘none’, 1702162, 0, ”, ‘pc’, ‘error_ERROR_3’, ‘no’, ‘no’, 1, ‘video_noi_dung’);
}
});
var v_err_log_4zplayer_2aa2b2 = document.getElementById(“zplayer_2aa2b2_ga_error4”);
videozplayer_2aa2b2.player.on(“MEDIA_ERROR_4″, function (name) {
// Gọi GA load video
if(v_err_log_4zplayer_2aa2b2){
send_tracking_video(”, ‘none’, 1702162, 0, ”, ‘pc’, ‘error_ERROR_4’, ‘no’, ‘no’, 1, ‘video_noi_dung’);
}
});
var v_err_log_5zplayer_2aa2b2 = document.getElementById(“zplayer_2aa2b2_ga_error5”);
videozplayer_2aa2b2.player.on(“MEDIA_ERROR_5″, function (name) {
// Gọi GA load video
if(v_err_log_5zplayer_2aa2b2){
send_tracking_video(”, ‘none’, 1702162, 0, ”, ‘pc’, ‘error_ERROR_5’, ‘no’, ‘no’, 1, ‘video_noi_dung’);
}
});

videozplayer_2aa2b2.player.on(“track_slow_playlist_next_1”, function(){
console.log(“track_slow_playlist_next_1”);
$(“

“).insertBefore(“#zplayer_2aa2b2_ga_media_slow_waiting”);

var v_track_slow_playlist_zplayer_2aa2b21 = document.getElementById(“link_slow_playlist_next_zplayer_2aa2b21”);
if(v_track_slow_playlist_zplayer_2aa2b21){
window.addEventListener(“load”, function(){send_tracking_video(”, ‘none’, 1702162, 0, ”, ‘pc’, ‘slow_playlist_next’, ‘no’, ‘no’, 1, ‘video_noi_dung’);});
}
});

videozplayer_2aa2b2.player.on(“track_slow_playlist_next_2”, function(){
console.log(“track_slow_playlist_next_2”);
$(“

“).insertBefore(“#zplayer_2aa2b2_ga_media_slow_waiting”);

var v_track_slow_playlist_zplayer_2aa2b22 = document.getElementById(“link_slow_playlist_next_zplayer_2aa2b22”);
if(v_track_slow_playlist_zplayer_2aa2b22){
window.addEventListener(“load”, function(){send_tracking_video(”, ‘none’, 1702162, 0, ”, ‘pc’, ‘slow_playlist_next’, ‘no’, ‘no’, 1, ‘video_noi_dung’);});
}
});

videozplayer_2aa2b2.player.on(“track_slow_playlist_next_3”, function(){
console.log(“track_slow_playlist_next_3”);
$(“

“).insertBefore(“#zplayer_2aa2b2_ga_media_slow_waiting”);

var v_track_slow_playlist_zplayer_2aa2b23 = document.getElementById(“link_slow_playlist_next_zplayer_2aa2b23”);
if(v_track_slow_playlist_zplayer_2aa2b23){
window.addEventListener(“load”, function(){send_tracking_video(”, ‘none’, 1702162, 0, ”, ‘pc’, ‘slow_playlist_next’, ‘no’, ‘no’, 1, ‘video_noi_dung’);});
}
});

videozplayer_2aa2b2.player.on(“track_slow_playlist_next_4”, function(){
console.log(“track_slow_playlist_next_4”);
$(“

“).insertBefore(“#zplayer_2aa2b2_ga_media_slow_waiting”);

var v_track_slow_playlist_zplayer_2aa2b24 = document.getElementById(“link_slow_playlist_next_zplayer_2aa2b24”);
if(v_track_slow_playlist_zplayer_2aa2b24){
window.addEventListener(“load”, function(){send_tracking_video(”, ‘none’, 1702162, 0, ”, ‘pc’, ‘slow_playlist_next’, ‘no’, ‘no’, 1, ‘video_noi_dung’);});
}
});

videozplayer_2aa2b2.player.on(“track_slow_playlist_next_5”, function(){
console.log(“track_slow_playlist_next_5”);
$(“

“).insertBefore(“#zplayer_2aa2b2_ga_media_slow_waiting”);

var v_track_slow_playlist_zplayer_2aa2b25 = document.getElementById(“link_slow_playlist_next_zplayer_2aa2b25”);
if(v_track_slow_playlist_zplayer_2aa2b25){
window.addEventListener(“load”, function(){send_tracking_video(”, ‘none’, 1702162, 0, ”, ‘pc’, ‘slow_playlist_next’, ‘no’, ‘no’, 1, ‘video_noi_dung’);});
}
});

videozplayer_2aa2b2.player.on(“track_slow_playlist_next_6”, function(){
console.log(“track_slow_playlist_next_6”);
$(“

“).insertBefore(“#zplayer_2aa2b2_ga_media_slow_waiting”);

var v_track_slow_playlist_zplayer_2aa2b26 = document.getElementById(“link_slow_playlist_next_zplayer_2aa2b26”);
if(v_track_slow_playlist_zplayer_2aa2b26){
window.addEventListener(“load”, function(){send_tracking_video(”, ‘none’, 1702162, 0, ”, ‘pc’, ‘slow_playlist_next’, ‘no’, ‘no’, 1, ‘video_noi_dung’);});
}
});

videozplayer_2aa2b2.player.on(“track_slow_playlist_next_7”, function(){
console.log(“track_slow_playlist_next_7”);
$(“

“).insertBefore(“#zplayer_2aa2b2_ga_media_slow_waiting”);

var v_track_slow_playlist_zplayer_2aa2b27 = document.getElementById(“link_slow_playlist_next_zplayer_2aa2b27”);
if(v_track_slow_playlist_zplayer_2aa2b27){
window.addEventListener(“load”, function(){send_tracking_video(”, ‘none’, 1702162, 0, ”, ‘pc’, ‘slow_playlist_next’, ‘no’, ‘no’, 1, ‘video_noi_dung’);});
}
});

videozplayer_2aa2b2.player.on(“track_slow_playlist_next_8”, function(){
console.log(“track_slow_playlist_next_8”);
$(“

“).insertBefore(“#zplayer_2aa2b2_ga_media_slow_waiting”);

var v_track_slow_playlist_zplayer_2aa2b28 = document.getElementById(“link_slow_playlist_next_zplayer_2aa2b28”);
if(v_track_slow_playlist_zplayer_2aa2b28){
window.addEventListener(“load”, function(){send_tracking_video(”, ‘none’, 1702162, 0, ”, ‘pc’, ‘slow_playlist_next’, ‘no’, ‘no’, 1, ‘video_noi_dung’);});
}
});

videozplayer_2aa2b2.player.on(“track_slow_playlist_next_9”, function(){
console.log(“track_slow_playlist_next_9”);
$(“

“).insertBefore(“#zplayer_2aa2b2_ga_media_slow_waiting”);

var v_track_slow_playlist_zplayer_2aa2b29 = document.getElementById(“link_slow_playlist_next_zplayer_2aa2b29”);
if(v_track_slow_playlist_zplayer_2aa2b29){
window.addEventListener(“load”, function(){send_tracking_video(”, ‘none’, 1702162, 0, ”, ‘pc’, ‘slow_playlist_next’, ‘no’, ‘no’, 1, ‘video_noi_dung’);});
}
});

videozplayer_2aa2b2.player.on(“track_slow_playlist_next_10”, function(){
console.log(“track_slow_playlist_next_10”);
$(“

“).insertBefore(“#zplayer_2aa2b2_ga_media_slow_waiting”);

var v_track_slow_playlist_zplayer_2aa2b210 = document.getElementById(“link_slow_playlist_next_zplayer_2aa2b210”);
if(v_track_slow_playlist_zplayer_2aa2b210){
window.addEventListener(“load”, function(){send_tracking_video(”, ‘none’, 1702162, 0, ”, ‘pc’, ‘slow_playlist_next’, ‘no’, ‘no’, 1, ‘video_noi_dung’);});
}
});

videozplayer_2aa2b2.player.on(“timeupdated”, function () {
if (count_time_update_zplayer_2aa2b2 < 50) {
count_time_update_zplayer_2aa2b2++;
// console.log(“AE TIME UPDATE: “+count_time_update_zplayer_2aa2b2);
}
if(v_load_recommend_boxzplayer_2aa2b2 && typeof(v_thoi_luong_hien_thi) != “undefined” && v_thoi_luong_hien_thi != “”){
try{
var v_time_current = videozplayer_2aa2b2.player.currentTime();
if(v_time_current > 0){
if(v_time_current >= v_thoi_luong_hien_thi){
function getJsonRecomment(url,callback){
if(url == “”){
return “”;
}
dynamicIdLive = new Date().valueOf();
url = url+dynamicIdLive;
var xhr = new XMLHttpRequest();
// Get url
xhr.open(“GET”, url, true);
// Kiểu phản hồi
xhr.responseType = “json”;
xhr.timeout = 50000; // Set timeout to 2 seconds
xhr.ontimeout = function () {console.log(url+” – timeout”);}
// Load data
xhr.onload = function() {
var status = xhr.status;
if (status == 200) {
callback(xhr.response);
}else{
console.log(“B3: status != 200”);
}
};
xhr.send();
}
if(typeof v_url_json_data_recomment != “undefined”){
getJsonRecomment(v_url_json_data_recomment,function(v_object_recomend){
if(typeof v_object_recomend != “undefined” && parseInt(v_object_recomend.length) > 0){
var recomment_arr_video_ngay_hien_tai = _getStorageJson24h(“recomment_video_ngay_hien_tai_data_news_id”);
var recomment_video_ngay_hom_qua_data_news_id = _getStorageJson24h(“recomment_video_ngay_hom_qua_data_news_id”);
// Lặp để loại bỏ những bài đang xem
var arr_recomend_video = new Array();
var k=0;
var v_so_luong_tin_hien_thi = parseInt(v_object_recomend[0][“c_tong_so_luong_tin_hien_thi”]);
for(j=0;j 0){
if(v_recomment_news_id== parseInt(v_object_recomend[j][“c_new_id”])){
continue;
}
if(typeof(recomment_arr_video_ngay_hien_tai) != “undefined” && recomment_arr_video_ngay_hien_tai.indexOf(parseInt(v_object_recomend[j][“c_new_id”])) >= 0){
continue;
}
if(typeof(recomment_video_ngay_hom_qua_data_news_id) != “undefined” && recomment_video_ngay_hom_qua_data_news_id.indexOf(parseInt(v_object_recomend[j][“c_new_id”])) >= 0){
continue;
}
}
arr_recomend_video[k] = v_object_recomend[j];
k++;
if(k >= v_so_luong_tin_hien_thi){
break;
}
}
var v_total_page_recommend =0;
v_total_page_recommend = parseInt(Math.ceil(parseInt(arr_recomend_video.length)/parseInt(v_object_recomend[0][“c_number_items”])));
// Tao HTML video recommend
arr_recomend_video[0][“c_tracking_onclick”] = “”;
arr_recomend_video[0][“c_tracking_onload”] = “”;
arr_recomend_video[0][“c_tracking_onload_gatag”] = “”;
var v_html_recomend = tao_html_recommend_video_tu_object(arr_recomend_video,”zplayer_2aa2b2″);
// Gắn HTML vào chuỗi
if(v_html_recomend !=””){
// Nếu tồn tại video highlight
if ($(“#vjs-marker-tableinfo-zplayer_2aa2b2”).length) {
$(“#vjs-marker-tableinfo-zplayer_2aa2b2”).after(v_html_recomend);
} else {
if ($(“#zplayer_2aa2b2_ga_preroll”).length) {
$(“#zplayer_2aa2b2_ga_preroll”).before(v_html_recomend);
}
}
// Hiển thị dạng slide
if ($(“#box_recommend_zplayer_2aa2b2”).length) {
$(“#box_recommend_zplayer_2aa2b2”).show(1000);
setTimeout(function(){
create_slide_page_number_recommend_video_json(“swiper_recommend_v2018zplayer_2aa2b2”, “swpier_container_zplayer_2aa2b2″,”swiper_active_slide_zplayer_2aa2b2”, “pagination-zplayer_2aa2b2″,”wrapper_zplayer_2aa2b2”,v_total_page_recommend, “swiper-slide slide_zplayer_2aa2b2”, “prvVid_recommendzplayer_2aa2b2”, “nxtVid_recommendzplayer_2aa2b2”);
$(“#box_recommend_zplayer_2aa2b2”).css(“height”, “”);
}, 900);
}
}
}
});
}
v_load_recommend_boxzplayer_2aa2b2 = false;
}
}
}catch(e){
console.log([“Errors”, e]);
}
}
});

videozplayer_2aa2b2.player.on(“MEDIA_SLOW_WAITING”, function (evt, data) {
//console.log(data.waitTime);
var v_slow_waiting_zplayer_2aa2b2 = document.getElementById(“zplayer_2aa2b2_ga_media_slow_waiting”);
if(v_slow_waiting_zplayer_2aa2b2){
//đổi ms về s
v_so_giay_load = parseInt(data.waitTime/1000);
send_tracking_video(”, ”, 1702162, ”, ”, ”, ‘media_slow_waiting’, ”, ”, 6, v_so_giay_load);
}
//console.log(“listener MEDIA_SLOW_WAITING: “);
});
videozplayer_2aa2b2.player.on(“MEDIA_SLOW_METADATA”, function (evt, data) {
//console.log(data.waitTime);
var v_slow_metadata_zplayer_2aa2b2 = document.getElementById(“zplayer_2aa2b2_ga_media_slow_metadata”);
if(v_slow_metadata_zplayer_2aa2b2){
//đổi ms về s
v_so_giay_load_metadata = parseInt(data.waitTime/1000);
send_tracking_video(”, ”, 1702162, ”, ”, ”, ‘media_slow_metadata’, ”, ”, 6, v_so_giay_load_metadata);
}
//console.log(“listener MEDIA_SLOW_METADATA: “);
});
videozplayer_2aa2b2.player.on(‘onPrerollStart’, function(name){
//console.log(‘ON PREROLL START’);

/* begin 4/10/2017 TuyenNT xu_ly_gan_ga_video_theo_loai_giai_dau_frontend_pc */
send_tracking_video(‘none’, ‘Null’, 1702162, 46, ‘daily_news’, ‘pc’, ‘preroll_impression’, ‘no’, ‘no’, 1, ‘video_noi_dung’);
/* end 4/10/2017 TuyenNT xu_ly_gan_ga_video_theo_loai_giai_dau_frontend_pc */

});videozplayer_2aa2b2.player.on(‘onOverlayStart’, function(name){
//console.log(‘ON OVERLAY START’);

/* begin 4/10/2017 TuyenNT xu_ly_gan_ga_video_theo_loai_giai_dau_frontend_pc */
send_tracking_video(‘none’, ‘Null’, 1702162, 46, ‘daily_news’, ‘pc’, ‘overlay_impression’, ‘no’, ‘no’, 1, ‘video_noi_dung’);
/* end 4/10/2017 TuyenNT xu_ly_gan_ga_video_theo_loai_giai_dau_frontend_pc */

});videozplayer_2aa2b2.player.on(‘onPostRollStart’, function(name){
//console.log(‘ON POSTROLL START’);

/* begin 4/10/2017 TuyenNT xu_ly_gan_ga_video_theo_loai_giai_dau_frontend_pc */
send_tracking_video(‘none’, ‘Null’, 1702162, 46, ‘daily_news’, ‘pc’, ‘postroll_impression’, ‘no’, ‘no’, 1, ‘video_noi_dung’);
/* end 4/10/2017 TuyenNT xu_ly_gan_ga_video_theo_loai_giai_dau_frontend_pc */

});

videozplayer_2aa2b2.player.on([
“play”,
“playing”,
“adstart”,
“adplaying”,
], function (evt, data) {

if (typeof stop_video_news_live == “function”){
stop_video_news_live(“___”);
}

});

videozplayer_2aa2b2.player.one([
“play”,
], function (e) {
let vastUri = this.vastUri;
let vastUriPost = this.vastUriPost;
let vastUriMid = this.vastUriMid;

// Neu co cau hinh autoplay nhung trình duyet k cho phep auto play thi gan tham so bang vpmute = 0
if(this.viewportAutoPlay == true && this.willAutoplay === false){
if(vastUri != “”){
this.vastUri = vastUri + “&vpmute=0”;
}
if(vastUriPost != “”){
this.vastUriPost = vastUriPost + “&vpmute=0”;
}
if(vastUriMid != “”){
this.vastUriMid = vastUriMid + “&vpmute=0”;
}
}
}.bind(videozplayer_2aa2b2));

videozplayer_2aa2b2.player.on([
“contentchanged”,
], function (e) {
this.player.one([
“playing”,
], function (e) {
var currentItem = this.isPlaylist ? this.player.playlist.currentItem() : 0;

// đợi player xử lý 1s mới bắt đầu check xem có chạy được không
setTimeout(function(){
// đã thay đổi item –> bỏ qua
var chk_currentItem = this.isPlaylist ? this.player.playlist.currentItem() : 0;
if (chk_currentItem != currentItem){
return;
}

var has_timeupdate = false;

this.player.one([
“timeupdate”,
], function (e) {
has_timeupdate = true;
});

setTimeout(function(){
if (has_timeupdate){
return;
}

if (this.player.paused()){
return;
}

this.dbglog(“timeupdate_missing –> try to restart”);

this.player.pause();
setTimeout(function(){
this.player.play();
}.bind(this), 100);
}.bind(this), 300);
}.bind(this), 1000);
}.bind(this));
}.bind(videozplayer_2aa2b2));

videozplayer_2aa2b2.player.on(“onStop”, function(name) {
//console.log(“listener onStop: “);

});

videozplayer_2aa2b2.player.on(“onFullscreen”, function(name) {
// 20250808 – XLCYCMHENG-44473 – xử lý bỏ neo khi mở chế độ fullscreen
// đang ở chế độ neo
if (this.hasClass(“mini-player”)){
this.removeClasses([“mini-player”, “pc-mini-player”]);
this.minPlayerHideCloseBtn();
this.unminimizeOnFullscreen = true;
}
}.bind(videozplayer_2aa2b2));
videozplayer_2aa2b2.player.on(“onFullscreenOff”, function(name) {
// 20250808 – XLCYCMHENG-44473 – xử lý neo lại khi thoát chế độ fullscreen
// từng bỏ neo khi mở chế độ fullscreen
if (typeof this.unminimizeOnFullscreen != “undefined” && this.unminimizeOnFullscreen){
this.addClasses([“mini-player”, “pc-mini-player”]);
this.minPlayerDisplayCloseBtn();
this.unminimizeOnFullscreen = false;
}
}.bind(videozplayer_2aa2b2));
}
videoAdsInitzplayer_2aa2b2 = true;
}
// Ga video load luôn được chạy
window.addEventListener(“load”, function(){});window.addEventListener(“load”, function(){});
function inViewport( element ){
// Get the elements position relative to the viewport
var bb = element.getBoundingClientRect();
// Check if the element is outside the viewport
// Then invert the returned value because you want to know the opposite
return !(bb.top > innerHeight || bb.bottom < 0);
}
var zplayer_2aa2b2VpElm = document.getElementById( “zplayer_2aa2b2” );

var viszplayer_2aa2b2 = (function () {
var stateKey, eventKey, keys = {
hidden: “visibilitychange”,
webkitHidden: “webkitvisibilitychange”,
mozHidden: “mozvisibilitychange”,
msHidden: “msvisibilitychange”
};
for (stateKey in keys) {
if (stateKey in document) {
eventKey = keys[stateKey];
break;
}
}
return function (c) {
if (c) document.addEventListener(eventKey, c);
return !document[stateKey];
}
})();

var videoAds1Elmzplayer_2aa2b2 = document.getElementById(“v-24hContainer_zplayer_2aa2b2”);
document.addEventListener(“DOMContentLoaded”, function () {
if(videoAds1Elmzplayer_2aa2b2){
var videoAdsInitzplayer_2aa2b2 = false;
var checkTabActivezplayer_2aa2b2 = setInterval(function () {
if (inViewport(videoAds1Elmzplayer_2aa2b2) && viszplayer_2aa2b2() && !videoAdsInitzplayer_2aa2b2 && typeof(window.videojs) !== “undefined” && (typeof(google) !== “undefined” || adBlockCheckedStatus) && videoObj) {
initvideozplayer_2aa2b2();
clearInterval(checkTabActivezplayer_2aa2b2);
}
// 20230817 fix lỗi lần đầu vào đợi onload check chặn quảng cáo quá lâu
// XLCYCMHENG-42783 – async lib ima3 -> tăng thời gian chờ load ima3
else if (typeof videoObjRoot != “undefined” && videoObjRoot){
if (typeof videoAdsInitzplayer_2aa2b2_fix_AdBlockCheck == “undefined”){
setTimeout(function(){
if (typeof adBlockCheckedStatus != “undefined” && !adBlockCheckedStatus){
adBlockCheckedStatus = true;
adBlockEnabled = false;
}
}, 2000);

videoAdsInitzplayer_2aa2b2_fix_AdBlockCheck = true;
}
}
}, 100);
}
}, false);

//]]>

//

Xe máy điện di chuyển giữa dòng nước ngập. Video: Ngọc Thành


18h05

Người dân xếp hàng mua vé metro

Tại ga Thượng Đình, người dân xếp hàng dài mua vé đi metro Cát Linh – Hà Đông trong khi các tuyến phố xung quanh đều tắc cứng. Trên đường Nguyễn Trãi, ôtô, xe máy chen nhau không còn chỗ trống, nhiều người đi lên vỉa hè khiến giao thông càng hỗn loạn.

Người dân xếp hàng chờ mua vé metro ở ga Thượng Đình. Ảnh: Hoàng Giang

Người dân xếp hàng chờ mua vé metro ở ga Thượng Đình. Ảnh: Hoàng Giang

Phương tiện trên đường Nguyễn Trãi. Ảnh: Hoàng Giang

Phương tiện trên đường Nguyễn Trãi. Ảnh: Hoàng Giang

Dưới lòng đường vừa ngập vừa tắc, nhiều xe máy lao lên vỉa hè khiến giao thông thêm hỗn loạn. Ảnh: Hoàng Giang

Dưới lòng đường vừa ngập vừa tắc, nhiều xe máy lao lên vỉa hè khiến giao thông thêm hỗn loạn. Ảnh: Hoàng Giang


17h55

Nhiều ôtô ngâm dưới nước ở khu vực Liễu Giai

Chiều 30/9, nhiều tuyến phố như Liễu Giai, Phan Kế Bính ngập sâu khiến giao thông tê liệt, nhiều ôtô chết máy, có chiếc nổi lềnh bềnh giữa dòng. Khu vực Công viên Thủ Lệ, Trung tâm thương mại Lotte cũng chìm trong biển nước, người dân phải lội bì bõm đi mua đồ ăn tối hoặc tìm đường vòng để làm việc.

Nhiều ôtô ngâm trong nước trên phố Liễu Giai. Ảnh: Văn Doanh

Nhiều ôtô ngâm trong nước trên phố Liễu Giai. Ảnh: Văn Doanh

Người dân bất lực nhìn ôtô nổi lềnh bềnh trong nước ở khu vực Liễu Giai, Phan Kế Bính. Ảnh: Văn Doanh

Người dân bất lực nhìn ôtô nổi lềnh bềnh trong nước ở khu vực Liễu Giai, Phan Kế Bính. Ảnh: Văn Doanh

Người dân lội nước ngập nửa người, vất vả di chuyển trên phố. Ảnh: Văn Doanh

Người dân lội nước ngập nửa người, vất vả di chuyển trên phố. Ảnh: Văn Doanh

Nhiều tuyến phố ở Giảng Võ biến thành sông. Ảnh: Văn Doanh

Nhiều tuyến phố ở Giảng Võ biến thành sông. Ảnh: Văn Doanh

Anh Lê Văn Doanh, 38 tuổi, làm việc trên phố Linh Lang, cho biết khu vực này ngập nặng từ trưa đến tối vẫn chưa rút. Hai vợ chồng anh làm ở nhà hàng Nhật phải cho nguyên liệu vào thùng nhựa kéo qua dòng nước để kịp phục vụ tiệc tối. Anh mong nước sớm rút để có thể về nhà với hai con ở Đội Cấn, cách chỗ làm 2,5 km.


17h45

Muôn kiểu tìm lối thoát ùn tắc

Đường vành đai 3 tắc cứng, người dân đi xe máy, đi bộ trên dải phân cách trên đường để tìm lối thoát khỏi ùn tắc.

Chị Hoàng Thị Ngân (áo hồng), cho biết đi Tuyên Quang lúc 8h sáng tới 16h mới đến bến xe Mỹ Đình, muộn gần hai tiếng vì tắc đường. Đường ngập khắp nơi, người phụ nữ 43 tuổi gọi con đón nhưng không được, đặt xe không ai nhận, đành ngồi thêm hai tiếng đợi nước rút mới về Dương Nội, Hà Đông. Xuống Hà Nội nhiều lần nhưng chưa bao giờ chị Ngân gặp cảnh ngập tắc khắp nơi như hôm nay.

Người dân đi bộ trên dải phân cách vành đai 3 để tránh đoạn ngập. Ảnh: Tùng Đinh

Người dân đi bộ trên dải phân cách vành đai 3 để tránh đoạn ngập. Ảnh: Tùng Đinh

Dắt xe máy trên dải phân cách. Ảnh: Tùng Đinh

Dắt xe máy trên dải phân cách. Ảnh: Tùng Đinh

Chị Ngân ở Tuyên Quang, xuống bến xe Mỹ Đình đợi hơn 2 tiếng đồng hồ chưa bắt được xe về Dương Nội, Hà Đông. Ảnh: Tùng Đinh

Chị Ngân ở Tuyên Quang, xuống bến xe Mỹ Đình đợi hơn 2 tiếng đồng hồ chưa bắt được xe về Dương Nội, Hà Đông. Ảnh: Tùng Đinh


17h35

Giao thông khu vực Phạm Hùng – Mễ Trì tê liệt

Đường vành đai 3 đoạn Phạm Hùng – Mễ Trì gần như tê liệt vì ngập lụt, các phương tiện nối đuôi nhau nhích từng chút một.

Người đi xe máy ngã trên đường Phạm Hùng - khu đô thị Mễ Trì. Ảnh: Ngọc Thành

Người đi xe máy ngã trên đường Phạm Hùng – khu đô thị Mễ Trì. Ảnh: Ngọc Thành

Dòng xe cộ di chuyển chậm trên đoạn đường vừa ngập vừa tắc. Ảnh: Ngọc Thành

Dòng xe cộ di chuyển chậm trên đoạn đường vừa ngập vừa tắc. Ảnh: Ngọc Thành

Tài xế đợi chờ qua đoạn đường tắc. Ảnh: Ngọc Thành

Tài xế đợi chờ qua đoạn đường tắc. Ảnh: Ngọc Thành

//

// 0) {
// console.log(“AE volByCookie VAR : “+volByCookie);
vid_vol_var = volByCookie;
}
}
// console.log(“AE VIDVOL VAR : “+vid_vol_var);
var vidLoaded = false,
dynamicId,
vidId,
parentVid = “v-24hContainer_zplayer_8df213”,
videoElmStr = ‘

‘+
‘To view this video please enable JavaScript, and consider upgrading to a web browser that ‘+
supports HTML5 video ‘+
‘ ‘ +
”,
videozplayer_8df213,
videoAds1Conf = {
“poster”: “https://cdn.24h.com.vn/upload/3-2025/images/2025-09-30/1759231940-phamhung.jpg”,

“offsetWatchPercent”: 20,
“stopOtherOnPlay”: true,
“parentVid”: parentVid,
“offHighlightOnBannerBottom”:false,
“vidErrorLog”: 1,
“skipAble”: true,
“skipTime”: 5000,
/*CDN_DOMAIN_HLS*/

“skipAdsBtnContent”: “Skip Ad”,
“showAdVol”: true,
“VIDEOID”: “zplayer_8df213”,
/*MINI_VIDEO*/
“viewportAutoPlay”: true,
“vidVol” : vid_vol_var,
//”adVolIncrease”: 0.25,
//”showVolIncreasement”:1,
//”adVol” : “0.15”,
“trackSlowMedia”:1,
“secondToLoadMedia”:3000,
“secondToLoadMeta”:3000,
“prerollTimeEnd” : 31,
“midrollTimeEnd” : 15,
“postrollTimeEnd” : 30,
“skipAdsBtnPos”: “bottom-left”,

“fastSeek”: {step: 5},
“userAgent”: “Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.7 Safari/605.1.15”,
“adLoadTimeout” : 8000

,”vastUri”: “https%3A%2F%2Fpubads.g.doubleclick.net%2Fgampad%2Fads%3Fsz%3D640x360%26iu%3D%2F124557882%2F24h%2Fus%2Fdesktop%2Fdaily_news%2Fpreroll%26impl%3Ds%26gdfp_req%3D1%26env%3Dvp%26output%3Dvast%26unviewed_position_start%3D1%26url%3Dhttps%253A%252F%252Fwww.24h.com.vn%252Ftin-tuc-trong-ngay%252Fgiao-thong-ha-noi-hon-loan-gio-tan-tam-vi-mua-lon-c46a1702162.html%26description_url%3Dhttps%253A%252F%252Fwww.24h.com.vn%252Ftin-tuc-trong-ngay%252Fgiao-thong-ha-noi-hon-loan-gio-tan-tam-vi-mua-lon-c46a1702162.html%26correlator%3D1759237330%26ambient%3D1%26plcmt%3D2″
,”vastUriPost” : “https%3A%2F%2Fpubads.g.doubleclick.net%2Fgampad%2Fads%3Fsz%3D528x297%26iu%3D%2F124557882%2F24h%2Fus%2Fdesktop%2Fdaily_news%2Fpostroll%26impl%3Ds%26gdfp_req%3D1%26env%3Dvp%26output%3Dvast%26unviewed_position_start%3D1%26url%3Dhttps%253A%252F%252Fwww.24h.com.vn%252Ftin-tuc-trong-ngay%252Fgiao-thong-ha-noi-hon-loan-gio-tan-tam-vi-mua-lon-c46a1702162.html%26description_url%3Dhttps%253A%252F%252Fwww.24h.com.vn%252Ftin-tuc-trong-ngay%252Fgiao-thong-ha-noi-hon-loan-gio-tan-tam-vi-mua-lon-c46a1702162.html%26correlator%3D1759237330%26ambient%3D1%26plcmt%3D2″
,”vastUriMid” : “https%3A%2F%2Fvideo.24h.com.vn%2Fupload%2Fhtml%2Ftempvast.xml”
,”midTime”: 10
/*FALL_BACK*/
/*PLAYLIST_ITEM*/
/*DRM_VIDEO*/

//{set_highlight_zplayer_html5}
/*ID_BANNER_SPONSOR*/
}
if (volByCookie != null) {
if (volByCookie <= 0) {
// console.log("AE volByCookie VAR set MUTED : "+volByCookie);
videoAds1Conf.muted = 1;
}
}
if(document.getElementById(parentVid).innerHTML.trim() == ""){
loadVidzplayer_8df213();
vidLoaded = true;
}

var count_time_update_zplayer_8df213 = 0;

function loadVidzplayer_8df213(){
dynamicId = new Date().valueOf();
vidId = "my-video-multiple1_"+dynamicId;
videoAds1Conf.VIDEOID = vidId;
if(vidLoaded==true){
videoAds1Conf.viewportAutoPlay = false;
}

var newVideStr = videoElmStr.replace(/__VIDIDzplayer_8df213__/g, vidId);

document.getElementById(parentVid).innerHTML = newVideStr;
if (typeof adBlockEnabled_Unique != "undefined"){
// XLCYCMHENG-42783 – player – async lib ima3 + multi video – fix bug adBlockEnabled không đồng nhất
adBlockEnabled = adBlockEnabled_Unique;
}
videozplayer_8df213 = new videoObj(videoAds1Conf);

// console.log("AE LOAD PLAYER");
// console.log(videoAds1Conf);
// console.log("AE THIS VOLUME LOAD PLAYER muted VAR :"+videoAds1Conf.muteByUser);
//console.log("AE THIS VOLUME LOAD PLAYER is muted :"+videozplayer_8df213.player.muted());
//console.log("AE THIS VOLUME LOAD PLAYER: "+videozplayer_8df213.player.volume());
//console.log("AE THIS VOLUME LOAD PLAYER CURRENT VOLUME : "+current_vol_zplayer_8df213);
if ((typeof(videoAds1Conf.muteByUser) != "undefined" && videoAds1Conf.muteByUser == 1) || (volByCookie != null && volByCookie 0) {
videoAds1Conf.vidVol = current_vol_zplayer_8df213;
videoAds1Conf.muteByUser = 0;
} else {
videoAds1Conf.muteByUser = 1;
videoAds1Conf.vidVol = 0;
}
var videoConf = videoAds1Conf;
videoConf.viewportAutoPlay = false;
// console.log(“AE videoConf: “, videoConf);
var element = document.getElementById(videoConf.VIDEOID);
// element.parentNode.removeChild(element);
// videozplayer_8df213 = undefined;
videozplayer_8df213.player.dispose();
loadVidzplayer_8df213();
});

videozplayer_8df213.player.on(“loadeddata”, function(){
// 20220224 fix lỗi không khởi tạo đc playerInitHeight
if (this.playerInitHeight <= 0){
this.playerInitHeight = Math.round(this.getById(this.VIDEOID).getBoundingClientRect().height)
this.dbglog("this.playerInitHeight: " + this.playerInitHeight)

this.playerHasSponsorInitHeight = Math.floor(this.getById(this.VIDEOID).getBoundingClientRect().height) – 1;// làm tròn xuống & -1
this.dbglog("this.playerHasSponsorInitHeight: " + this.playerHasSponsorInitHeight);
}
}.bind(videozplayer_8df213));

videozplayer_8df213.player.on("volumechange", function(){
var new_vd_volume = videozplayer_8df213.player.volume();
// console.log("AE volume change");
// console.log("AE THIS VOLUME AFTER CHANGE: "+videozplayer_8df213.player.volume());
// console.log("AE volume change is mute : "+videozplayer_8df213.player.muted());
var is_vd_muted = videozplayer_8df213.player.muted();
var check_set_cookie = false;
if (new_vd_volume 10) {
is_vd_muted = true;
}
if (is_vd_muted == true) {
// console.log(“AE is_vd_muted TRUE”);
if (current_vol_zplayer_8df213 > 0 && count_time_update_zplayer_8df213 > 10) {
check_set_cookie = true;
}
current_vol_zplayer_8df213 = 0;
videozplayer_8df213.player.muted(1);
setTimeout(function(){
videozplayer_8df213.player.muted(1);
},300);
} else {
// console.log(“AE is_vd_muted FALSE”);
if (volByCookie <= 0 && count_time_update_zplayer_8df213 < 5) {
check_set_cookie = false;
} else {
check_set_cookie = true;
}
current_vol_zplayer_8df213 = new_vd_volume;
}
// console.log("AE check_set_cookie: "+check_set_cookie);
if (check_set_cookie == true) {
setCookie("videoVolumeByUser", current_vol_zplayer_8df213, 30*24, "/", "24h.com.vn", "");// lưu cookie 30 ngày
// console.log("AE SET COOKIE");
} else {
// console.log("AE NOTTTT SET COOKIE");
}
// console.log("AE THIS VOLUME AFTER CHANGE LATER: "+current_vol_zplayer_8df213);
}.bind(videozplayer_8df213));

videozplayer_8df213.player.ready(function () {
// XLCYCMHENG-38546 – [24H] Tối ưu khoảng trống trên/dưới banner sponsor_video_top / sponsor_video_botton
if (this.idBannerBottom != ""){
let vidEl = this.getById(this.VIDEOID);
let vidHeight = vidEl.getBoundingClientRect().height;

// làm tròn xuống & -1 height div chứa player
let parentHeight = Math.floor(vidHeight) – 1;
vidEl.parentNode.style.height = parentHeight + "px";
vidEl.parentNode.style.overflowY = "hidden";

// căn player lùi lên 0.7px
vidEl.style.marginTop = "-0.7px";

// 20220110: fix lỗi khi xem chế độ theater
let style = document.createElement("style");
style.type = "text/css";
style.innerHTML = ".theaterDisplay .video-js.vjs-16-9{margin-top: 0px !important}";
document.getElementsByTagName("head")[0].appendChild(style);
}

// XLCYCMHENG-44429 – 24h – Lỗi giao diện khi thu nhỏ màn hình – lỗi chiều cao theaterMod khi zoom
if (this.theaterMod && this.theaterMod.height) {
let style = document.createElement("style");
style.type = "text/css";
style.innerHTML = ".theaterDisplay .video-js.vjs-16-9-custom.zoomed:not(.mini-player){padding-top: 0px !important}";
document.getElementsByTagName("head")[0].appendChild(style);
}

// bổ sung class zoomed-out / zoomed-in theo chế độ zoom thực tế
function updateVideoZoomState() {
let vidEl = this.getById(this.VIDEOID);

const zoom = Math.round(window.devicePixelRatio * 100);

vidEl.classList.remove("zoomed", "zoomed-out", "zoomed-in");
if (zoom != 100) {
vidEl.classList.add("zoomed", zoom chưa xử lý; > 0 -> item cần nhảy tới; đã xử lý xong
let playTimeResuming = 0; // 0 -> chưa xử lý; > 0 -> thời điểm cần nhảy tới; đã xử lý xong
let useStorage = true; // sử dụng Storage để lưu trữ – không bị giới hạn số lượng, dung lượng, thời gian; không bị gửi lên server khi request trang
let minDuration = 10;
let adsTimeResuming = 0;
let adsBefore = true;
// XLCYCMHENG-39918 – player – resume watching – manager keys
// Math.floor(Date.now() / 1000) -> thời gian hiện tại (giây) theo UTC
let timeLiveKey = 720;
let updatetimeKey = “player__resume_watching__updatetime”;

// lấy item + thời gian đã xem từ cookie
let watching = “”;

if (useStorage && typeof Storage !== “undefined”){
// XLCYCMHENG-39918 – player – resume watching – manager keys
// khai báo hàm lấy thời điểm cập nhật key
var player__resume_watching__updatetime__get = function (key) {
if (typeof key == “undefined” || !key){return 0;}

let default_time = (new Date(“2022-10-01 00:00:00”)).getTime(); // mặc định nếu không có thời điểm cập nhật cũ
let updatetime = default_time;
let updatetime_all_text = localStorage.getItem(updatetimeKey);
if (updatetime_all_text != “”){
try {
let updatetime_all_obj = JSON.parse(updatetime_all_text);
if (typeof updatetime_all_obj == “object” && updatetime_all_obj !== null && typeof updatetime_all_obj[key] != “undefined”){
updatetime = parseInt(updatetime_all_obj[key]);
if (isNaN(updatetime)){
updatetime = default_time;
}
}
} catch (err){}
}

return updatetime;
};

// XLCYCMHENG-39918 – player – resume watching – manager keys
// khai báo hàm lưu thời điểm cập nhật key
var player__resume_watching__updatetime__set = function (key, remove_key) {
if (typeof key == “undefined” || !key){return false;}

if (typeof remove_key == “undefined”){
remove_key = false;
}

let updatetime_all_obj = {};
let updatetime_all_text = localStorage.getItem(updatetimeKey);
if (updatetime_all_text != “”){
try {
updatetime_all_obj = JSON.parse(updatetime_all_text);
} catch (err){}
}
if (typeof updatetime_all_obj != “object” || updatetime_all_obj === null){
updatetime_all_obj = {};

// danh sách các key có trong localStorage
let arr_all_key = Object.keys(localStorage);
if (typeof arr_all_key == “object” && arr_all_key !== null){
try {
// các key lưu lịch sử xem tiếp cũ chưa từng được đưa vào danh sách thời điểm cập nhật
let arr_key = arr_all_key.filter(key => key.match(/player__resume_watching_(.*)/));
if (typeof arr_key == “object” && arr_key !== null){
for (let i in arr_key) {
updatetime_all_obj[arr_key[i]] = Math.floor(Date.now() / 1000);
}
}
} catch (err){}
}
}

if (!remove_key){// cập nhật thời điểm cập nhật
updatetime_all_obj[key] = Math.floor(Date.now() / 1000);

try {
localStorage.setItem(updatetimeKey, JSON.stringify(updatetime_all_obj));
} catch (err){
console.log(“player: => set localStorage updatetimeKey after update – error: ” + err.message);
}
} else if (typeof updatetime_all_obj[key] != “undefined”){// remove nếu có thời điểm cập nhật cũ
delete updatetime_all_obj[key];

try {
localStorage.setItem(updatetimeKey, JSON.stringify(updatetime_all_obj));
} catch (err){
console.log(“player: => set localStorage updatetimeKey after delete – error: ” + err.message);
}
}

return true;
};

// lấy lịch sử đang xem
watching = localStorage.getItem(cookieKey);

console.log(“player: => get localStorage resume watching: ” + watching);

// có key -> check hết hạn key thì xóa, không dùng
if (timeLiveKey > 0 && watching !== null && watching !== “”){
let updatetime = player__resume_watching__updatetime__get(cookieKey);
if (updatetime + 60 * 60 * timeLiveKey remove expires localStorage resume watching: ” + cookieKey);
} catch (err){
console.log(“player: => remove expires localStorage resume watching: ” + cookieKey + ” – error: ” + err.message);
}
}
}
} else {
watching = getCookie(cookieKey);

console.log(“player: => get cookie resume watching: ” + watching);
}

if (!watching || typeof watching != “string”){
watching = “”;
}

if (watching != “”){
let arr_watching = watching.split(“:”);
if (arr_watching.length >= 2){
let watchingItem = parseInt(arr_watching[0]);
let watchingTime = parseFloat(arr_watching[1]);

if (!isNaN(watchingItem) && watchingItem > 0){
playItemResuming = watchingItem;// lưu item cần nhảy tới khi bắt đầu chạy video
}

if (!isNaN(watchingTime) && watchingTime > 0){
playTimeResuming = watchingTime;// lưu thời gian cần nhảy tới khi bắt đầu chạy video

adsTimeResuming = watchingTime;// lưu thời gian quảng cáo cần xử lý
}

if (playItemResuming > 0 || playTimeResuming > 0){
if (playItemResuming > 0){
adsTimeResuming = 100000;// playlist xem từ item thứ 2 -> chặn luôn preroll và midroll
}

console.log(“player: => need resume watching to item:” + playItemResuming + “; time:” + playTimeResuming);
}
}
}

videozplayer_8df213.player.on([
“resume-watching”,
], function (e) {
if (minDuration > 0 && typeof this.tracking != “undefined” && typeof this.tracking.video != “undefined”){
let duration = 0;

if (typeof this.tracking.video.playlistTotalMins != “undefined”){
duration = this.tracking.video.playlistTotalMins;
}

if (typeof this.tracking.video.vidDuration != “undefined”){
duration = this.tracking.video.vidDuration;
}

if (duration > 0 && duration hủy cố gắng phát tiếp
playItemResuming = -1;
playTimeResuming = -1;
// hủy cố gắng chặn quảng cáo
adsTimeResuming = -1;
}
}

if (playItemResuming > 0 || playTimeResuming > 0){
let currentItem = this.isPlaylist ? this.player.playlist.currentItem() : 0;

if (playItemResuming > 0 && this.isPlaylist && this.player.playlist.lastIndex() > 0){
if (playItemResuming > this.player.playlist.lastIndex()){
playItemResuming %= (this.player.playlist.lastIndex() + 1);
}

if (this.player.playlist.currentItem() != playItemResuming){
this.player.playlist.currentItem(playItemResuming);// nhảy tới item

console.log(“player:event:” + e.type + ” => resume watching item:” + this.player.playlist.currentItem());
}
}

if (currentItem != playItemResuming && playTimeResuming > 0){
// hẹn trigger vào sự kiện play/loadeddata tiếp theo (sau khi load được item) -> thay đổi time sau
this.player.one([
“play”,
“loadeddata”,
], function (e) {
if (playItemResuming > 0 || playTimeResuming > 0){
console.log(“player:event:” + e.type + ” => triggerEvt:resume-watching”);

this.triggerEvt(“resume-watching”);
}
}.bind(this));

return;
}

if (playTimeResuming > 0){
this.player.currentTime(playTimeResuming);
}

playItem = this.isPlaylist ? this.player.playlist.currentItem() : 0;
playTime = this.player.currentTime();

console.log(“player:event:” + e.type + ” => resume watching item:” + playItem + “; time:” + playTime);

// kích hoạt sự kiện onPlay nếu chưa chạy để đảm bảo tracking
if (!this.getState(“sentPlay”) && !this.player.paused()) {
this.triggerEvt(“onPlay”);

console.log(“player:event:” + e.type + ” => triggerEvt:onPlay”);
}
}
}.bind(videozplayer_8df213));
videozplayer_8df213.player.one([
“play”,
“loadeddata”,
], function (e) {
if (playItemResuming > 0 || playTimeResuming > 0){
if (adsBefore){
let hasPreroll = false;

if (this.isPlaylist){
let currentItem = this.player.playlist.currentItem();
let currentItemSource = this.playlistConf;
let currentSrc = currentItemSource[currentItem].sources[0];

let adTag = typeof currentSrc != “undefined” && typeof currentSrc.adTagUrl != “undefined” ? currentSrc.adTagUrl : false;
if (!adTag || adTag === “”) {
adTag = this.tempVast;
}

hasPreroll = !adTag ? false : true;
} else {
let vastUri = this.vastUri;
if (!vastUri || vastUri === “”) {
vastUri = this.tempVast;
}

hasPreroll = !vastUri ? false : true;
}

if (hasPreroll){
this.handlePreroll();
} else {
console.log(“player:event:” + e.type + ” => triggerEvt:resume-watching”);

this.triggerEvt(“resume-watching”);
}
} else {
console.log(“player:event:” + e.type + ” => triggerEvt:resume-watching”);

this.triggerEvt(“resume-watching”);
}
}
}.bind(videozplayer_8df213));
videozplayer_8df213.player.one([
“adend”,
“adskip”,
“nopreroll”,
“adscanceled”,
“adserror”,
], function (e) {
if (playItemResuming > 0 || playTimeResuming > 0){
// hẹn trigger vào sự kiện playing tiếp theo
this.player.one([
“playing”,
], function (e) {
if (playItemResuming > 0 || playTimeResuming > 0){
console.log(“player:event:” + e.type + ” => triggerEvt:resume-watching”);

this.triggerEvt(“resume-watching”);
}
}.bind(this));
}
}.bind(videozplayer_8df213));
videozplayer_8df213.player.on(“timeupdated”, function (e) {
let currentItem = this.isPlaylist ? this.player.playlist.currentItem() : 0;
let currentTime = this.player.currentTime();

if (currentItem != playItem || Math.abs(currentTime – playTime) > 0.5){// lưu cookie khi có sai khác trên 0.5s
playItem = currentItem;
playTime = currentTime;

if (useStorage && typeof Storage !== “undefined”){
try {
localStorage.setItem(cookieKey, playItem+”:”+playTime);

// console.log(“player:event:” + e.type + ” => set localStorage resume watching to item:” + currentItem + “; time:” + currentTime);
} catch (err){
console.log(“player:event:” + e.type + ” => set localStorage resume watching to item:” + currentItem + “; time:” + currentTime + “; err:” + err.message);
}

// XLCYCMHENG-39918 – player – resume watching – manager keys
player__resume_watching__updatetime__set(cookieKey);
} else {
setCookie(cookieKey, currentItem+”:”+currentTime, (timeLiveKey > 0 ? timeLiveKey : 720), “/”, “24h.com.vn”, “”);

// console.log(“player:event:” + e.type + ” => set cookie resume watching to item:” + currentItem + “; time:” + currentTime);
}
}

if (playItemResuming > 0 || playTimeResuming > 0){
if (currentItem >= playItemResuming && currentTime >= playTimeResuming + 5){
// hủy cố gắng phát tiếp từ cookie khi đã resume thành công & chạy được 1 khoảng
playItemResuming = -1;
playTimeResuming = -1;
// hủy cố gắng chặn quảng cáo
adsTimeResuming = -1;
}
}

// kích hoạt sự kiện onPlay nếu chưa chạy để đảm bảo tracking
if (!this.getState(“sentPlay”) && !this.player.paused()) {
this.triggerEvt(“onPlay”);

console.log(“player:event:” + e.type + ” => triggerEvt:onPlay”);
}
}.bind(videozplayer_8df213));
videozplayer_8df213.player.on([
“seeking”,
“seeked”,
], function (e) {
// hủy cố gắng phát tiếp từ cookie khi user tự thay đổi thời gian xem
playItemResuming = -1;
playTimeResuming = -1;
// hủy cố gắng chặn quảng cáo
adsTimeResuming = -1;
});
videozplayer_8df213.player.on([
“endVid”,
“onPostRollStart”,
“videoended”,
], function (e) {
// hủy cố gắng phát tiếp từ cookie khi đã kết thúc
playItemResuming = -1;
playTimeResuming = -1;
// hủy cố gắng chặn quảng cáo
adsTimeResuming = -1;

playItem = 0;
playTime = 0;

// xóa thông tin lịch sử đang xem
if (useStorage && typeof Storage !== “undefined”){
try {
localStorage.removeItem(cookieKey);

console.log(“player:event:” + e.type + ” => remove localStorage resume watching”);
} catch (err){
console.log(“player:event:” + e.type + ” => remove localStorage resume watching – error: ” + err.message);
}

// XLCYCMHENG-39918 – player – resume watching – manager keys
player__resume_watching__updatetime__set(cookieKey, true);
} else {
setCookie(cookieKey, playItem+”:”+playTime, 1, “/”, “24h.com.vn”, “”);

console.log(“player:event:” + e.type + ” => remove cookie resume watching”);
}
});
videozplayer_8df213.player.on([
“readyforpreroll”,
], function (e) {
if (!adsBefore && adsTimeResuming > 0){
let closeAds = “”;

if (this.player.ads.isInAdMode()){// preroll
if (adsTimeResuming > 5){// thời điểm xem tiếp quá 5s
closeAds = “preroll”;
}
} else {// midroll
let duration = this.player.duration();
if (!duration){
duration = 0;
}
if (adsTimeResuming > 0 && duration > 0 && (
(this.midTime && adsTimeResuming > this.midTime)
|| adsTimeResuming > duration / 2
)
){
closeAds = “midroll”;
}
}

if (closeAds != “”){
this.closeAd();

console.log(“player:event:” + e.type + ” => cancel ” + closeAds + ” – closeAd”);

if (this.player.paused()) {// cố khởi chạy tiếp nếu đang bị dừng
if (this.autoplayRequiresMute){// bắt buộc phải mute -> tắt tiếng để play đc luôn
this.player.muted(true);
}

this.player.play();
}
}
}
}.bind(videozplayer_8df213));
/*RESUME_WATCHING_EVENTS-END*/

videozplayer_8df213.player.on(“onPrerollError”, function(name) {
var objVideos = videojs(vidId+”_html5_api”);
});
videozplayer_8df213.player.on(“AE_completed”, function(name) {
// console.log(“AE_completed AE_completed :”+current_vol_zplayer_8df213);
var is_vd_mute = videozplayer_8df213.player.muted();
if (is_vd_mute == true) {

//videozplayer_8df213.player.volume(0);

setTimeout(function(){
videozplayer_8df213.player.muted(1);
// console.log(“AE_completed AE_completed set MUTED”);
},400);

}
});
videozplayer_8df213.player.on(“onPlay”, function(name) {
// console.log(“onPlay AE_started AE_started :”+current_vol_zplayer_8df213);
var is_vd_mute = videozplayer_8df213.player.muted();
if (is_vd_mute == true) {
if (current_vol_zplayer_8df213 > 0) {
// console.log(“AE SET VOLUME 1111111”);
videozplayer_8df213.player.volume(current_vol_zplayer_8df213);
}
videozplayer_8df213.player.muted(1);
// console.log(“AE MUTE LOAD PLAYER ACTION SET MUTE 111111: “);
}
// console.log(“AE THIS VOLUME is muted :”+videozplayer_8df213.player.muted());
// console.log(“AE THIS VOLUME: “+videozplayer_8df213.player.volume());
// begin 5/10/2017 TuyenNT xu_ly_gan_ga_video_theo_loai_giai_dau_frontend_pc
send_tracking_video(‘none’, ‘Null’, 1702162, 46, ‘daily_news’, ‘pc’, ‘play’, ‘no’, ‘no’, 1, ‘video_noi_dung’);
// end 5/10/2017 TuyenNT xu_ly_gan_ga_video_theo_loai_giai_dau_frontend_pc
//Begin 14-07-2017 : Thangnb tracking_google_tag_manager_video

//End 14-07-2017 : Thangnb tracking_google_tag_manager_video
send_tracking_video(”, ‘none’, 0, 0, ”, ‘pc’, ”, ‘no’, ‘no’, 3, ‘video_noi_dung’);
});
// Begin 12-12-2018 trungcq XLCYCMHENG_33549_xu_ly_scroll_to_top
videozplayer_8df213.player.on(“playerMinimized”, function(name) {
// console.log(“Listener playerMinimized: “);
if ($(“#arrowPageUp”).length) {
$(“#arrowPageUp”).css(“bottom”,”157px”);
$(“#backpage”).css(“bottom”,”200px”);
}
});
videozplayer_8df213.player.on(“playerUnMinimized”, function(name) {
// console.log(“Listener playerUnMinimized: “);
if ($(“#arrowPageUp”).length) {
$(“#arrowPageUp”).css(“bottom”,”20px”);
}
});
videozplayer_8df213.player.on(“miniPlayerClosed”, function(name) {
// console.log(“Listener miniPlayerClosed: “);
if ($(“#arrowPageUp”).length) {
$(“#arrowPageUp”).css(“bottom”,”20px”);
}
});

// End 12-12-2018 trungcq XLCYCMHENG_33549_xu_ly_scroll_to_top

var v_event_tracking_impression_prerollzplayer_8df213 = document.getElementById(“zplayer_8df213_ga_preroll”);
// các trường hợp mã lỗi của trình duyệt trả về
videozplayer_8df213.player.on(“AE_impression”, function(name) {
// Gọi GA load video
if(v_event_tracking_impression_prerollzplayer_8df213){
// Tao thẻ div để chưa link GA
$(“

“).insertBefore(“#zplayer_8df213_ga_preroll”);
if(document.getElementById(“link_ga_tracking_impression_preroll_zplayer_8df213”)){
window.addEventListener(“load”, function(){send_tracking_video(”, ‘none’, 1702162, 46, ‘daily_news’, ‘pc’, ‘impression’, ‘no’, ‘no’, 2, ‘video_noi_dung’);});
}
}
});

var v_event_tracking_click_prerollzplayer_8df213 = document.getElementById(“zplayer_8df213_ga_preroll”);
// các trường hợp mã lỗi của trình duyệt trả về
videozplayer_8df213.player.on(“AE_clicked”, function(name) {
// Gọi GA load video
if(v_event_tracking_click_prerollzplayer_8df213){
// Tao thẻ div để chưa link GA
$(“

“).insertBefore(“#zplayer_8df213_ga_preroll”);
if(document.getElementById(“link_ga_tracking_click_preroll_zplayer_8df213”)){
window.addEventListener(“load”, function(){send_tracking_video(”, ‘none’, 1702162, 46, ‘daily_news’, ‘pc’, ‘ads_click’, ‘no’, ‘no’, 2, ‘video_noi_dung’);});
}
}
});

var v_err_log_1zplayer_8df213 = document.getElementById(“zplayer_8df213_ga_error1”);
// các trường hợp mã lỗi của trình duyệt trả về
videozplayer_8df213.player.on(“MEDIA_ERROR_1″, function (name) {
// Gọi GA load video
if(v_err_log_1zplayer_8df213){
send_tracking_video(”, ‘none’, 1702162, 0, ”, ‘pc’, ‘error_ERROR_1’, ‘no’, ‘no’, 1, ‘video_noi_dung’);
}
});
var v_err_log_2zplayer_8df213 = document.getElementById(“zplayer_8df213_ga_error2”);
videozplayer_8df213.player.on(“MEDIA_ERROR_2″, function (name) {
// Gọi GA load video
if(v_err_log_2zplayer_8df213){
send_tracking_video(”, ‘none’, 1702162, 0, ”, ‘pc’, ‘error_ERROR_2’, ‘no’, ‘no’, 1, ‘video_noi_dung’);
}
});
var v_err_log_3zplayer_8df213 = document.getElementById(“zplayer_8df213_ga_error3”);
videozplayer_8df213.player.on(“MEDIA_ERROR_3″, function (name) {
// Gọi GA load video
if(v_err_log_3zplayer_8df213){
send_tracking_video(”, ‘none’, 1702162, 0, ”, ‘pc’, ‘error_ERROR_3’, ‘no’, ‘no’, 1, ‘video_noi_dung’);
}
});
var v_err_log_4zplayer_8df213 = document.getElementById(“zplayer_8df213_ga_error4”);
videozplayer_8df213.player.on(“MEDIA_ERROR_4″, function (name) {
// Gọi GA load video
if(v_err_log_4zplayer_8df213){
send_tracking_video(”, ‘none’, 1702162, 0, ”, ‘pc’, ‘error_ERROR_4’, ‘no’, ‘no’, 1, ‘video_noi_dung’);
}
});
var v_err_log_5zplayer_8df213 = document.getElementById(“zplayer_8df213_ga_error5”);
videozplayer_8df213.player.on(“MEDIA_ERROR_5″, function (name) {
// Gọi GA load video
if(v_err_log_5zplayer_8df213){
send_tracking_video(”, ‘none’, 1702162, 0, ”, ‘pc’, ‘error_ERROR_5’, ‘no’, ‘no’, 1, ‘video_noi_dung’);
}
});

videozplayer_8df213.player.on(“track_slow_playlist_next_1”, function(){
console.log(“track_slow_playlist_next_1”);
$(“

“).insertBefore(“#zplayer_8df213_ga_media_slow_waiting”);

var v_track_slow_playlist_zplayer_8df2131 = document.getElementById(“link_slow_playlist_next_zplayer_8df2131”);
if(v_track_slow_playlist_zplayer_8df2131){
window.addEventListener(“load”, function(){send_tracking_video(”, ‘none’, 1702162, 0, ”, ‘pc’, ‘slow_playlist_next’, ‘no’, ‘no’, 1, ‘video_noi_dung’);});
}
});

videozplayer_8df213.player.on(“track_slow_playlist_next_2”, function(){
console.log(“track_slow_playlist_next_2”);
$(“

“).insertBefore(“#zplayer_8df213_ga_media_slow_waiting”);

var v_track_slow_playlist_zplayer_8df2132 = document.getElementById(“link_slow_playlist_next_zplayer_8df2132”);
if(v_track_slow_playlist_zplayer_8df2132){
window.addEventListener(“load”, function(){send_tracking_video(”, ‘none’, 1702162, 0, ”, ‘pc’, ‘slow_playlist_next’, ‘no’, ‘no’, 1, ‘video_noi_dung’);});
}
});

videozplayer_8df213.player.on(“track_slow_playlist_next_3”, function(){
console.log(“track_slow_playlist_next_3”);
$(“

“).insertBefore(“#zplayer_8df213_ga_media_slow_waiting”);

var v_track_slow_playlist_zplayer_8df2133 = document.getElementById(“link_slow_playlist_next_zplayer_8df2133”);
if(v_track_slow_playlist_zplayer_8df2133){
window.addEventListener(“load”, function(){send_tracking_video(”, ‘none’, 1702162, 0, ”, ‘pc’, ‘slow_playlist_next’, ‘no’, ‘no’, 1, ‘video_noi_dung’);});
}
});

videozplayer_8df213.player.on(“track_slow_playlist_next_4”, function(){
console.log(“track_slow_playlist_next_4”);
$(“

“).insertBefore(“#zplayer_8df213_ga_media_slow_waiting”);

var v_track_slow_playlist_zplayer_8df2134 = document.getElementById(“link_slow_playlist_next_zplayer_8df2134”);
if(v_track_slow_playlist_zplayer_8df2134){
window.addEventListener(“load”, function(){send_tracking_video(”, ‘none’, 1702162, 0, ”, ‘pc’, ‘slow_playlist_next’, ‘no’, ‘no’, 1, ‘video_noi_dung’);});
}
});

videozplayer_8df213.player.on(“track_slow_playlist_next_5”, function(){
console.log(“track_slow_playlist_next_5”);
$(“

“).insertBefore(“#zplayer_8df213_ga_media_slow_waiting”);

var v_track_slow_playlist_zplayer_8df2135 = document.getElementById(“link_slow_playlist_next_zplayer_8df2135”);
if(v_track_slow_playlist_zplayer_8df2135){
window.addEventListener(“load”, function(){send_tracking_video(”, ‘none’, 1702162, 0, ”, ‘pc’, ‘slow_playlist_next’, ‘no’, ‘no’, 1, ‘video_noi_dung’);});
}
});

videozplayer_8df213.player.on(“track_slow_playlist_next_6”, function(){
console.log(“track_slow_playlist_next_6”);
$(“

“).insertBefore(“#zplayer_8df213_ga_media_slow_waiting”);

var v_track_slow_playlist_zplayer_8df2136 = document.getElementById(“link_slow_playlist_next_zplayer_8df2136”);
if(v_track_slow_playlist_zplayer_8df2136){
window.addEventListener(“load”, function(){send_tracking_video(”, ‘none’, 1702162, 0, ”, ‘pc’, ‘slow_playlist_next’, ‘no’, ‘no’, 1, ‘video_noi_dung’);});
}
});

videozplayer_8df213.player.on(“track_slow_playlist_next_7”, function(){
console.log(“track_slow_playlist_next_7”);
$(“

“).insertBefore(“#zplayer_8df213_ga_media_slow_waiting”);

var v_track_slow_playlist_zplayer_8df2137 = document.getElementById(“link_slow_playlist_next_zplayer_8df2137”);
if(v_track_slow_playlist_zplayer_8df2137){
window.addEventListener(“load”, function(){send_tracking_video(”, ‘none’, 1702162, 0, ”, ‘pc’, ‘slow_playlist_next’, ‘no’, ‘no’, 1, ‘video_noi_dung’);});
}
});

videozplayer_8df213.player.on(“track_slow_playlist_next_8”, function(){
console.log(“track_slow_playlist_next_8”);
$(“

“).insertBefore(“#zplayer_8df213_ga_media_slow_waiting”);

var v_track_slow_playlist_zplayer_8df2138 = document.getElementById(“link_slow_playlist_next_zplayer_8df2138”);
if(v_track_slow_playlist_zplayer_8df2138){
window.addEventListener(“load”, function(){send_tracking_video(”, ‘none’, 1702162, 0, ”, ‘pc’, ‘slow_playlist_next’, ‘no’, ‘no’, 1, ‘video_noi_dung’);});
}
});

videozplayer_8df213.player.on(“track_slow_playlist_next_9”, function(){
console.log(“track_slow_playlist_next_9”);
$(“

“).insertBefore(“#zplayer_8df213_ga_media_slow_waiting”);

var v_track_slow_playlist_zplayer_8df2139 = document.getElementById(“link_slow_playlist_next_zplayer_8df2139”);
if(v_track_slow_playlist_zplayer_8df2139){
window.addEventListener(“load”, function(){send_tracking_video(”, ‘none’, 1702162, 0, ”, ‘pc’, ‘slow_playlist_next’, ‘no’, ‘no’, 1, ‘video_noi_dung’);});
}
});

videozplayer_8df213.player.on(“track_slow_playlist_next_10”, function(){
console.log(“track_slow_playlist_next_10”);
$(“

“).insertBefore(“#zplayer_8df213_ga_media_slow_waiting”);

var v_track_slow_playlist_zplayer_8df21310 = document.getElementById(“link_slow_playlist_next_zplayer_8df21310”);
if(v_track_slow_playlist_zplayer_8df21310){
window.addEventListener(“load”, function(){send_tracking_video(”, ‘none’, 1702162, 0, ”, ‘pc’, ‘slow_playlist_next’, ‘no’, ‘no’, 1, ‘video_noi_dung’);});
}
});

videozplayer_8df213.player.on(“timeupdated”, function () {
if (count_time_update_zplayer_8df213 < 50) {
count_time_update_zplayer_8df213++;
// console.log(“AE TIME UPDATE: “+count_time_update_zplayer_8df213);
}
if(v_load_recommend_boxzplayer_8df213 && typeof(v_thoi_luong_hien_thi) != “undefined” && v_thoi_luong_hien_thi != “”){
try{
var v_time_current = videozplayer_8df213.player.currentTime();
if(v_time_current > 0){
if(v_time_current >= v_thoi_luong_hien_thi){
function getJsonRecomment(url,callback){
if(url == “”){
return “”;
}
dynamicIdLive = new Date().valueOf();
url = url+dynamicIdLive;
var xhr = new XMLHttpRequest();
// Get url
xhr.open(“GET”, url, true);
// Kiểu phản hồi
xhr.responseType = “json”;
xhr.timeout = 50000; // Set timeout to 2 seconds
xhr.ontimeout = function () {console.log(url+” – timeout”);}
// Load data
xhr.onload = function() {
var status = xhr.status;
if (status == 200) {
callback(xhr.response);
}else{
console.log(“B3: status != 200”);
}
};
xhr.send();
}
if(typeof v_url_json_data_recomment != “undefined”){
getJsonRecomment(v_url_json_data_recomment,function(v_object_recomend){
if(typeof v_object_recomend != “undefined” && parseInt(v_object_recomend.length) > 0){
var recomment_arr_video_ngay_hien_tai = _getStorageJson24h(“recomment_video_ngay_hien_tai_data_news_id”);
var recomment_video_ngay_hom_qua_data_news_id = _getStorageJson24h(“recomment_video_ngay_hom_qua_data_news_id”);
// Lặp để loại bỏ những bài đang xem
var arr_recomend_video = new Array();
var k=0;
var v_so_luong_tin_hien_thi = parseInt(v_object_recomend[0][“c_tong_so_luong_tin_hien_thi”]);
for(j=0;j 0){
if(v_recomment_news_id== parseInt(v_object_recomend[j][“c_new_id”])){
continue;
}
if(typeof(recomment_arr_video_ngay_hien_tai) != “undefined” && recomment_arr_video_ngay_hien_tai.indexOf(parseInt(v_object_recomend[j][“c_new_id”])) >= 0){
continue;
}
if(typeof(recomment_video_ngay_hom_qua_data_news_id) != “undefined” && recomment_video_ngay_hom_qua_data_news_id.indexOf(parseInt(v_object_recomend[j][“c_new_id”])) >= 0){
continue;
}
}
arr_recomend_video[k] = v_object_recomend[j];
k++;
if(k >= v_so_luong_tin_hien_thi){
break;
}
}
var v_total_page_recommend =0;
v_total_page_recommend = parseInt(Math.ceil(parseInt(arr_recomend_video.length)/parseInt(v_object_recomend[0][“c_number_items”])));
// Tao HTML video recommend
arr_recomend_video[0][“c_tracking_onclick”] = “”;
arr_recomend_video[0][“c_tracking_onload”] = “”;
arr_recomend_video[0][“c_tracking_onload_gatag”] = “”;
var v_html_recomend = tao_html_recommend_video_tu_object(arr_recomend_video,”zplayer_8df213″);
// Gắn HTML vào chuỗi
if(v_html_recomend !=””){
// Nếu tồn tại video highlight
if ($(“#vjs-marker-tableinfo-zplayer_8df213”).length) {
$(“#vjs-marker-tableinfo-zplayer_8df213”).after(v_html_recomend);
} else {
if ($(“#zplayer_8df213_ga_preroll”).length) {
$(“#zplayer_8df213_ga_preroll”).before(v_html_recomend);
}
}
// Hiển thị dạng slide
if ($(“#box_recommend_zplayer_8df213”).length) {
$(“#box_recommend_zplayer_8df213”).show(1000);
setTimeout(function(){
create_slide_page_number_recommend_video_json(“swiper_recommend_v2018zplayer_8df213”, “swpier_container_zplayer_8df213″,”swiper_active_slide_zplayer_8df213”, “pagination-zplayer_8df213″,”wrapper_zplayer_8df213”,v_total_page_recommend, “swiper-slide slide_zplayer_8df213”, “prvVid_recommendzplayer_8df213”, “nxtVid_recommendzplayer_8df213”);
$(“#box_recommend_zplayer_8df213”).css(“height”, “”);
}, 900);
}
}
}
});
}
v_load_recommend_boxzplayer_8df213 = false;
}
}
}catch(e){
console.log([“Errors”, e]);
}
}
});

videozplayer_8df213.player.on(“MEDIA_SLOW_WAITING”, function (evt, data) {
//console.log(data.waitTime);
var v_slow_waiting_zplayer_8df213 = document.getElementById(“zplayer_8df213_ga_media_slow_waiting”);
if(v_slow_waiting_zplayer_8df213){
//đổi ms về s
v_so_giay_load = parseInt(data.waitTime/1000);
send_tracking_video(”, ”, 1702162, ”, ”, ”, ‘media_slow_waiting’, ”, ”, 6, v_so_giay_load);
}
//console.log(“listener MEDIA_SLOW_WAITING: “);
});
videozplayer_8df213.player.on(“MEDIA_SLOW_METADATA”, function (evt, data) {
//console.log(data.waitTime);
var v_slow_metadata_zplayer_8df213 = document.getElementById(“zplayer_8df213_ga_media_slow_metadata”);
if(v_slow_metadata_zplayer_8df213){
//đổi ms về s
v_so_giay_load_metadata = parseInt(data.waitTime/1000);
send_tracking_video(”, ”, 1702162, ”, ”, ”, ‘media_slow_metadata’, ”, ”, 6, v_so_giay_load_metadata);
}
//console.log(“listener MEDIA_SLOW_METADATA: “);
});
videozplayer_8df213.player.on(‘onPrerollStart’, function(name){
//console.log(‘ON PREROLL START’);

/* begin 4/10/2017 TuyenNT xu_ly_gan_ga_video_theo_loai_giai_dau_frontend_pc */
send_tracking_video(‘none’, ‘Null’, 1702162, 46, ‘daily_news’, ‘pc’, ‘preroll_impression’, ‘no’, ‘no’, 1, ‘video_noi_dung’);
/* end 4/10/2017 TuyenNT xu_ly_gan_ga_video_theo_loai_giai_dau_frontend_pc */

});videozplayer_8df213.player.on(‘onOverlayStart’, function(name){
//console.log(‘ON OVERLAY START’);

/* begin 4/10/2017 TuyenNT xu_ly_gan_ga_video_theo_loai_giai_dau_frontend_pc */
send_tracking_video(‘none’, ‘Null’, 1702162, 46, ‘daily_news’, ‘pc’, ‘overlay_impression’, ‘no’, ‘no’, 1, ‘video_noi_dung’);
/* end 4/10/2017 TuyenNT xu_ly_gan_ga_video_theo_loai_giai_dau_frontend_pc */

});videozplayer_8df213.player.on(‘onPostRollStart’, function(name){
//console.log(‘ON POSTROLL START’);

/* begin 4/10/2017 TuyenNT xu_ly_gan_ga_video_theo_loai_giai_dau_frontend_pc */
send_tracking_video(‘none’, ‘Null’, 1702162, 46, ‘daily_news’, ‘pc’, ‘postroll_impression’, ‘no’, ‘no’, 1, ‘video_noi_dung’);
/* end 4/10/2017 TuyenNT xu_ly_gan_ga_video_theo_loai_giai_dau_frontend_pc */

});

videozplayer_8df213.player.on([
“play”,
“playing”,
“adstart”,
“adplaying”,
], function (evt, data) {

if (typeof stop_video_news_live == “function”){
stop_video_news_live(“___”);
}

});

videozplayer_8df213.player.one([
“play”,
], function (e) {
let vastUri = this.vastUri;
let vastUriPost = this.vastUriPost;
let vastUriMid = this.vastUriMid;

// Neu co cau hinh autoplay nhung trình duyet k cho phep auto play thi gan tham so bang vpmute = 0
if(this.viewportAutoPlay == true && this.willAutoplay === false){
if(vastUri != “”){
this.vastUri = vastUri + “&vpmute=0”;
}
if(vastUriPost != “”){
this.vastUriPost = vastUriPost + “&vpmute=0”;
}
if(vastUriMid != “”){
this.vastUriMid = vastUriMid + “&vpmute=0”;
}
}
}.bind(videozplayer_8df213));

videozplayer_8df213.player.on([
“contentchanged”,
], function (e) {
this.player.one([
“playing”,
], function (e) {
var currentItem = this.isPlaylist ? this.player.playlist.currentItem() : 0;

// đợi player xử lý 1s mới bắt đầu check xem có chạy được không
setTimeout(function(){
// đã thay đổi item –> bỏ qua
var chk_currentItem = this.isPlaylist ? this.player.playlist.currentItem() : 0;
if (chk_currentItem != currentItem){
return;
}

var has_timeupdate = false;

this.player.one([
“timeupdate”,
], function (e) {
has_timeupdate = true;
});

setTimeout(function(){
if (has_timeupdate){
return;
}

if (this.player.paused()){
return;
}

this.dbglog(“timeupdate_missing –> try to restart”);

this.player.pause();
setTimeout(function(){
this.player.play();
}.bind(this), 100);
}.bind(this), 300);
}.bind(this), 1000);
}.bind(this));
}.bind(videozplayer_8df213));

videozplayer_8df213.player.on(“onStop”, function(name) {
//console.log(“listener onStop: “);

});

videozplayer_8df213.player.on(“onFullscreen”, function(name) {
// 20250808 – XLCYCMHENG-44473 – xử lý bỏ neo khi mở chế độ fullscreen
// đang ở chế độ neo
if (this.hasClass(“mini-player”)){
this.removeClasses([“mini-player”, “pc-mini-player”]);
this.minPlayerHideCloseBtn();
this.unminimizeOnFullscreen = true;
}
}.bind(videozplayer_8df213));
videozplayer_8df213.player.on(“onFullscreenOff”, function(name) {
// 20250808 – XLCYCMHENG-44473 – xử lý neo lại khi thoát chế độ fullscreen
// từng bỏ neo khi mở chế độ fullscreen
if (typeof this.unminimizeOnFullscreen != “undefined” && this.unminimizeOnFullscreen){
this.addClasses([“mini-player”, “pc-mini-player”]);
this.minPlayerDisplayCloseBtn();
this.unminimizeOnFullscreen = false;
}
}.bind(videozplayer_8df213));
}
videoAdsInitzplayer_8df213 = true;
}
// Ga video load luôn được chạy
window.addEventListener(“load”, function(){});window.addEventListener(“load”, function(){});
function inViewport( element ){
// Get the elements position relative to the viewport
var bb = element.getBoundingClientRect();
// Check if the element is outside the viewport
// Then invert the returned value because you want to know the opposite
return !(bb.top > innerHeight || bb.bottom < 0);
}
var zplayer_8df213VpElm = document.getElementById( “zplayer_8df213” );

var viszplayer_8df213 = (function () {
var stateKey, eventKey, keys = {
hidden: “visibilitychange”,
webkitHidden: “webkitvisibilitychange”,
mozHidden: “mozvisibilitychange”,
msHidden: “msvisibilitychange”
};
for (stateKey in keys) {
if (stateKey in document) {
eventKey = keys[stateKey];
break;
}
}
return function (c) {
if (c) document.addEventListener(eventKey, c);
return !document[stateKey];
}
})();

var videoAds1Elmzplayer_8df213 = document.getElementById(“v-24hContainer_zplayer_8df213”);
document.addEventListener(“DOMContentLoaded”, function () {
if(videoAds1Elmzplayer_8df213){
var videoAdsInitzplayer_8df213 = false;
var checkTabActivezplayer_8df213 = setInterval(function () {
if (inViewport(videoAds1Elmzplayer_8df213) && viszplayer_8df213() && !videoAdsInitzplayer_8df213 && typeof(window.videojs) !== “undefined” && (typeof(google) !== “undefined” || adBlockCheckedStatus) && videoObj) {
initvideozplayer_8df213();
clearInterval(checkTabActivezplayer_8df213);
}
// 20230817 fix lỗi lần đầu vào đợi onload check chặn quảng cáo quá lâu
// XLCYCMHENG-42783 – async lib ima3 -> tăng thời gian chờ load ima3
else if (typeof videoObjRoot != “undefined” && videoObjRoot){
if (typeof videoAdsInitzplayer_8df213_fix_AdBlockCheck == “undefined”){
setTimeout(function(){
if (typeof adBlockCheckedStatus != “undefined” && !adBlockCheckedStatus){
adBlockCheckedStatus = true;
adBlockEnabled = false;
}
}, 2000);

videoAdsInitzplayer_8df213_fix_AdBlockCheck = true;
}
}
}, 100);
}
}, false);

//]]>

//

Giao thông khu vực Phạm Hùng – Mễ Trì chiều tối 30/9. Video: Ngọc Thành


17h25

Đi ngược chiều tránh ngập

Giao thông Hà Nội hỗn loạn - 26

Giao thông Hà Nội hỗn loạn - 26

Đường Nguyễn Hoàng ùn tắc kéo dài, nhiều người đi xe máy chạy bên phần đường ngược chiều để tránh đoạn ngập lụt. Ảnh: Tùng Đinh

Đường Nguyễn Hoàng ùn tắc kéo dài, nhiều người đi xe máy chạy bên phần đường ngược chiều để tránh đoạn ngập lụt. Ảnh: Tùng Đinh


17h20

Người Hà Nội lội nước về nhà 

Giao thông Hà Nội hỗn loạn - 26

Giao thông Hà Nội hỗn loạn - 26

Giao thông Hà Nội hỗn loạn - 26

Trên phố Nguyễn Huy Tưởng, đến chiều tối, nước ngập sâu nhiều nơi, nhiều xe chết máy, người dân phải lội nước, dắt xe về nhà. Ảnh: Hoàng Giang

Trên phố Nguyễn Huy Tưởng, đến chiều tối, nước ngập sâu nhiều nơi, nhiều xe chết máy, người dân phải lội nước, dắt xe về nhà. Ảnh: Hoàng Giang


17h15

Dùng cẩu đưa ôtô chết máy qua đoạn ngập

Phố Nguyễn Cảnh Dị ngập sâu khoảng một mét, chiếc ôtô chết máy giữa đường buộc phải huy động cần cẩu cứu hộ đưa ra khỏi khu vực này.

//

// 0) {
// console.log(“AE volByCookie VAR : “+volByCookie);
vid_vol_var = volByCookie;
}
}
// console.log(“AE VIDVOL VAR : “+vid_vol_var);
var vidLoaded = false,
dynamicId,
vidId,
parentVid = “v-24hContainer_zplayer_c91f54”,
videoElmStr = ‘

‘+
‘To view this video please enable JavaScript, and consider upgrading to a web browser that ‘+
supports HTML5 video ‘+
‘ ‘ +
”,
videozplayer_c91f54,
videoAds1Conf = {
“poster”: “https://cdn.24h.com.vn/upload/3-2025/images/2025-09-30/1759229567-d–ng-c—n-c—u-c—u-h——t—ch—t-m–y.jpg”,

“offsetWatchPercent”: 20,
“stopOtherOnPlay”: true,
“parentVid”: parentVid,
“offHighlightOnBannerBottom”:false,
“vidErrorLog”: 1,
“skipAble”: true,
“skipTime”: 5000,
/*CDN_DOMAIN_HLS*/

“skipAdsBtnContent”: “Skip Ad”,
“showAdVol”: true,
“VIDEOID”: “zplayer_c91f54”,
/*MINI_VIDEO*/
“viewportAutoPlay”: true,
“vidVol” : vid_vol_var,
//”adVolIncrease”: 0.25,
//”showVolIncreasement”:1,
//”adVol” : “0.15”,
“trackSlowMedia”:1,
“secondToLoadMedia”:3000,
“secondToLoadMeta”:3000,
“prerollTimeEnd” : 31,
“midrollTimeEnd” : 15,
“postrollTimeEnd” : 30,
“skipAdsBtnPos”: “bottom-left”,

“fastSeek”: {step: 5},
“userAgent”: “Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.7 Safari/605.1.15”,
“adLoadTimeout” : 8000

,”vastUri”: “https%3A%2F%2Fpubads.g.doubleclick.net%2Fgampad%2Fads%3Fsz%3D640x360%26iu%3D%2F124557882%2F24h%2Fus%2Fdesktop%2Fdaily_news%2Fpreroll%26impl%3Ds%26gdfp_req%3D1%26env%3Dvp%26output%3Dvast%26unviewed_position_start%3D1%26url%3Dhttps%253A%252F%252Fwww.24h.com.vn%252Ftin-tuc-trong-ngay%252Fgiao-thong-ha-noi-hon-loan-gio-tan-tam-vi-mua-lon-c46a1702162.html%26description_url%3Dhttps%253A%252F%252Fwww.24h.com.vn%252Ftin-tuc-trong-ngay%252Fgiao-thong-ha-noi-hon-loan-gio-tan-tam-vi-mua-lon-c46a1702162.html%26correlator%3D1759237330%26ambient%3D1%26plcmt%3D2″
,”vastUriPost” : “https%3A%2F%2Fpubads.g.doubleclick.net%2Fgampad%2Fads%3Fsz%3D528x297%26iu%3D%2F124557882%2F24h%2Fus%2Fdesktop%2Fdaily_news%2Fpostroll%26impl%3Ds%26gdfp_req%3D1%26env%3Dvp%26output%3Dvast%26unviewed_position_start%3D1%26url%3Dhttps%253A%252F%252Fwww.24h.com.vn%252Ftin-tuc-trong-ngay%252Fgiao-thong-ha-noi-hon-loan-gio-tan-tam-vi-mua-lon-c46a1702162.html%26description_url%3Dhttps%253A%252F%252Fwww.24h.com.vn%252Ftin-tuc-trong-ngay%252Fgiao-thong-ha-noi-hon-loan-gio-tan-tam-vi-mua-lon-c46a1702162.html%26correlator%3D1759237330%26ambient%3D1%26plcmt%3D2″
,”vastUriMid” : “https%3A%2F%2Fvideo.24h.com.vn%2Fupload%2Fhtml%2Ftempvast.xml”
,”midTime”: 10
/*FALL_BACK*/
/*PLAYLIST_ITEM*/
/*DRM_VIDEO*/

//{set_highlight_zplayer_html5}
/*ID_BANNER_SPONSOR*/
}
if (volByCookie != null) {
if (volByCookie <= 0) {
// console.log("AE volByCookie VAR set MUTED : "+volByCookie);
videoAds1Conf.muted = 1;
}
}
if(document.getElementById(parentVid).innerHTML.trim() == ""){
loadVidzplayer_c91f54();
vidLoaded = true;
}

var count_time_update_zplayer_c91f54 = 0;

function loadVidzplayer_c91f54(){
dynamicId = new Date().valueOf();
vidId = "my-video-multiple1_"+dynamicId;
videoAds1Conf.VIDEOID = vidId;
if(vidLoaded==true){
videoAds1Conf.viewportAutoPlay = false;
}

var newVideStr = videoElmStr.replace(/__VIDIDzplayer_c91f54__/g, vidId);

document.getElementById(parentVid).innerHTML = newVideStr;
if (typeof adBlockEnabled_Unique != "undefined"){
// XLCYCMHENG-42783 – player – async lib ima3 + multi video – fix bug adBlockEnabled không đồng nhất
adBlockEnabled = adBlockEnabled_Unique;
}
videozplayer_c91f54 = new videoObj(videoAds1Conf);

// console.log("AE LOAD PLAYER");
// console.log(videoAds1Conf);
// console.log("AE THIS VOLUME LOAD PLAYER muted VAR :"+videoAds1Conf.muteByUser);
//console.log("AE THIS VOLUME LOAD PLAYER is muted :"+videozplayer_c91f54.player.muted());
//console.log("AE THIS VOLUME LOAD PLAYER: "+videozplayer_c91f54.player.volume());
//console.log("AE THIS VOLUME LOAD PLAYER CURRENT VOLUME : "+current_vol_zplayer_c91f54);
if ((typeof(videoAds1Conf.muteByUser) != "undefined" && videoAds1Conf.muteByUser == 1) || (volByCookie != null && volByCookie 0) {
videoAds1Conf.vidVol = current_vol_zplayer_c91f54;
videoAds1Conf.muteByUser = 0;
} else {
videoAds1Conf.muteByUser = 1;
videoAds1Conf.vidVol = 0;
}
var videoConf = videoAds1Conf;
videoConf.viewportAutoPlay = false;
// console.log(“AE videoConf: “, videoConf);
var element = document.getElementById(videoConf.VIDEOID);
// element.parentNode.removeChild(element);
// videozplayer_c91f54 = undefined;
videozplayer_c91f54.player.dispose();
loadVidzplayer_c91f54();
});

videozplayer_c91f54.player.on(“loadeddata”, function(){
// 20220224 fix lỗi không khởi tạo đc playerInitHeight
if (this.playerInitHeight <= 0){
this.playerInitHeight = Math.round(this.getById(this.VIDEOID).getBoundingClientRect().height)
this.dbglog("this.playerInitHeight: " + this.playerInitHeight)

this.playerHasSponsorInitHeight = Math.floor(this.getById(this.VIDEOID).getBoundingClientRect().height) – 1;// làm tròn xuống & -1
this.dbglog("this.playerHasSponsorInitHeight: " + this.playerHasSponsorInitHeight);
}
}.bind(videozplayer_c91f54));

videozplayer_c91f54.player.on("volumechange", function(){
var new_vd_volume = videozplayer_c91f54.player.volume();
// console.log("AE volume change");
// console.log("AE THIS VOLUME AFTER CHANGE: "+videozplayer_c91f54.player.volume());
// console.log("AE volume change is mute : "+videozplayer_c91f54.player.muted());
var is_vd_muted = videozplayer_c91f54.player.muted();
var check_set_cookie = false;
if (new_vd_volume 10) {
is_vd_muted = true;
}
if (is_vd_muted == true) {
// console.log(“AE is_vd_muted TRUE”);
if (current_vol_zplayer_c91f54 > 0 && count_time_update_zplayer_c91f54 > 10) {
check_set_cookie = true;
}
current_vol_zplayer_c91f54 = 0;
videozplayer_c91f54.player.muted(1);
setTimeout(function(){
videozplayer_c91f54.player.muted(1);
},300);
} else {
// console.log(“AE is_vd_muted FALSE”);
if (volByCookie <= 0 && count_time_update_zplayer_c91f54 < 5) {
check_set_cookie = false;
} else {
check_set_cookie = true;
}
current_vol_zplayer_c91f54 = new_vd_volume;
}
// console.log("AE check_set_cookie: "+check_set_cookie);
if (check_set_cookie == true) {
setCookie("videoVolumeByUser", current_vol_zplayer_c91f54, 30*24, "/", "24h.com.vn", "");// lưu cookie 30 ngày
// console.log("AE SET COOKIE");
} else {
// console.log("AE NOTTTT SET COOKIE");
}
// console.log("AE THIS VOLUME AFTER CHANGE LATER: "+current_vol_zplayer_c91f54);
}.bind(videozplayer_c91f54));

videozplayer_c91f54.player.ready(function () {
// XLCYCMHENG-38546 – [24H] Tối ưu khoảng trống trên/dưới banner sponsor_video_top / sponsor_video_botton
if (this.idBannerBottom != ""){
let vidEl = this.getById(this.VIDEOID);
let vidHeight = vidEl.getBoundingClientRect().height;

// làm tròn xuống & -1 height div chứa player
let parentHeight = Math.floor(vidHeight) – 1;
vidEl.parentNode.style.height = parentHeight + "px";
vidEl.parentNode.style.overflowY = "hidden";

// căn player lùi lên 0.7px
vidEl.style.marginTop = "-0.7px";

// 20220110: fix lỗi khi xem chế độ theater
let style = document.createElement("style");
style.type = "text/css";
style.innerHTML = ".theaterDisplay .video-js.vjs-16-9{margin-top: 0px !important}";
document.getElementsByTagName("head")[0].appendChild(style);
}

// XLCYCMHENG-44429 – 24h – Lỗi giao diện khi thu nhỏ màn hình – lỗi chiều cao theaterMod khi zoom
if (this.theaterMod && this.theaterMod.height) {
let style = document.createElement("style");
style.type = "text/css";
style.innerHTML = ".theaterDisplay .video-js.vjs-16-9-custom.zoomed:not(.mini-player){padding-top: 0px !important}";
document.getElementsByTagName("head")[0].appendChild(style);
}

// bổ sung class zoomed-out / zoomed-in theo chế độ zoom thực tế
function updateVideoZoomState() {
let vidEl = this.getById(this.VIDEOID);

const zoom = Math.round(window.devicePixelRatio * 100);

vidEl.classList.remove("zoomed", "zoomed-out", "zoomed-in");
if (zoom != 100) {
vidEl.classList.add("zoomed", zoom chưa xử lý; > 0 -> item cần nhảy tới; đã xử lý xong
let playTimeResuming = 0; // 0 -> chưa xử lý; > 0 -> thời điểm cần nhảy tới; đã xử lý xong
let useStorage = true; // sử dụng Storage để lưu trữ – không bị giới hạn số lượng, dung lượng, thời gian; không bị gửi lên server khi request trang
let minDuration = 10;
let adsTimeResuming = 0;
let adsBefore = true;
// XLCYCMHENG-39918 – player – resume watching – manager keys
// Math.floor(Date.now() / 1000) -> thời gian hiện tại (giây) theo UTC
let timeLiveKey = 720;
let updatetimeKey = “player__resume_watching__updatetime”;

// lấy item + thời gian đã xem từ cookie
let watching = “”;

if (useStorage && typeof Storage !== “undefined”){
// XLCYCMHENG-39918 – player – resume watching – manager keys
// khai báo hàm lấy thời điểm cập nhật key
var player__resume_watching__updatetime__get = function (key) {
if (typeof key == “undefined” || !key){return 0;}

let default_time = (new Date(“2022-10-01 00:00:00”)).getTime(); // mặc định nếu không có thời điểm cập nhật cũ
let updatetime = default_time;
let updatetime_all_text = localStorage.getItem(updatetimeKey);
if (updatetime_all_text != “”){
try {
let updatetime_all_obj = JSON.parse(updatetime_all_text);
if (typeof updatetime_all_obj == “object” && updatetime_all_obj !== null && typeof updatetime_all_obj[key] != “undefined”){
updatetime = parseInt(updatetime_all_obj[key]);
if (isNaN(updatetime)){
updatetime = default_time;
}
}
} catch (err){}
}

return updatetime;
};

// XLCYCMHENG-39918 – player – resume watching – manager keys
// khai báo hàm lưu thời điểm cập nhật key
var player__resume_watching__updatetime__set = function (key, remove_key) {
if (typeof key == “undefined” || !key){return false;}

if (typeof remove_key == “undefined”){
remove_key = false;
}

let updatetime_all_obj = {};
let updatetime_all_text = localStorage.getItem(updatetimeKey);
if (updatetime_all_text != “”){
try {
updatetime_all_obj = JSON.parse(updatetime_all_text);
} catch (err){}
}
if (typeof updatetime_all_obj != “object” || updatetime_all_obj === null){
updatetime_all_obj = {};

// danh sách các key có trong localStorage
let arr_all_key = Object.keys(localStorage);
if (typeof arr_all_key == “object” && arr_all_key !== null){
try {
// các key lưu lịch sử xem tiếp cũ chưa từng được đưa vào danh sách thời điểm cập nhật
let arr_key = arr_all_key.filter(key => key.match(/player__resume_watching_(.*)/));
if (typeof arr_key == “object” && arr_key !== null){
for (let i in arr_key) {
updatetime_all_obj[arr_key[i]] = Math.floor(Date.now() / 1000);
}
}
} catch (err){}
}
}

if (!remove_key){// cập nhật thời điểm cập nhật
updatetime_all_obj[key] = Math.floor(Date.now() / 1000);

try {
localStorage.setItem(updatetimeKey, JSON.stringify(updatetime_all_obj));
} catch (err){
console.log(“player: => set localStorage updatetimeKey after update – error: ” + err.message);
}
} else if (typeof updatetime_all_obj[key] != “undefined”){// remove nếu có thời điểm cập nhật cũ
delete updatetime_all_obj[key];

try {
localStorage.setItem(updatetimeKey, JSON.stringify(updatetime_all_obj));
} catch (err){
console.log(“player: => set localStorage updatetimeKey after delete – error: ” + err.message);
}
}

return true;
};

// lấy lịch sử đang xem
watching = localStorage.getItem(cookieKey);

console.log(“player: => get localStorage resume watching: ” + watching);

// có key -> check hết hạn key thì xóa, không dùng
if (timeLiveKey > 0 && watching !== null && watching !== “”){
let updatetime = player__resume_watching__updatetime__get(cookieKey);
if (updatetime + 60 * 60 * timeLiveKey remove expires localStorage resume watching: ” + cookieKey);
} catch (err){
console.log(“player: => remove expires localStorage resume watching: ” + cookieKey + ” – error: ” + err.message);
}
}
}
} else {
watching = getCookie(cookieKey);

console.log(“player: => get cookie resume watching: ” + watching);
}

if (!watching || typeof watching != “string”){
watching = “”;
}

if (watching != “”){
let arr_watching = watching.split(“:”);
if (arr_watching.length >= 2){
let watchingItem = parseInt(arr_watching[0]);
let watchingTime = parseFloat(arr_watching[1]);

if (!isNaN(watchingItem) && watchingItem > 0){
playItemResuming = watchingItem;// lưu item cần nhảy tới khi bắt đầu chạy video
}

if (!isNaN(watchingTime) && watchingTime > 0){
playTimeResuming = watchingTime;// lưu thời gian cần nhảy tới khi bắt đầu chạy video

adsTimeResuming = watchingTime;// lưu thời gian quảng cáo cần xử lý
}

if (playItemResuming > 0 || playTimeResuming > 0){
if (playItemResuming > 0){
adsTimeResuming = 100000;// playlist xem từ item thứ 2 -> chặn luôn preroll và midroll
}

console.log(“player: => need resume watching to item:” + playItemResuming + “; time:” + playTimeResuming);
}
}
}

videozplayer_c91f54.player.on([
“resume-watching”,
], function (e) {
if (minDuration > 0 && typeof this.tracking != “undefined” && typeof this.tracking.video != “undefined”){
let duration = 0;

if (typeof this.tracking.video.playlistTotalMins != “undefined”){
duration = this.tracking.video.playlistTotalMins;
}

if (typeof this.tracking.video.vidDuration != “undefined”){
duration = this.tracking.video.vidDuration;
}

if (duration > 0 && duration hủy cố gắng phát tiếp
playItemResuming = -1;
playTimeResuming = -1;
// hủy cố gắng chặn quảng cáo
adsTimeResuming = -1;
}
}

if (playItemResuming > 0 || playTimeResuming > 0){
let currentItem = this.isPlaylist ? this.player.playlist.currentItem() : 0;

if (playItemResuming > 0 && this.isPlaylist && this.player.playlist.lastIndex() > 0){
if (playItemResuming > this.player.playlist.lastIndex()){
playItemResuming %= (this.player.playlist.lastIndex() + 1);
}

if (this.player.playlist.currentItem() != playItemResuming){
this.player.playlist.currentItem(playItemResuming);// nhảy tới item

console.log(“player:event:” + e.type + ” => resume watching item:” + this.player.playlist.currentItem());
}
}

if (currentItem != playItemResuming && playTimeResuming > 0){
// hẹn trigger vào sự kiện play/loadeddata tiếp theo (sau khi load được item) -> thay đổi time sau
this.player.one([
“play”,
“loadeddata”,
], function (e) {
if (playItemResuming > 0 || playTimeResuming > 0){
console.log(“player:event:” + e.type + ” => triggerEvt:resume-watching”);

this.triggerEvt(“resume-watching”);
}
}.bind(this));

return;
}

if (playTimeResuming > 0){
this.player.currentTime(playTimeResuming);
}

playItem = this.isPlaylist ? this.player.playlist.currentItem() : 0;
playTime = this.player.currentTime();

console.log(“player:event:” + e.type + ” => resume watching item:” + playItem + “; time:” + playTime);

// kích hoạt sự kiện onPlay nếu chưa chạy để đảm bảo tracking
if (!this.getState(“sentPlay”) && !this.player.paused()) {
this.triggerEvt(“onPlay”);

console.log(“player:event:” + e.type + ” => triggerEvt:onPlay”);
}
}
}.bind(videozplayer_c91f54));
videozplayer_c91f54.player.one([
“play”,
“loadeddata”,
], function (e) {
if (playItemResuming > 0 || playTimeResuming > 0){
if (adsBefore){
let hasPreroll = false;

if (this.isPlaylist){
let currentItem = this.player.playlist.currentItem();
let currentItemSource = this.playlistConf;
let currentSrc = currentItemSource[currentItem].sources[0];

let adTag = typeof currentSrc != “undefined” && typeof currentSrc.adTagUrl != “undefined” ? currentSrc.adTagUrl : false;
if (!adTag || adTag === “”) {
adTag = this.tempVast;
}

hasPreroll = !adTag ? false : true;
} else {
let vastUri = this.vastUri;
if (!vastUri || vastUri === “”) {
vastUri = this.tempVast;
}

hasPreroll = !vastUri ? false : true;
}

if (hasPreroll){
this.handlePreroll();
} else {
console.log(“player:event:” + e.type + ” => triggerEvt:resume-watching”);

this.triggerEvt(“resume-watching”);
}
} else {
console.log(“player:event:” + e.type + ” => triggerEvt:resume-watching”);

this.triggerEvt(“resume-watching”);
}
}
}.bind(videozplayer_c91f54));
videozplayer_c91f54.player.one([
“adend”,
“adskip”,
“nopreroll”,
“adscanceled”,
“adserror”,
], function (e) {
if (playItemResuming > 0 || playTimeResuming > 0){
// hẹn trigger vào sự kiện playing tiếp theo
this.player.one([
“playing”,
], function (e) {
if (playItemResuming > 0 || playTimeResuming > 0){
console.log(“player:event:” + e.type + ” => triggerEvt:resume-watching”);

this.triggerEvt(“resume-watching”);
}
}.bind(this));
}
}.bind(videozplayer_c91f54));
videozplayer_c91f54.player.on(“timeupdated”, function (e) {
let currentItem = this.isPlaylist ? this.player.playlist.currentItem() : 0;
let currentTime = this.player.currentTime();

if (currentItem != playItem || Math.abs(currentTime – playTime) > 0.5){// lưu cookie khi có sai khác trên 0.5s
playItem = currentItem;
playTime = currentTime;

if (useStorage && typeof Storage !== “undefined”){
try {
localStorage.setItem(cookieKey, playItem+”:”+playTime);

// console.log(“player:event:” + e.type + ” => set localStorage resume watching to item:” + currentItem + “; time:” + currentTime);
} catch (err){
console.log(“player:event:” + e.type + ” => set localStorage resume watching to item:” + currentItem + “; time:” + currentTime + “; err:” + err.message);
}

// XLCYCMHENG-39918 – player – resume watching – manager keys
player__resume_watching__updatetime__set(cookieKey);
} else {
setCookie(cookieKey, currentItem+”:”+currentTime, (timeLiveKey > 0 ? timeLiveKey : 720), “/”, “24h.com.vn”, “”);

// console.log(“player:event:” + e.type + ” => set cookie resume watching to item:” + currentItem + “; time:” + currentTime);
}
}

if (playItemResuming > 0 || playTimeResuming > 0){
if (currentItem >= playItemResuming && currentTime >= playTimeResuming + 5){
// hủy cố gắng phát tiếp từ cookie khi đã resume thành công & chạy được 1 khoảng
playItemResuming = -1;
playTimeResuming = -1;
// hủy cố gắng chặn quảng cáo
adsTimeResuming = -1;
}
}

// kích hoạt sự kiện onPlay nếu chưa chạy để đảm bảo tracking
if (!this.getState(“sentPlay”) && !this.player.paused()) {
this.triggerEvt(“onPlay”);

console.log(“player:event:” + e.type + ” => triggerEvt:onPlay”);
}
}.bind(videozplayer_c91f54));
videozplayer_c91f54.player.on([
“seeking”,
“seeked”,
], function (e) {
// hủy cố gắng phát tiếp từ cookie khi user tự thay đổi thời gian xem
playItemResuming = -1;
playTimeResuming = -1;
// hủy cố gắng chặn quảng cáo
adsTimeResuming = -1;
});
videozplayer_c91f54.player.on([
“endVid”,
“onPostRollStart”,
“videoended”,
], function (e) {
// hủy cố gắng phát tiếp từ cookie khi đã kết thúc
playItemResuming = -1;
playTimeResuming = -1;
// hủy cố gắng chặn quảng cáo
adsTimeResuming = -1;

playItem = 0;
playTime = 0;

// xóa thông tin lịch sử đang xem
if (useStorage && typeof Storage !== “undefined”){
try {
localStorage.removeItem(cookieKey);

console.log(“player:event:” + e.type + ” => remove localStorage resume watching”);
} catch (err){
console.log(“player:event:” + e.type + ” => remove localStorage resume watching – error: ” + err.message);
}

// XLCYCMHENG-39918 – player – resume watching – manager keys
player__resume_watching__updatetime__set(cookieKey, true);
} else {
setCookie(cookieKey, playItem+”:”+playTime, 1, “/”, “24h.com.vn”, “”);

console.log(“player:event:” + e.type + ” => remove cookie resume watching”);
}
});
videozplayer_c91f54.player.on([
“readyforpreroll”,
], function (e) {
if (!adsBefore && adsTimeResuming > 0){
let closeAds = “”;

if (this.player.ads.isInAdMode()){// preroll
if (adsTimeResuming > 5){// thời điểm xem tiếp quá 5s
closeAds = “preroll”;
}
} else {// midroll
let duration = this.player.duration();
if (!duration){
duration = 0;
}
if (adsTimeResuming > 0 && duration > 0 && (
(this.midTime && adsTimeResuming > this.midTime)
|| adsTimeResuming > duration / 2
)
){
closeAds = “midroll”;
}
}

if (closeAds != “”){
this.closeAd();

console.log(“player:event:” + e.type + ” => cancel ” + closeAds + ” – closeAd”);

if (this.player.paused()) {// cố khởi chạy tiếp nếu đang bị dừng
if (this.autoplayRequiresMute){// bắt buộc phải mute -> tắt tiếng để play đc luôn
this.player.muted(true);
}

this.player.play();
}
}
}
}.bind(videozplayer_c91f54));
/*RESUME_WATCHING_EVENTS-END*/

videozplayer_c91f54.player.on(“onPrerollError”, function(name) {
var objVideos = videojs(vidId+”_html5_api”);
});
videozplayer_c91f54.player.on(“AE_completed”, function(name) {
// console.log(“AE_completed AE_completed :”+current_vol_zplayer_c91f54);
var is_vd_mute = videozplayer_c91f54.player.muted();
if (is_vd_mute == true) {

//videozplayer_c91f54.player.volume(0);

setTimeout(function(){
videozplayer_c91f54.player.muted(1);
// console.log(“AE_completed AE_completed set MUTED”);
},400);

}
});
videozplayer_c91f54.player.on(“onPlay”, function(name) {
// console.log(“onPlay AE_started AE_started :”+current_vol_zplayer_c91f54);
var is_vd_mute = videozplayer_c91f54.player.muted();
if (is_vd_mute == true) {
if (current_vol_zplayer_c91f54 > 0) {
// console.log(“AE SET VOLUME 1111111”);
videozplayer_c91f54.player.volume(current_vol_zplayer_c91f54);
}
videozplayer_c91f54.player.muted(1);
// console.log(“AE MUTE LOAD PLAYER ACTION SET MUTE 111111: “);
}
// console.log(“AE THIS VOLUME is muted :”+videozplayer_c91f54.player.muted());
// console.log(“AE THIS VOLUME: “+videozplayer_c91f54.player.volume());
// begin 5/10/2017 TuyenNT xu_ly_gan_ga_video_theo_loai_giai_dau_frontend_pc
send_tracking_video(‘none’, ‘Null’, 1702162, 46, ‘daily_news’, ‘pc’, ‘play’, ‘no’, ‘no’, 1, ‘video_noi_dung’);
// end 5/10/2017 TuyenNT xu_ly_gan_ga_video_theo_loai_giai_dau_frontend_pc
//Begin 14-07-2017 : Thangnb tracking_google_tag_manager_video

//End 14-07-2017 : Thangnb tracking_google_tag_manager_video
send_tracking_video(”, ‘none’, 0, 0, ”, ‘pc’, ”, ‘no’, ‘no’, 3, ‘video_noi_dung’);
});
// Begin 12-12-2018 trungcq XLCYCMHENG_33549_xu_ly_scroll_to_top
videozplayer_c91f54.player.on(“playerMinimized”, function(name) {
// console.log(“Listener playerMinimized: “);
if ($(“#arrowPageUp”).length) {
$(“#arrowPageUp”).css(“bottom”,”157px”);
$(“#backpage”).css(“bottom”,”200px”);
}
});
videozplayer_c91f54.player.on(“playerUnMinimized”, function(name) {
// console.log(“Listener playerUnMinimized: “);
if ($(“#arrowPageUp”).length) {
$(“#arrowPageUp”).css(“bottom”,”20px”);
}
});
videozplayer_c91f54.player.on(“miniPlayerClosed”, function(name) {
// console.log(“Listener miniPlayerClosed: “);
if ($(“#arrowPageUp”).length) {
$(“#arrowPageUp”).css(“bottom”,”20px”);
}
});

// End 12-12-2018 trungcq XLCYCMHENG_33549_xu_ly_scroll_to_top

var v_event_tracking_impression_prerollzplayer_c91f54 = document.getElementById(“zplayer_c91f54_ga_preroll”);
// các trường hợp mã lỗi của trình duyệt trả về
videozplayer_c91f54.player.on(“AE_impression”, function(name) {
// Gọi GA load video
if(v_event_tracking_impression_prerollzplayer_c91f54){
// Tao thẻ div để chưa link GA
$(“

“).insertBefore(“#zplayer_c91f54_ga_preroll”);
if(document.getElementById(“link_ga_tracking_impression_preroll_zplayer_c91f54”)){
window.addEventListener(“load”, function(){send_tracking_video(”, ‘none’, 1702162, 46, ‘daily_news’, ‘pc’, ‘impression’, ‘no’, ‘no’, 2, ‘video_noi_dung’);});
}
}
});

var v_event_tracking_click_prerollzplayer_c91f54 = document.getElementById(“zplayer_c91f54_ga_preroll”);
// các trường hợp mã lỗi của trình duyệt trả về
videozplayer_c91f54.player.on(“AE_clicked”, function(name) {
// Gọi GA load video
if(v_event_tracking_click_prerollzplayer_c91f54){
// Tao thẻ div để chưa link GA
$(“

“).insertBefore(“#zplayer_c91f54_ga_preroll”);
if(document.getElementById(“link_ga_tracking_click_preroll_zplayer_c91f54”)){
window.addEventListener(“load”, function(){send_tracking_video(”, ‘none’, 1702162, 46, ‘daily_news’, ‘pc’, ‘ads_click’, ‘no’, ‘no’, 2, ‘video_noi_dung’);});
}
}
});

var v_err_log_1zplayer_c91f54 = document.getElementById(“zplayer_c91f54_ga_error1”);
// các trường hợp mã lỗi của trình duyệt trả về
videozplayer_c91f54.player.on(“MEDIA_ERROR_1″, function (name) {
// Gọi GA load video
if(v_err_log_1zplayer_c91f54){
send_tracking_video(”, ‘none’, 1702162, 0, ”, ‘pc’, ‘error_ERROR_1’, ‘no’, ‘no’, 1, ‘video_noi_dung’);
}
});
var v_err_log_2zplayer_c91f54 = document.getElementById(“zplayer_c91f54_ga_error2”);
videozplayer_c91f54.player.on(“MEDIA_ERROR_2″, function (name) {
// Gọi GA load video
if(v_err_log_2zplayer_c91f54){
send_tracking_video(”, ‘none’, 1702162, 0, ”, ‘pc’, ‘error_ERROR_2’, ‘no’, ‘no’, 1, ‘video_noi_dung’);
}
});
var v_err_log_3zplayer_c91f54 = document.getElementById(“zplayer_c91f54_ga_error3”);
videozplayer_c91f54.player.on(“MEDIA_ERROR_3″, function (name) {
// Gọi GA load video
if(v_err_log_3zplayer_c91f54){
send_tracking_video(”, ‘none’, 1702162, 0, ”, ‘pc’, ‘error_ERROR_3’, ‘no’, ‘no’, 1, ‘video_noi_dung’);
}
});
var v_err_log_4zplayer_c91f54 = document.getElementById(“zplayer_c91f54_ga_error4”);
videozplayer_c91f54.player.on(“MEDIA_ERROR_4″, function (name) {
// Gọi GA load video
if(v_err_log_4zplayer_c91f54){
send_tracking_video(”, ‘none’, 1702162, 0, ”, ‘pc’, ‘error_ERROR_4’, ‘no’, ‘no’, 1, ‘video_noi_dung’);
}
});
var v_err_log_5zplayer_c91f54 = document.getElementById(“zplayer_c91f54_ga_error5”);
videozplayer_c91f54.player.on(“MEDIA_ERROR_5″, function (name) {
// Gọi GA load video
if(v_err_log_5zplayer_c91f54){
send_tracking_video(”, ‘none’, 1702162, 0, ”, ‘pc’, ‘error_ERROR_5’, ‘no’, ‘no’, 1, ‘video_noi_dung’);
}
});

videozplayer_c91f54.player.on(“track_slow_playlist_next_1”, function(){
console.log(“track_slow_playlist_next_1”);
$(“

“).insertBefore(“#zplayer_c91f54_ga_media_slow_waiting”);

var v_track_slow_playlist_zplayer_c91f541 = document.getElementById(“link_slow_playlist_next_zplayer_c91f541”);
if(v_track_slow_playlist_zplayer_c91f541){
window.addEventListener(“load”, function(){send_tracking_video(”, ‘none’, 1702162, 0, ”, ‘pc’, ‘slow_playlist_next’, ‘no’, ‘no’, 1, ‘video_noi_dung’);});
}
});

videozplayer_c91f54.player.on(“track_slow_playlist_next_2”, function(){
console.log(“track_slow_playlist_next_2”);
$(“

“).insertBefore(“#zplayer_c91f54_ga_media_slow_waiting”);

var v_track_slow_playlist_zplayer_c91f542 = document.getElementById(“link_slow_playlist_next_zplayer_c91f542”);
if(v_track_slow_playlist_zplayer_c91f542){
window.addEventListener(“load”, function(){send_tracking_video(”, ‘none’, 1702162, 0, ”, ‘pc’, ‘slow_playlist_next’, ‘no’, ‘no’, 1, ‘video_noi_dung’);});
}
});

videozplayer_c91f54.player.on(“track_slow_playlist_next_3”, function(){
console.log(“track_slow_playlist_next_3”);
$(“

“).insertBefore(“#zplayer_c91f54_ga_media_slow_waiting”);

var v_track_slow_playlist_zplayer_c91f543 = document.getElementById(“link_slow_playlist_next_zplayer_c91f543”);
if(v_track_slow_playlist_zplayer_c91f543){
window.addEventListener(“load”, function(){send_tracking_video(”, ‘none’, 1702162, 0, ”, ‘pc’, ‘slow_playlist_next’, ‘no’, ‘no’, 1, ‘video_noi_dung’);});
}
});

videozplayer_c91f54.player.on(“track_slow_playlist_next_4”, function(){
console.log(“track_slow_playlist_next_4”);
$(“

“).insertBefore(“#zplayer_c91f54_ga_media_slow_waiting”);

var v_track_slow_playlist_zplayer_c91f544 = document.getElementById(“link_slow_playlist_next_zplayer_c91f544”);
if(v_track_slow_playlist_zplayer_c91f544){
window.addEventListener(“load”, function(){send_tracking_video(”, ‘none’, 1702162, 0, ”, ‘pc’, ‘slow_playlist_next’, ‘no’, ‘no’, 1, ‘video_noi_dung’);});
}
});

videozplayer_c91f54.player.on(“track_slow_playlist_next_5”, function(){
console.log(“track_slow_playlist_next_5”);
$(“

“).insertBefore(“#zplayer_c91f54_ga_media_slow_waiting”);

var v_track_slow_playlist_zplayer_c91f545 = document.getElementById(“link_slow_playlist_next_zplayer_c91f545”);
if(v_track_slow_playlist_zplayer_c91f545){
window.addEventListener(“load”, function(){send_tracking_video(”, ‘none’, 1702162, 0, ”, ‘pc’, ‘slow_playlist_next’, ‘no’, ‘no’, 1, ‘video_noi_dung’);});
}
});

videozplayer_c91f54.player.on(“track_slow_playlist_next_6”, function(){
console.log(“track_slow_playlist_next_6”);
$(“

“).insertBefore(“#zplayer_c91f54_ga_media_slow_waiting”);

var v_track_slow_playlist_zplayer_c91f546 = document.getElementById(“link_slow_playlist_next_zplayer_c91f546”);
if(v_track_slow_playlist_zplayer_c91f546){
window.addEventListener(“load”, function(){send_tracking_video(”, ‘none’, 1702162, 0, ”, ‘pc’, ‘slow_playlist_next’, ‘no’, ‘no’, 1, ‘video_noi_dung’);});
}
});

videozplayer_c91f54.player.on(“track_slow_playlist_next_7”, function(){
console.log(“track_slow_playlist_next_7”);
$(“

“).insertBefore(“#zplayer_c91f54_ga_media_slow_waiting”);

var v_track_slow_playlist_zplayer_c91f547 = document.getElementById(“link_slow_playlist_next_zplayer_c91f547”);
if(v_track_slow_playlist_zplayer_c91f547){
window.addEventListener(“load”, function(){send_tracking_video(”, ‘none’, 1702162, 0, ”, ‘pc’, ‘slow_playlist_next’, ‘no’, ‘no’, 1, ‘video_noi_dung’);});
}
});

videozplayer_c91f54.player.on(“track_slow_playlist_next_8”, function(){
console.log(“track_slow_playlist_next_8”);
$(“

“).insertBefore(“#zplayer_c91f54_ga_media_slow_waiting”);

var v_track_slow_playlist_zplayer_c91f548 = document.getElementById(“link_slow_playlist_next_zplayer_c91f548”);
if(v_track_slow_playlist_zplayer_c91f548){
window.addEventListener(“load”, function(){send_tracking_video(”, ‘none’, 1702162, 0, ”, ‘pc’, ‘slow_playlist_next’, ‘no’, ‘no’, 1, ‘video_noi_dung’);});
}
});

videozplayer_c91f54.player.on(“track_slow_playlist_next_9”, function(){
console.log(“track_slow_playlist_next_9”);
$(“

“).insertBefore(“#zplayer_c91f54_ga_media_slow_waiting”);

var v_track_slow_playlist_zplayer_c91f549 = document.getElementById(“link_slow_playlist_next_zplayer_c91f549”);
if(v_track_slow_playlist_zplayer_c91f549){
window.addEventListener(“load”, function(){send_tracking_video(”, ‘none’, 1702162, 0, ”, ‘pc’, ‘slow_playlist_next’, ‘no’, ‘no’, 1, ‘video_noi_dung’);});
}
});

videozplayer_c91f54.player.on(“track_slow_playlist_next_10”, function(){
console.log(“track_slow_playlist_next_10”);
$(“

“).insertBefore(“#zplayer_c91f54_ga_media_slow_waiting”);

var v_track_slow_playlist_zplayer_c91f5410 = document.getElementById(“link_slow_playlist_next_zplayer_c91f5410”);
if(v_track_slow_playlist_zplayer_c91f5410){
window.addEventListener(“load”, function(){send_tracking_video(”, ‘none’, 1702162, 0, ”, ‘pc’, ‘slow_playlist_next’, ‘no’, ‘no’, 1, ‘video_noi_dung’);});
}
});

videozplayer_c91f54.player.on(“timeupdated”, function () {
if (count_time_update_zplayer_c91f54 < 50) {
count_time_update_zplayer_c91f54++;
// console.log(“AE TIME UPDATE: “+count_time_update_zplayer_c91f54);
}
if(v_load_recommend_boxzplayer_c91f54 && typeof(v_thoi_luong_hien_thi) != “undefined” && v_thoi_luong_hien_thi != “”){
try{
var v_time_current = videozplayer_c91f54.player.currentTime();
if(v_time_current > 0){
if(v_time_current >= v_thoi_luong_hien_thi){
function getJsonRecomment(url,callback){
if(url == “”){
return “”;
}
dynamicIdLive = new Date().valueOf();
url = url+dynamicIdLive;
var xhr = new XMLHttpRequest();
// Get url
xhr.open(“GET”, url, true);
// Kiểu phản hồi
xhr.responseType = “json”;
xhr.timeout = 50000; // Set timeout to 2 seconds
xhr.ontimeout = function () {console.log(url+” – timeout”);}
// Load data
xhr.onload = function() {
var status = xhr.status;
if (status == 200) {
callback(xhr.response);
}else{
console.log(“B3: status != 200”);
}
};
xhr.send();
}
if(typeof v_url_json_data_recomment != “undefined”){
getJsonRecomment(v_url_json_data_recomment,function(v_object_recomend){
if(typeof v_object_recomend != “undefined” && parseInt(v_object_recomend.length) > 0){
var recomment_arr_video_ngay_hien_tai = _getStorageJson24h(“recomment_video_ngay_hien_tai_data_news_id”);
var recomment_video_ngay_hom_qua_data_news_id = _getStorageJson24h(“recomment_video_ngay_hom_qua_data_news_id”);
// Lặp để loại bỏ những bài đang xem
var arr_recomend_video = new Array();
var k=0;
var v_so_luong_tin_hien_thi = parseInt(v_object_recomend[0][“c_tong_so_luong_tin_hien_thi”]);
for(j=0;j 0){
if(v_recomment_news_id== parseInt(v_object_recomend[j][“c_new_id”])){
continue;
}
if(typeof(recomment_arr_video_ngay_hien_tai) != “undefined” && recomment_arr_video_ngay_hien_tai.indexOf(parseInt(v_object_recomend[j][“c_new_id”])) >= 0){
continue;
}
if(typeof(recomment_video_ngay_hom_qua_data_news_id) != “undefined” && recomment_video_ngay_hom_qua_data_news_id.indexOf(parseInt(v_object_recomend[j][“c_new_id”])) >= 0){
continue;
}
}
arr_recomend_video[k] = v_object_recomend[j];
k++;
if(k >= v_so_luong_tin_hien_thi){
break;
}
}
var v_total_page_recommend =0;
v_total_page_recommend = parseInt(Math.ceil(parseInt(arr_recomend_video.length)/parseInt(v_object_recomend[0][“c_number_items”])));
// Tao HTML video recommend
arr_recomend_video[0][“c_tracking_onclick”] = “”;
arr_recomend_video[0][“c_tracking_onload”] = “”;
arr_recomend_video[0][“c_tracking_onload_gatag”] = “”;
var v_html_recomend = tao_html_recommend_video_tu_object(arr_recomend_video,”zplayer_c91f54″);
// Gắn HTML vào chuỗi
if(v_html_recomend !=””){
// Nếu tồn tại video highlight
if ($(“#vjs-marker-tableinfo-zplayer_c91f54”).length) {
$(“#vjs-marker-tableinfo-zplayer_c91f54”).after(v_html_recomend);
} else {
if ($(“#zplayer_c91f54_ga_preroll”).length) {
$(“#zplayer_c91f54_ga_preroll”).before(v_html_recomend);
}
}
// Hiển thị dạng slide
if ($(“#box_recommend_zplayer_c91f54”).length) {
$(“#box_recommend_zplayer_c91f54”).show(1000);
setTimeout(function(){
create_slide_page_number_recommend_video_json(“swiper_recommend_v2018zplayer_c91f54”, “swpier_container_zplayer_c91f54″,”swiper_active_slide_zplayer_c91f54”, “pagination-zplayer_c91f54″,”wrapper_zplayer_c91f54”,v_total_page_recommend, “swiper-slide slide_zplayer_c91f54”, “prvVid_recommendzplayer_c91f54”, “nxtVid_recommendzplayer_c91f54”);
$(“#box_recommend_zplayer_c91f54”).css(“height”, “”);
}, 900);
}
}
}
});
}
v_load_recommend_boxzplayer_c91f54 = false;
}
}
}catch(e){
console.log([“Errors”, e]);
}
}
});

videozplayer_c91f54.player.on(“MEDIA_SLOW_WAITING”, function (evt, data) {
//console.log(data.waitTime);
var v_slow_waiting_zplayer_c91f54 = document.getElementById(“zplayer_c91f54_ga_media_slow_waiting”);
if(v_slow_waiting_zplayer_c91f54){
//đổi ms về s
v_so_giay_load = parseInt(data.waitTime/1000);
send_tracking_video(”, ”, 1702162, ”, ”, ”, ‘media_slow_waiting’, ”, ”, 6, v_so_giay_load);
}
//console.log(“listener MEDIA_SLOW_WAITING: “);
});
videozplayer_c91f54.player.on(“MEDIA_SLOW_METADATA”, function (evt, data) {
//console.log(data.waitTime);
var v_slow_metadata_zplayer_c91f54 = document.getElementById(“zplayer_c91f54_ga_media_slow_metadata”);
if(v_slow_metadata_zplayer_c91f54){
//đổi ms về s
v_so_giay_load_metadata = parseInt(data.waitTime/1000);
send_tracking_video(”, ”, 1702162, ”, ”, ”, ‘media_slow_metadata’, ”, ”, 6, v_so_giay_load_metadata);
}
//console.log(“listener MEDIA_SLOW_METADATA: “);
});
videozplayer_c91f54.player.on(‘onPrerollStart’, function(name){
//console.log(‘ON PREROLL START’);

/* begin 4/10/2017 TuyenNT xu_ly_gan_ga_video_theo_loai_giai_dau_frontend_pc */
send_tracking_video(‘none’, ‘Null’, 1702162, 46, ‘daily_news’, ‘pc’, ‘preroll_impression’, ‘no’, ‘no’, 1, ‘video_noi_dung’);
/* end 4/10/2017 TuyenNT xu_ly_gan_ga_video_theo_loai_giai_dau_frontend_pc */

});videozplayer_c91f54.player.on(‘onOverlayStart’, function(name){
//console.log(‘ON OVERLAY START’);

/* begin 4/10/2017 TuyenNT xu_ly_gan_ga_video_theo_loai_giai_dau_frontend_pc */
send_tracking_video(‘none’, ‘Null’, 1702162, 46, ‘daily_news’, ‘pc’, ‘overlay_impression’, ‘no’, ‘no’, 1, ‘video_noi_dung’);
/* end 4/10/2017 TuyenNT xu_ly_gan_ga_video_theo_loai_giai_dau_frontend_pc */

});videozplayer_c91f54.player.on(‘onPostRollStart’, function(name){
//console.log(‘ON POSTROLL START’);

/* begin 4/10/2017 TuyenNT xu_ly_gan_ga_video_theo_loai_giai_dau_frontend_pc */
send_tracking_video(‘none’, ‘Null’, 1702162, 46, ‘daily_news’, ‘pc’, ‘postroll_impression’, ‘no’, ‘no’, 1, ‘video_noi_dung’);
/* end 4/10/2017 TuyenNT xu_ly_gan_ga_video_theo_loai_giai_dau_frontend_pc */

});

videozplayer_c91f54.player.on([
“play”,
“playing”,
“adstart”,
“adplaying”,
], function (evt, data) {

if (typeof stop_video_news_live == “function”){
stop_video_news_live(“___”);
}

});

videozplayer_c91f54.player.one([
“play”,
], function (e) {
let vastUri = this.vastUri;
let vastUriPost = this.vastUriPost;
let vastUriMid = this.vastUriMid;

// Neu co cau hinh autoplay nhung trình duyet k cho phep auto play thi gan tham so bang vpmute = 0
if(this.viewportAutoPlay == true && this.willAutoplay === false){
if(vastUri != “”){
this.vastUri = vastUri + “&vpmute=0”;
}
if(vastUriPost != “”){
this.vastUriPost = vastUriPost + “&vpmute=0”;
}
if(vastUriMid != “”){
this.vastUriMid = vastUriMid + “&vpmute=0”;
}
}
}.bind(videozplayer_c91f54));

videozplayer_c91f54.player.on([
“contentchanged”,
], function (e) {
this.player.one([
“playing”,
], function (e) {
var currentItem = this.isPlaylist ? this.player.playlist.currentItem() : 0;

// đợi player xử lý 1s mới bắt đầu check xem có chạy được không
setTimeout(function(){
// đã thay đổi item –> bỏ qua
var chk_currentItem = this.isPlaylist ? this.player.playlist.currentItem() : 0;
if (chk_currentItem != currentItem){
return;
}

var has_timeupdate = false;

this.player.one([
“timeupdate”,
], function (e) {
has_timeupdate = true;
});

setTimeout(function(){
if (has_timeupdate){
return;
}

if (this.player.paused()){
return;
}

this.dbglog(“timeupdate_missing –> try to restart”);

this.player.pause();
setTimeout(function(){
this.player.play();
}.bind(this), 100);
}.bind(this), 300);
}.bind(this), 1000);
}.bind(this));
}.bind(videozplayer_c91f54));

videozplayer_c91f54.player.on(“onStop”, function(name) {
//console.log(“listener onStop: “);

});

videozplayer_c91f54.player.on(“onFullscreen”, function(name) {
// 20250808 – XLCYCMHENG-44473 – xử lý bỏ neo khi mở chế độ fullscreen
// đang ở chế độ neo
if (this.hasClass(“mini-player”)){
this.removeClasses([“mini-player”, “pc-mini-player”]);
this.minPlayerHideCloseBtn();
this.unminimizeOnFullscreen = true;
}
}.bind(videozplayer_c91f54));
videozplayer_c91f54.player.on(“onFullscreenOff”, function(name) {
// 20250808 – XLCYCMHENG-44473 – xử lý neo lại khi thoát chế độ fullscreen
// từng bỏ neo khi mở chế độ fullscreen
if (typeof this.unminimizeOnFullscreen != “undefined” && this.unminimizeOnFullscreen){
this.addClasses([“mini-player”, “pc-mini-player”]);
this.minPlayerDisplayCloseBtn();
this.unminimizeOnFullscreen = false;
}
}.bind(videozplayer_c91f54));
}
videoAdsInitzplayer_c91f54 = true;
}
// Ga video load luôn được chạy
window.addEventListener(“load”, function(){});window.addEventListener(“load”, function(){});
function inViewport( element ){
// Get the elements position relative to the viewport
var bb = element.getBoundingClientRect();
// Check if the element is outside the viewport
// Then invert the returned value because you want to know the opposite
return !(bb.top > innerHeight || bb.bottom < 0);
}
var zplayer_c91f54VpElm = document.getElementById( “zplayer_c91f54” );

var viszplayer_c91f54 = (function () {
var stateKey, eventKey, keys = {
hidden: “visibilitychange”,
webkitHidden: “webkitvisibilitychange”,
mozHidden: “mozvisibilitychange”,
msHidden: “msvisibilitychange”
};
for (stateKey in keys) {
if (stateKey in document) {
eventKey = keys[stateKey];
break;
}
}
return function (c) {
if (c) document.addEventListener(eventKey, c);
return !document[stateKey];
}
})();

var videoAds1Elmzplayer_c91f54 = document.getElementById(“v-24hContainer_zplayer_c91f54”);
document.addEventListener(“DOMContentLoaded”, function () {
if(videoAds1Elmzplayer_c91f54){
var videoAdsInitzplayer_c91f54 = false;
var checkTabActivezplayer_c91f54 = setInterval(function () {
if (inViewport(videoAds1Elmzplayer_c91f54) && viszplayer_c91f54() && !videoAdsInitzplayer_c91f54 && typeof(window.videojs) !== “undefined” && (typeof(google) !== “undefined” || adBlockCheckedStatus) && videoObj) {
initvideozplayer_c91f54();
clearInterval(checkTabActivezplayer_c91f54);
}
// 20230817 fix lỗi lần đầu vào đợi onload check chặn quảng cáo quá lâu
// XLCYCMHENG-42783 – async lib ima3 -> tăng thời gian chờ load ima3
else if (typeof videoObjRoot != “undefined” && videoObjRoot){
if (typeof videoAdsInitzplayer_c91f54_fix_AdBlockCheck == “undefined”){
setTimeout(function(){
if (typeof adBlockCheckedStatus != “undefined” && !adBlockCheckedStatus){
adBlockCheckedStatus = true;
adBlockEnabled = false;
}
}, 2000);

videoAdsInitzplayer_c91f54_fix_AdBlockCheck = true;
}
}
}, 100);
}
}, false);

//]]>

//

Đưa ôtô chết máy ra khỏi nơi ngập nước. Video: Huy Mạnh