calling.wxml 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. <view class="invite-call transition-animation" wx:if="{{callType === 2}}">
  2. <!-- wx:if="{{pusher.frontCamera}}" 为了处理下滑动画卡顿的问题 -->
  3. <live-pusher class="local-video" wx:if="{{pusher.frontCamera}}" device-position="{{pusher.frontCamera}}" binderror="pusherErrorHandler"/>
  4. <view class="invite-calling">
  5. <view class="invite-calling-header" wx:if="{{remoteUsers.length === 1}}">
  6. <!-- <view class="invite-calling-header-left">
  7. <image src="../../static/swtich-camera.png" data-device="{{pusher.frontCamera}}"
  8. catch:tap="toggleSwitchCamera" />
  9. </view> -->
  10. <view class="invite-calling-header-right">
  11. <view class="invite-calling-header-message">
  12. <label class="tips">{{remoteUsers[0].nick || remoteUsers[0].userID}}</label>
  13. <text class="tips-subtitle" wx:if="{{!isSponsor}}">邀请你视频通话</text>
  14. <text class="tips-subtitle" wx:else>等待对方接受</text>
  15. </view>
  16. <image class="avatar" src="{{remoteUsers[0].avatar || '../../static/default_avatar.png'}}"
  17. id="{{remoteUsers[0].userID}}" binderror="handleErrorImage" />
  18. </view>
  19. </view>
  20. <view class="invite-calling-header invite-calling-list" wx:else>
  21. <view class="invite-calling-item" wx:for="{{remoteUsers}}" wx:key="userID">
  22. <image class="avatar" src="{{item.avatar || '../../static/default_avatar.png'}}" id="{{item.userID}}"
  23. binderror="handleErrorImage" />
  24. <view class="invite-calling-item-message">
  25. <label class="tips">{{item.nick || item.userID}}</label>
  26. <text class="tips-subtitle" wx:if="{{!isSponsor}}">邀请你视频通话</text>
  27. <text class="tips-subtitle" wx:else>等待对方接受</text>
  28. </view>
  29. </view>
  30. </view>
  31. <view class="footer">
  32. <view class="btn-operate" wx:if="{{isSponsor}}">
  33. <view class="btn-operate-item call-switch" catch:tap="switchAudioCall">
  34. <view class="call-operate">
  35. <image src="../../static/trans.png" />
  36. </view>
  37. <text>切到语音通话</text>
  38. </view>
  39. </view>
  40. <view class="btn-operate" wx:if="{{isSponsor}}">
  41. <view class="btn-operate-item">
  42. <view class="btn-container">
  43. <view class="call-operate" catch:tap="hangup">
  44. <image src="../../static/hangup.png" />
  45. </view>
  46. <view class="invite-calling-header-left">
  47. <image src="../../static/switch_camera.png" data-device="{{pusher.frontCamera}}"
  48. catch:tap="toggleSwitchCamera" />
  49. </view>
  50. </view>
  51. <text>挂断</text>
  52. </view>
  53. </view>
  54. <view class="btn-operate" wx:if="{{!isSponsor}}">
  55. <view class="btn-operate-item">
  56. <view class="call-operate" style="background-color: red" catch:tap="reject">
  57. <image src="../../static/hangup.png" />
  58. </view>
  59. <text>挂断</text>
  60. </view>
  61. <view class="btn-operate-item">
  62. <view class="call-operate" catch:tap="accept">
  63. <image src="../../static/dialing.png" />
  64. </view>
  65. <text>接听</text>
  66. </view>
  67. </view>
  68. </view>
  69. </view>
  70. </view>
  71. <view class="incoming-call audio-call transition-animation" wx:if="{{callType === 1}}">
  72. <view class="invite-calling-single">
  73. <image class="avatar" src="{{remoteUsers[0].avatar || '../../static/default_avatar.png'}}"
  74. id="{{remoteUsers[0].userID}}" binderror="handleErrorImage" />
  75. <view class="tips">{{remoteUsers[0].nick || remoteUsers[0].userID}}</view>
  76. <view wx:if="{{isSponsor && callType === 1}}" class="tips-subtitle">{{'等待对方接受'}}</view>
  77. </view>
  78. <view class="footer">
  79. <view wx:if="{{!isSponsor && callType === 1}}" class="btn-operate">
  80. <view class="button-container">
  81. <view class="call-operate" style="background-color: red" catch:tap="reject">
  82. <image src="../../static/hangup.png" />
  83. </view>
  84. <view style="margin-top:10px">挂断</view>
  85. </view>
  86. <view class="button-container">
  87. <view class="call-operate" catch:tap="accept">
  88. <image src="../../static/dialing.png"/>
  89. </view>
  90. <view style="margin-top:10px">接听</view>
  91. </view>
  92. </view>
  93. <view wx:if="{{isSponsor && callType === 1}}" class="btn-operate">
  94. <view class="button-container">
  95. <view class="call-operate" style="background-color: red" catch:tap="hangup">
  96. <image src="../../static/hangup.png" />
  97. </view>
  98. <view style="margin-top:10px">挂断</view>
  99. </view>
  100. </view>
  101. </view>
  102. </view>