ifny
ifny
  • 发布:2025-04-28 11:06
  • 更新:2025-04-28 11:06
  • 阅读:43

【报Bug】调用plus.video.createLivePusher 并使用switchCamera切换摄像头,初始化仍是后置摄像头,返回再次进入就默认是前置摄像头了

分类:HTML5+
    livePusher.value = ref()  
    const pages = getCurrentPages()  
    const page = pages[pages.length - 1]  
    let currentWebview = page?.$getAppWebview()  
    if (typeof plus !== 'undefined') {  
      try {  
        livePusher.value = plus.video.createLivePusher('livepusher', {  
          url: '',  
          top: '-18%',  
          left: '30%',  
          width: '400px',  
          height: '100%',  
          position: 'absolute',  
          aspect: '3:2',  
          muted: true,  
        })  
        currentWebview.append(livePusher.value)  
        //  反转摄像头  
        livePusher.value.switchCamera()  
        livePusher.value.preview()
2025-04-28 11:06 负责人:无 分享
已邀请:

要回复问题请先登录注册