connected.wxml 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. <view class="TUICalling-connected-layout {{callType === 1 ? 'audio' : 'video'}}">
  2. <view
  3. class="{{callType === 1 ? 'pusher-audio' : playerList.length > 1 ? 'stream-box' : (screen === 'pusher' ? 'pusher-video' : 'player')}}"
  4. data-screen="pusher" catch:tap="toggleViewSize">
  5. <live-pusher class="{{callType === 1 ? 'pusher-audio' : 'live'}}" url="{{pusher.url}}" mode="{{pusher.mode}}"
  6. autopush="{{true}}" enable-camera="{{pusher.enableCamera}}" enable-mic="{{true}}"
  7. muted="{{!pusher.enableMic}}" enable-agc="{{true}}" enable-ans="{{true}}"
  8. enable-ear-monitor="{{pusher.enableEarMonitor}}" auto-focus="{{pusher.enableAutoFocus}}"
  9. zoom="{{pusher.enableZoom}}" min-bitrate="{{pusher.minBitrate}}" max-bitrate="{{pusher.maxBitrate}}"
  10. video-width="{{pusher.videoWidth}}" video-height="{{pusher.videoHeight}}" beauty="{{pusher.beautyLevel}}"
  11. whiteness="{{pusher.whitenessLevel}}" orientation="{{pusher.videoOrientation}}"
  12. aspect="{{pusher.videoAspect}}" device-position="{{pusher.frontCamera}}"
  13. remote-mirror="{{pusher.enableRemoteMirror}}" local-mirror="{{pusher.localMirror}}"
  14. background-mute="{{pusher.enableBackgroundMute}}" audio-quality="{{pusher.audioQuality}}"
  15. audio-volume-type="{{pusher.audioVolumeType}}" audio-reverb-type="{{pusher.audioReverbType}}"
  16. waiting-image="{{pusher.waitingImage}}" beauty-style="{{pusher.beautyStyle}}" filter="{{pusher.filter}}"
  17. bindstatechange="pusherStateChangeHandler" bindnetstatus="pusherNetStatus" binderror="pusherErrorHandler"
  18. bindaudiovolumenotify="pusherAudioVolumeNotify" />
  19. </view>
  20. <view wx:if="{{callType === 1}}" class="TRTCCalling-call-audio-box {{playerList.length > 1 && 'mutil-img'}}">
  21. <view class="TRTCCalling-call-audio-img" wx:if="{{playerList.length > 1}}">
  22. <image src="{{pusher.avatar || '../../static/default_avatar.png'}}" class="img-place-holder avatar"
  23. data-value="{{pusher.userID}}" data-flag="pusher" binderror="handleConnectErrorImage" />
  24. <text class="audio-name">{{pusher.nick || pusher.userID}}(自己)</text>
  25. </view>
  26. <view class="TRTCCalling-call-audio-img" wx:for="{{userList || playerList}}" wx:key="userID">
  27. <image src="{{item.avatar || '../../static/default_avatar.png'}}" class="img-place-holder avatar"
  28. data-value="{{item}}" data-flag="player" data-key="userList" data-index="{{index}}" binderror="handleConnectErrorImage" />
  29. <text class="audio-name">{{item.nick || item.userID}}</text>
  30. </view>
  31. </view>
  32. <view wx:for="{{playerList}}" wx:key="streamID"
  33. class="view-container player-container {{callType === 1 ? 'player-audio' : ''}}">
  34. <view
  35. class="{{callType === 1 ? 'player-audio' : playerList.length > 1 ? 'stream-box' : (screen === 'player' ? 'pusher-video' : 'player')}}"
  36. data-screen="player" catch:tap="toggleViewSize">
  37. <live-player class="live" wx:if="{{ item.hasAudio || item.hasVideo }}" id="{{item.id}}" data-userid="{{item.userID}}" data-streamid="{{item.streamID}}"
  38. data-streamtype="{{item.streamType}}" src="{{item.src}}" mode="RTC" autoplay="{{item.autoplay}}"
  39. mute-audio="{{item.muteAudio}}" mute-video="{{item.muteVideo}}" orientation="{{item.orientation}}"
  40. object-fit="{{item.objectFit}}" background-mute="{{item.enableBackgroundMute}}"
  41. min-cache="{{item.minCache}}" max-cache="{{item.maxCache}}" sound-mode="{{soundMode}}"
  42. enable-recv-message="{{item.enableRecvMessage}}" auto-pause-if-navigate="{{item.autoPauseIfNavigate}}"
  43. auto-pause-if-open-native="{{item.autoPauseIfOpenNative}}" bindstatechange="playerStateChange"
  44. bindfullscreenchange="playerFullscreenChange" bindnetstatus="playNetStatus"
  45. bindaudiovolumenotify="playerAudioVolumeNotify" />
  46. </view>
  47. </view>
  48. <view class="handle-btns">
  49. <view class="other-view {{callType === 1 ? 'black' : 'white'}}">
  50. <text>{{pusher.chatTime}}</text>
  51. </view>
  52. <view class="btn-operate-item call-switch" catch:tap="switchAudioCall">
  53. <view class="call-operate">
  54. <image src="../../static/trans.png" />
  55. </view>
  56. <text>切到语音通话</text>
  57. </view>
  58. <view class="btn-list">
  59. <view class="button-container">
  60. <view class="btn-normal" bindtap="pusherAudioHandler">
  61. <image class="btn-image"
  62. src="{{pusher.enableMic? '../../static/audio-true.png': '../../static/audio-false.png'}} ">
  63. </image>
  64. </view>
  65. <view class="{{callType === 2 ? 'white' : ''}}">麦克风</view>
  66. </view>
  67. <view class="button-container" wx:if="{{callType === 1}}">
  68. <view class="btn-hangup" bindtap="hangup">
  69. <image class="btn-image" src="../../static/hangup.png"></image>
  70. </view>
  71. <view class="{{callType === 2 ? 'white' : ''}}">挂断</view>
  72. </view>
  73. <view class="button-container">
  74. <view class="btn-normal" bindtap="toggleSoundMode">
  75. <image class="btn-image"
  76. src="{{soundMode === 'ear' ? '../../static/speaker-false.png': '../../static/speaker-true.png'}} ">
  77. </image>
  78. </view>
  79. <text class="{{callType === 2 ? 'white' : ''}}">扬声器</text>
  80. </view>
  81. <view class="button-container" wx:if="{{callType === 2}}">
  82. <view class="btn-normal" bindtap="pusherVideoHandler">
  83. <image class="btn-image"
  84. src="{{pusher.enableCamera ? '../../static/camera-true.png': '../../static/camera-false.png'}} ">
  85. </image>
  86. </view>
  87. <text class="white">摄像头</text>
  88. </view>
  89. </view>
  90. <view class="btn-list" wx:if="{{callType===2}}">
  91. <!-- <view class="btn-list-item">
  92. <view wx:if="{{playerList.length === 1}}" class="btn-normal" bindtap="switchAudioCall">
  93. <image class="btn-image btn-image-small" src="{{ '../../static/trans.png'}} "></image>
  94. </view>
  95. </view> -->
  96. <view class="btn-list-item other-view">
  97. <view class="btn-container">
  98. <view class="btn-hangup" bindtap="hangup">
  99. <image class="btn-image" src="../../static/hangup.png"></image>
  100. </view>
  101. <view wx:if="{{pusher.enableCamera}}" class="invite-calling-header-left">
  102. <image src="../../static/switch_camera.png" data-device="{{pusher.frontCamera}}"
  103. catch:tap="toggleSwitchCamera" />
  104. </view>
  105. </view>
  106. <text class="white">挂断</text>
  107. </view>
  108. <!-- <view class="btn-list-item btn-footer">
  109. <view wx:if="{{pusher.enableCamera}}" class="{{playerList.length > 1 ? 'multi-camera' : 'camera'}}">
  110. <image class="camera-image" src="../../static/swtich-camera.png"
  111. data-device="{{pusher.frontCamera}}" catch:tap="toggleSwitchCamera" />
  112. </view>
  113. </view> -->
  114. </view>
  115. </view>
  116. </view>