live.wxml 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. <view class="container">
  2. <cover-image
  3. wx:if="{{isLive}}"
  4. class="full-icon"
  5. src="/images/ic_screen.png"
  6. catch:tap="changeFull"
  7. />
  8. <view style="height:250rpx;"
  9. wx:if="{{playerList.length>1 || (playerList.length==1 && pusher.enableCamera)}}"></view>
  10. <live-reply bind:message="reply" bind:hand="hand"
  11. class="bottom-reply"
  12. user="{{user}}" groupId="{{groupId}}"
  13. userSig="{{userSig}}"
  14. showMsg="{{(type == liveSourcesEnum.GUEST && isAudText == 1) || type == liveSourcesEnum.DEFAULT }}"
  15. showHand="{{(type == liveSourcesEnum.DEFAULT && isStuVideo == 0 && !pusher.enableCamera )||(type == liveSourcesEnum.GUEST && isAudVideo == 1 && !pusher.enableCamera)}}"/>
  16. <view class="push-tool" hidden="{{!pusher.enableCamera}}">
  17. <view class="left" catch:tap="quitLink">
  18. <van-image width="35rpx" height="35rpx" fit="cover" src="/images/ic_shutdown.png"/>下麦
  19. </view>
  20. <view class="left" catch:tap="switchCamera">
  21. <van-image width="35rpx" height="35rpx" fit="cover" src="/images/ic_switch_camera.png"/>切换
  22. </view>
  23. </view>
  24. <view class="live-container {{isFull?'live-full':''}}">
  25. <van-empty wx:if="{{!isLive}}" image="" description="直播登录中..." class="live-empty">
  26. </van-empty>
  27. </view>
  28. <view class="line"></view>
  29. <view class="{{isFull?'sub-live-full':'sub-live'}}">
  30. <block wx:if="{{playerList.length}}">
  31. <block
  32. wx:for="{{playerList}}"
  33. wx:key="streamID"
  34. >
  35. <live-player
  36. bind:tap="handlePlayer"
  37. class="player {{bigIndex==index?'live-container':''}} {{(bigIndex==index && isFull)?'live-full':''}}"
  38. id="{{item.id}}"
  39. data-index="{{index}}"
  40. data-userid="{{item.userID}}"
  41. data-streamid="{{item.streamID}}"
  42. data-streamtype="{{item.streamType}}"
  43. src="{{item.src}}"
  44. mode="RTC"
  45. autoplay="{{item.autoplay}}"
  46. mute-audio="{{item.muteAudio}}"
  47. mute-video="{{item.muteVideo}}"
  48. orientation="{{item.orientation}}"
  49. object-fit="{{item.objectFit}}"
  50. background-mute="{{item.enableBackgroundMute}}"
  51. min-cache="{{item.minCache}}"
  52. max-cache="{{item.maxCache}}"
  53. sound-mode="{{item.soundMode}}"
  54. enable-recv-message="{{item.enableRecvMessage}}"
  55. auto-pause-if-navigate="{{item.autoPauseIfNavigate}}"
  56. auto-pause-if-open-native="{{item.autoPauseIfOpenNative}}"
  57. debug="{{debug}}"
  58. bindstatechange="_playerStateChange"
  59. bindfullscreenchange="_playerFullscreenChange"
  60. bindnetstatus="_playerNetStatus"
  61. bindaudiovolumenotify="_playerAudioVolumeNotify"
  62. />
  63. </block>
  64. </block>
  65. <live-pusher
  66. class="player {{bigIndex==-1?'live-container':''}} {{(bigIndex==-1 && isFull)?'live-full':''}} {{!pusher.enableCamera?'push-none':''}}"
  67. data-index="{{-1}}"
  68. bind:tap="handlePlayer"
  69. url="{{pusher.url}}"
  70. mode="{{pusher.mode}}"
  71. autopush="{{pusher.autopush}}"
  72. enable-camera="{{pusher.enableCamera}}"
  73. enable-mic="{{pusher.enableMic}}"
  74. muted="{{!pusher.enableMic}}"
  75. enable-agc="{{pusher.enableAgc}}"
  76. enable-ans="{{pusher.enableAns}}"
  77. enable-ear-monitor="{{pusher.enableEarMonitor}}"
  78. auto-focus="{{pusher.enableAutoFocus}}"
  79. zoom="{{pusher.enableZoom}}"
  80. min-bitrate="{{pusher.minBitrate}}"
  81. max-bitrate="{{pusher.maxBitrate}}"
  82. video-width="{{pusher.videoWidth}}"
  83. video-height="{{pusher.videoHeight}}"
  84. beauty="{{pusher.beautyLevel}}"
  85. whiteness="{{pusher.whitenessLevel}}"
  86. orientation="{{pusher.videoOrientation}}"
  87. aspect="{{pusher.videoAspect}}"
  88. device-position="{{pusher.frontCamera}}"
  89. remote-mirror="{{pusher.enableRemoteMirror}}"
  90. local-mirror="{{pusher.localMirror}}"
  91. background-mute="{{pusher.enableBackgroundMute}}"
  92. audio-quality="{{pusher.audioQuality}}"
  93. audio-volume-type="{{pusher.audioVolumeType}}"
  94. audio-reverb-type="{{pusher.audioReverbType}}"
  95. waiting-image="{{pusher.waitingImage}}"
  96. debug="{{debug}}"
  97. beauty-style="{{pusher.beautyStyle}}"
  98. filter="{{pusher.filter}}"
  99. bindstatechange="_pusherStateChangeHandler"
  100. bindnetstatus="_pusherNetStatusHandler"
  101. binderror="_pusherErrorHandler"
  102. bindbgmstart="_pusherBGMStartHandler"
  103. bindbgmprogress="_pusherBGMProgressHandler"
  104. bindbgmcomplete="_pusherBGMCompleteHandler"
  105. bindaudiovolumenotify="_pusherAudioVolumeNotify"
  106. />
  107. </view>
  108. </view>