Commit bf1f50c9 by 何天远

限制 离开 频道次数

parent 15b199b4
......@@ -163,6 +163,8 @@ class AudioHomeActivity : BaseMvpActivity<IAudioHomeActivityContract.View, IAudi
//频道管理器
private var channelManager : ChannelManager? = null
private var isLeavelChannel:Boolean = false
/**
* 声网事件回调 (SDK 通过指定的事件通知应用程序 SDK 的运行事件,如: 加入或离开频道,新用户加入频道等)
*/
......@@ -932,11 +934,14 @@ class AudioHomeActivity : BaseMvpActivity<IAudioHomeActivityContract.View, IAudi
* 声网离开频道
*/
private fun leaveChannel() {
//刷新h5页面
EventBus.getDefault().post(RefreshWebEvent(false))
stopPlaying()
//播放结束音频
playFinishMusic()
if (!isLeavelChannel) {
isLeavelChannel = true
//刷新h5页面
EventBus.getDefault().post(RefreshWebEvent(false))
stopPlaying()
//播放结束音频
playFinishMusic()
}
}
override fun onResume() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment