zhouenguang 3 år sedan
förälder
incheckning
4af0868943
2 ändrade filer med 39 tillägg och 28 borttagningar
  1. 19 14
      edit-backstage/js/main_2020_edit.js
  2. 20 14
      web/public/static/js/main_2020_show.js

+ 19 - 14
edit-backstage/js/main_2020_edit.js

@@ -22387,20 +22387,25 @@ function o(a, s, l) {
                 var currentLocation = this.model.heroLocations[this.director.currentItem[0]] 
                 var rotTime
                 if(currentLocation.rotTime == void 0 || currentLocation.rotTime == ''){
-                    var restChildCount = currentLocation.heroLocations ? (currentLocation.heroLocations.length-this.director.currentItem[1]-1) : 0
-                    var hasMusic = currentLocation.musicInfo && currentLocation.musicInfo.music
-                    if(hasMusic){
-                        var audioObj = SoundManager.list.find(e=>e.name == 'tour') 
-                        var current = audioObj.audio.currentTime * 1e3 // || 0  //g_tourAudio ? 1e3 * g_tourAudio.currentTime : 0
-                        rotTime = currentLocation.musicInfo.time - current
-                        if(restChildCount){//如果当前folder中还有剩下的item,平分一下时间
-                            rotTime = (rotTime-timeEachItem*restChildCount) / (restChildCount+1);   
-                        }  
-                    }else{
-                        rotTime = defaultRotTime
-                    } 
-                    rotTime = Math.max(0, rotTime)
-                    console.log("rotTime "+rotTime +" at item "+this.director.currentItem + (hasMusic ? (",musicCurrentTime:"+current+'音乐总长:'+currentLocation.musicInfo.time) : '')) 
+                    rotTime = currentLocation.heroLocations[this.director.currentItem[1]-1].rotTime * 1000
+                    if(!rotTime) {
+                        var restChildCount = currentLocation.heroLocations ? (currentLocation.heroLocations.length-this.director.currentItem[1]-1) : 0
+                        var hasMusic = currentLocation.musicInfo && currentLocation.musicInfo.music
+                        if(hasMusic){
+                            var audioObj = SoundManager.list.find(e=>e.name == 'tour') 
+                            var current = audioObj.audio.currentTime * 1e3 // || 0  //g_tourAudio ? 1e3 * g_tourAudio.currentTime : 0
+                            rotTime = currentLocation.musicInfo.time - current
+                            if(restChildCount){//如果当前folder中还有剩下的item,平分一下时间
+                                rotTime = (rotTime-timeEachItem*restChildCount) / (restChildCount+1);   
+                            }  
+                        }else{
+                            rotTime = defaultRotTime
+                        } 
+                        rotTime = Math.max(0, rotTime)
+                        console.log("rotTime "+rotTime +" at item "+this.director.currentItem + (hasMusic ? (",musicCurrentTime:"+current+'音乐总长:'+currentLocation.musicInfo.time) : '')) 
+                    } else {
+                        console.log("rotTime "+rotTime +" at item "+this.director.currentItem) 
+                    }
                 }else{
                     rotTime = currentLocation.rotTime * 1000
                     console.log("rotTime "+rotTime +" at item "+this.director.currentItem) 

+ 20 - 14
web/public/static/js/main_2020_show.js

@@ -23736,20 +23736,26 @@ window.Modernizr = function(n, e, t) {
                 var currentLocation = this.model.heroLocations[this.director.currentItem[0]] 
                 var rotTime
                 if(currentLocation.rotTime == void 0 || currentLocation.rotTime == ''){
-                    var restChildCount = currentLocation.heroLocations ? (currentLocation.heroLocations.length-this.director.currentItem[1]-1) : 0
-                    var hasMusic = currentLocation && currentLocation.musicInfo && currentLocation.musicInfo.music
-                    if(hasMusic){
-                        var audioObj = SoundManager.list.find(e=>e.name == 'tour') 
-                        var current = audioObj.audio.currentTime * 1e3 // || 0  //g_tourAudio ? 1e3 * g_tourAudio.currentTime : 0
-                        rotTime = currentLocation.musicInfo.time - current
-                        if(restChildCount){//如果当前folder中还有剩下的item,平分一下时间
-                            rotTime = (rotTime-timeEachItem*restChildCount) / (restChildCount+1);   
-                        }  
-                    }else{
-                        rotTime = defaultRotTime
-                    } 
-                    rotTime = Math.max(0, rotTime)
-                    Log("rotTime "+rotTime +" at item "+this.director.currentItem + (hasMusic ? (",musicCurrentTime:"+current+'音乐总长:'+currentLocation.musicInfo.time) : ''),"#E8E") 
+                    // 周恩光加 使用片段时长覆盖音乐时长
+                    rotTime = currentLocation.heroLocations[this.director.currentItem[1]-1].rotTime * 1000
+                    if(!rotTime) {
+                        var restChildCount = currentLocation.heroLocations ? (currentLocation.heroLocations.length-this.director.currentItem[1]-1) : 0
+                        var hasMusic = currentLocation && currentLocation.musicInfo && currentLocation.musicInfo.music
+                        if(hasMusic){
+                            var audioObj = SoundManager.list.find(e=>e.name == 'tour') 
+                            var current = audioObj.audio.currentTime * 1e3 // || 0  //g_tourAudio ? 1e3 * g_tourAudio.currentTime : 0
+                            rotTime = currentLocation.musicInfo.time - current
+                            if(restChildCount){//如果当前folder中还有剩下的item,平分一下时间
+                                rotTime = (rotTime-timeEachItem*restChildCount) / (restChildCount+1);   
+                            }  
+                        }else{
+                            rotTime = defaultRotTime
+                        } 
+                        rotTime = Math.max(0, rotTime)
+                        Log("rotTime "+rotTime +" at item "+this.director.currentItem + (hasMusic ? (",musicCurrentTime:"+current+'音乐总长:'+currentLocation.musicInfo.time) : ''),"#E8E")
+                    } else {
+                        Log("rotTime "+rotTime +" at item "+this.director.currentItem,"#E8E") 
+                    }
                 }else{
                     rotTime = currentLocation.rotTime * 1000
                     Log("rotTime "+rotTime +" at item "+this.director.currentItem,"#E8E")