live-player组件,点击胶囊按钮退出或者上滑退出,小程序运行在后台,为什么还在播放声音呢?
接入的TRCT实时音视频,在onHide中写对live-plater的音频流静音但是无效,在返回小程序的时候才静音成功
<view v-for="(item,index) in TRTCDATA.playerList" :key="item.id">
<live-player style="width: 100vw;height: 100vh;" class="player" :id="item.id" :data-userid="item.userID"
:data-streamid="item.streamID" :data-streamtype="item.streamType" :src="item.src" mode="live"
autoplay="true" :mute-audio="item.muteAudio" :mute-video="item.muteVideo"
orientation="vertical" min-cache="1" max-cache="2" sound-mode="speaker" @statechange="_playerStateChange"
@fullscreenchange="_playerFullscreenChange" @netstatus="_playerNetStatus"
@audiovolumenotify="_playerAudioVolumeNotify" />
</view>
onHide(() => {
TRTCDATA.playerList = list = TRTCDATA.TRTCexample.setPlayerAttributes(TRTCDATA.playerList[0].id, {'muteAudio': true})
})
你好,麻烦提供出现问题的具体机型、微信版本号、系统版本号,以及能复现问题的代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html)
我是在iOS测试,返回上一个页面后仍然有声音,onUnload里面已经把参数都重置了也不行,onUnload方法也执行了