trtc-room.wxml 4.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. <import src='./template/1v1/1v1.wxml'/>
  2. <import src='./template/grid/grid.wxml'/>
  3. <import src='./template/custom/custom.wxml'/>
  4. <view class="trtc-room-container {{isFullscreenDevice?'fullscreen-device-fix':''}}">
  5. <block wx:if="{{template === '1v1'}}">
  6. <template is='1v1' data="{{pusher, streamList, debug, enableIM}}"></template>
  7. </block>
  8. <block wx:if="{{template === 'grid'}}">
  9. <template is='grid' data="{{pusher, streamList, visibleStreamList, debug, enableIM, panelName, gridPagePlaceholderStreamList, gridPageCount, gridCurrentPage, gridPlayerPerPage, isShowMoreMenu, MICVolume, BGMVolume, BGMProgress, beautyStyle, beautyStyleArray, filterIndex, filterArray, audioReverbTypeArray}}"></template>
  10. </block>
  11. <block wx:if="{{template === 'custom'}}">
  12. <template is='custom' data="{{pusher, streamList, debug}}"></template>
  13. </block>
  14. <view class="im-panel" wx:if="{{enableIM && showIMPanel}}">
  15. <view class="message-panel-body">
  16. <scroll-view scroll-y="true" class="message-scroll-container" scroll-into-view="message{{messageList.length-1}}" scroll-with-animation="{{true}}">
  17. <view class="message-list">
  18. <view class="message-item" wx:for="{{messageList}}" wx:key="index" id="message{{index}}">
  19. <span class="user-name {{item.name == config.userID?'mine':''}}">{{item.name}}</span>
  20. <span class="message-content">{{item.message}}</span>
  21. </view>
  22. <view id="message-bottom"></view>
  23. </view>
  24. </scroll-view>
  25. </view>
  26. <view class="message-panel-bottom">
  27. <view class="message-input-container">
  28. <input class="message-input" type="text" value="{{messageContent}}" bindinput='_inputIMMessage' bindconfirm='_sendIMMessage' confirm-type="send" placeholder="请输入消息" maxlength="200" placeholder-style="color:#ffffff;opacity: 0.55;"/>
  29. </view>
  30. <view class="message-send-btn">
  31. <button class="btn" bindtap="_sendIMMessage" hover-class="btn-hover">发送</button>
  32. </view>
  33. </view>
  34. <view bindtap="_toggleIMPanel" class='close-btn'>X</view>
  35. </view>
  36. <view class="debug-info-btn {{debugMode && !debugPanel?'':'none'}}">
  37. <button class="debug-btn" bindtap="_debugTogglePanel" hover-class="button-hover">Debug</button>
  38. </view>
  39. <view class="debug-info {{debugMode && debugPanel?'':'none'}}">
  40. <view bindtap="_debugTogglePanel" class='close-btn'>X</view>
  41. <view>appVersion: {{appVersion}}</view>
  42. <view>libVersion: {{libVersion}}</view>
  43. <view>template: {{template}}</view>
  44. <view>debug: <button class="{{debug?'':'false'}} debug-btn" bindtap="_debugToggleVideoDebug" hover-class="button-hover">{{debug}}</button></view>
  45. <view>userID: {{pusher.userID}}</view>
  46. <view>roomID: {{pusher.roomID}}</view>
  47. <view>camera: <button class="{{pusher.enableCamera?'':'false'}} debug-btn" bindtap="_toggleVideo" hover-class="button-hover">{{pusher.enableCamera}}</button></view>
  48. <view>mic: <button class="{{pusher.enableMic?'':'false'}} debug-btn" bindtap="_toggleAudio" hover-class="button-hover">{{pusher.enableMic}}</button></view>
  49. <view>switch camera: <button class="debug-btn" bindtap="switchCamera" hover-class="button-hover">{{cameraPosition||pusher.frontCamera}}</button></view>
  50. <view>Room:
  51. <button class="debug-btn" bindtap="_debugEnterRoom" hover-class="button-hover">Enter</button>
  52. <button class="debug-btn" bindtap="_debugExitRoom" hover-class="button-hover">Exit</button>
  53. <button class="debug-btn" bindtap="_debugGoBack" hover-class="button-hover">Go back</button>
  54. </view>
  55. <view>IM: <button class="debug-btn" bindtap="_debugSendRandomMessage" hover-class="button-hover">send</button></view>
  56. <view>user count: {{userList.length}}</view>
  57. <view wx:for="{{userList}}" wx:key="userID">{{item.userID}}|
  58. mainV:<span class="text {{item.hasMainVideo? 'true' : 'false' }}">{{item.hasMainVideo||false}}</span>|
  59. mainA:<span class="text {{item.hasMainAudio? 'true' : 'false' }}">{{item.hasMainAudio||false}}</span>|
  60. auxV:<span class="text {{item.hasAuxVideo? 'true' : 'false' }}">{{item.hasAuxVideo||false}}</span></view>
  61. <view>stream count: {{streamList.length}}</view>
  62. <view wx:for="{{streamList}}" wx:key="streamID">{{item.userID}}|{{item.streamType}}|
  63. SubV:<button class="{{!item.muteVideo?'':'false'}} debug-btn" bindtap="_debugToggleRemoteVideo" hover-class="button-hover" data-user-i-d="{{item.userID}}" data-stream-type="{{item.streamType}}">{{!item.muteVideo}}</button>|
  64. SubA:<button class="{{!item.muteAudio?'':'false'}} debug-btn" bindtap="_debugToggleRemoteAudio" hover-class="button-hover" data-user-i-d="{{item.userID}}" data-stream-type="{{item.streamType}}">{{!item.muteAudio}}</button></view>
  65. </view>
  66. </view>