From 2ff4a6d35ac9ad3fa397e39fb310e23a0c264fd0 Mon Sep 17 00:00:00 2001 From: Moe Date: Mon, 31 Jul 2023 23:00:01 -0700 Subject: [PATCH] some clean up --- web/assets/js/bs5.timeline.js | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/web/assets/js/bs5.timeline.js b/web/assets/js/bs5.timeline.js index fe7b9394..30751255 100644 --- a/web/assets/js/bs5.timeline.js +++ b/web/assets/js/bs5.timeline.js @@ -71,7 +71,7 @@ $(document).ready(function(){ // searchQuery, // archived: false, // customVideoSet: wantCloudVideo ? 'cloudVideos' : null, - })).videos; + },null,true)).videos; videos = addVideoBeforeAndAfter(videos); // addOrOverWrite ? loadedVideosOnTimeStrip.push(...videos) : loadedVideosOnTimeStrip = videos; @@ -96,15 +96,7 @@ $(document).ready(function(){ function drawVideosToCanvas(selectedVideosByMonitorId){ var html = '' $.each(loadedMonitors,function(monitorId,monitor){ - var video = selectedVideosByMonitorId[monitorId] - if(video){ - var href = video.href; - html += `
- -
` - }else{ - html += `
` - } + html += `
` }) timeStripVideoCanvas.html(html) $.each(selectedVideosByMonitorId,function(monitorId,video){ @@ -250,7 +242,7 @@ $(document).ready(function(){ } function setVideoInCanvas(newVideo){ var monitorId = newVideo.mid - getVideoContainerInCanvas(newVideo).removeClass('no-video').html(``) + getVideoContainerInCanvas(newVideo).removeClass('no-video').html(``) var vidEl = getVideoElInCanvas(newVideo) vidEl.playbackRate = timelineSpeed if(isPlaying)playVideo(vidEl) @@ -274,6 +266,11 @@ $(document).ready(function(){ var monitorId = video.mid var videoEl = loadedVideoElsOnCanvas[monitorId] var videoAfter = video.videoAfter + videoEl.onerror = function(err){ + err.preventDefault() + console.log(`queueNextVideo videoEl.onerror`) + console.log(err) + } videoEl.ontimeupdate = function(){ if(videoEl.currentTime >= videoEl.duration){ clearVideoInCanvas(video)