live-pusher前置摄像头推流 live-play画面被旋转180度倒立了
发布于 5 年前 作者 junqian 6754 次浏览 来自 问答

给live-pusher设置device-position属性为back好像对ios手机无效

<live-pusher
        id="pushPlayer"
        orientation="{{horizontal}}"
        mode="{{mode}}"
        device-position="{{front}}"
        muted="{{muted}}"
        background-mute="{{true}}"
        beauty="{{beauty}}"
        class="live-pusher"
        autopush="{{autopush}}"
        @statechange="statechange"
        @netstatus="netstatusChange"
        url="{{pushUrl}}"
      >
// 获取实例
that.pushPlayerCtx = wx.createLivePusherContext('pushPlayer');
 
//切换摄像头
that.pushPlayerCtx.switchCamera();
<live-player
          hidden="{{isLivePlay}}"
          id="livePlayer"
          style="width: 100%;height: 100%;background: #000;"
          src="{{livePlayUrl}}"
          orientation="{{horizontal}}"
          object-fit="{{fillCrop}}"
          mode="RTC"
          autoplay="{{liveAutoplay}}"
          bindstatechange="liveStateChange"
          binderror="liveError"
          controls
          bindnetstatus="liveNetStatus"
        >
1 回复

麻烦提供出现问题的机型和微信版本,以及能复现问题的简单代码片段https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html

回到顶部