From 9e26038d82d86dde4b1475417e97158707919512 Mon Sep 17 00:00:00 2001 From: Sweidan Omar Date: Tue, 22 Feb 2022 15:16:02 +0000 Subject: [PATCH] git-tfs-id: [http://tfs.userrendszerhaz.hu:8080/tfs/DefaultCollection]$/MediaCube;C32993 --- server/user.mediacube.gui/js/searchitems.js | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/server/user.mediacube.gui/js/searchitems.js b/server/user.mediacube.gui/js/searchitems.js index c6150980..956c1bac 100644 --- a/server/user.mediacube.gui/js/searchitems.js +++ b/server/user.mediacube.gui/js/searchitems.js @@ -1,4 +1,4 @@ -/* Proxy lejátszo */ +/* Proxy lejátszó */ var player = videojs('myVideoDiv', { controls : true, preload : "auto" @@ -6,11 +6,13 @@ var player = videojs('myVideoDiv', { function setSource(src, srcType) { console.log("setSource", player, src); - if (src != null) { - player.src({ - type : srcType, - src : src - }); + if(src != null) { + if(player != null){ + player.src({ + type : srcType, + src : src + }); + } } else { // player.poster("/img/mediacube_logo_v2_50x50.png"); player.src({ @@ -38,6 +40,7 @@ function secondsToSMPTE(seconds) { return {h: h, m: m, s: s, f: f}; } + function SMPTEToString(timecode) { if (timecode.h < 10) { timecode.h = "0" + timecode.h; } if (timecode.m < 10) { timecode.m = "0" + timecode.m; } @@ -46,6 +49,7 @@ function SMPTEToString(timecode) { return timecode.h + ":" + timecode.m + ":" + timecode.s + ":" + timecode.f; } + function customTimeFormat(seconds) { return SMPTEToString(secondsToSMPTE(seconds)); } -- 2.54.0