live.wxml 5.8 KB

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