Merge branch 'main' of http://175.6.124.250:3100/Libt/multiple-police-situations
This commit is contained in:
		
						commit
						7edfd5275f
					
				
							
								
								
									
										64
									
								
								analyze.html
								
								
								
								
							
							
						
						
									
										64
									
								
								analyze.html
								
								
								
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							| 
						 | 
					@ -11,10 +11,8 @@ var curIndex = 0 // 当前窗口下标
 | 
				
			||||||
let myPlugin: any
 | 
					let myPlugin: any
 | 
				
			||||||
onMounted(() => {
 | 
					onMounted(() => {
 | 
				
			||||||
  if (typeof window.JSPlugin === 'undefined') {
 | 
					  if (typeof window.JSPlugin === 'undefined') {
 | 
				
			||||||
    console.error('JSPlugin is not loaded')
 | 
					 | 
				
			||||||
    return
 | 
					    return
 | 
				
			||||||
  } else {
 | 
					  } else {
 | 
				
			||||||
    console.log('JSPlugin加载成功')
 | 
					 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
  let date = {
 | 
					  let date = {
 | 
				
			||||||
    pointId: router.currentRoute.value.query.pointId,
 | 
					    pointId: router.currentRoute.value.query.pointId,
 | 
				
			||||||
| 
						 | 
					@ -25,13 +23,12 @@ onMounted(() => {
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  api.post('/multialarm/video/preview', { ...date }).then((res) => {
 | 
					  api.post('/multialarm/video/preview', { ...date }).then((res) => {
 | 
				
			||||||
    console.log('router222', res)
 | 
					    // console.log('router222', res)
 | 
				
			||||||
    console.log('播放地址', res.data.videoUrl)
 | 
					    console.log('播放地址', res.data.videoUrl)
 | 
				
			||||||
    var code = res['code']
 | 
					    var code = res['code']
 | 
				
			||||||
    if (code == 0) {
 | 
					    if (code == 0) {
 | 
				
			||||||
      var playURL = res.data.videoUrl
 | 
					      var playURL = res.data.videoUrl
 | 
				
			||||||
      // var playURL = 'wss://www.hnjinglian.cn:2563/haikang_play/openUrl/w64vRni'
 | 
					      // var playURL = 'wss://w.hnjinglian.cn:2563/haikang play/openUrl/w64vRni'
 | 
				
			||||||
 | 
					 | 
				
			||||||
      var IS_MOVE_DEVICE = document.body.clientWidth < 992 // 是否移动设备
 | 
					      var IS_MOVE_DEVICE = document.body.clientWidth < 992 // 是否移动设备
 | 
				
			||||||
      var MSE_IS_SUPPORT = !!window.MediaSource // 是否支持mse
 | 
					      var MSE_IS_SUPPORT = !!window.MediaSource // 是否支持mse
 | 
				
			||||||
      myPlugin = new window.JSPlugin({
 | 
					      myPlugin = new window.JSPlugin({
 | 
				
			||||||
| 
						 | 
					@ -48,15 +45,14 @@ onMounted(() => {
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
        bSupporDoubleClickFull: true, //是否支持双击全屏,默认true
 | 
					        bSupporDoubleClickFull: true, //是否支持双击全屏,默认true
 | 
				
			||||||
      })
 | 
					      })
 | 
				
			||||||
 | 
					      myPlugin
 | 
				
			||||||
      console.log('myPlugin________', myPlugin)
 | 
					        .JS_SetWindowControlCallback({
 | 
				
			||||||
 | 
					          pluginErrorHandler: function (index: any, iErrorCode: any, oError: any) {},
 | 
				
			||||||
 | 
					        })
 | 
				
			||||||
 | 
					        .then((res: any) => {})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      var controlIndex = 2
 | 
					      var controlIndex = 2
 | 
				
			||||||
      function playVideo() {
 | 
					      function playVideo() {
 | 
				
			||||||
        console.log('____________playURL:', playURL)
 | 
					 | 
				
			||||||
        console.log('____________curIndex:', curIndex)
 | 
					 | 
				
			||||||
        //   JS_Play 参数说明
 | 
					 | 
				
			||||||
        //   JS_Play(url, config, windowIndex, startTime, endTime)
 | 
					 | 
				
			||||||
        myPlugin
 | 
					        myPlugin
 | 
				
			||||||
          .JS_Play(
 | 
					          .JS_Play(
 | 
				
			||||||
            playURL,
 | 
					            playURL,
 | 
				
			||||||
| 
						 | 
					@ -67,17 +63,14 @@ onMounted(() => {
 | 
				
			||||||
            curIndex //当前窗口下标
 | 
					            curIndex //当前窗口下标
 | 
				
			||||||
          )
 | 
					          )
 | 
				
			||||||
          .then(
 | 
					          .then(
 | 
				
			||||||
            () => {
 | 
					            () => {},
 | 
				
			||||||
              console.info('JS_Play success')
 | 
					 | 
				
			||||||
              // do you want...
 | 
					 | 
				
			||||||
            },
 | 
					 | 
				
			||||||
            (e: any) => {
 | 
					            (e: any) => {
 | 
				
			||||||
              console.log('网络流中断')
 | 
					              // console.log('网络流中断')
 | 
				
			||||||
              controlIndex--
 | 
					              controlIndex--
 | 
				
			||||||
              if (controlIndex <= 0) {
 | 
					              if (controlIndex <= 0) {
 | 
				
			||||||
                return
 | 
					                return
 | 
				
			||||||
              }
 | 
					              }
 | 
				
			||||||
              console.info('JS_Play failed:', e)
 | 
					              // console.info('JS_Play failed:', e)
 | 
				
			||||||
              playVideo()
 | 
					              playVideo()
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
          )
 | 
					          )
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1065,6 +1065,7 @@ const pointCode = ref()
 | 
				
			||||||
        // routeData.href = 'index.html' + routeData.href
 | 
					        // routeData.href = 'index.html' + routeData.href
 | 
				
			||||||
        console.log('routeData.href_____________________', routeData.href)
 | 
					        console.log('routeData.href_____________________', routeData.href)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        // console.log('🚀 ~ routeData:', JSON.stringify(routeData))
 | 
				
			||||||
        // window.location.href = routeData.href
 | 
					        // window.location.href = routeData.href
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        window.open(routeData.href, '_blank')
 | 
					        window.open(routeData.href, '_blank')
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue