12345678910111213141516171819202122232425262728293031323334353637383940 |
- <view>
- <view class="{{'main-center-fullscreen'}}">
- <rtc-room
- class="{{'rtcroom-full-screen'}}"
- id="{{elementId}}"
- roomId="{{webrtcInfo.roomId}}"
- token="{{webrtcInfo.rtoken}}"
- userId="{{webrtcInfo.uid}}"
- signature="{{webrtcInfo.signature}}"
- extraInfo="{{extraInfo}}"
- enable-camera="{{false}}"
- mute="{{true}}"
- onRoomInfo="onRoomInfo"
- onEnterRoom = "onEnterRoom"
- onError="onError"
- onFirstRender = "onFirstRender"
- onReceiveMessage = "onReceiveMessage"
- />
- <view class="chat-box">
- <scroll-view id="scrollView" scroll-y="true" style="max-height:300px" scroll-top="{{scrollTop}}">
- <block a:for="{{chatList}}">
- <view id="message-{{index}}" style="line-height: 30px;word-wrap: break-word;color: {{item.type== 0?'red':''}}">{{['','Q:','A:'][item.type]}}{{item.text}}</view>
- </block>
- </scroll-view>
- </view>
- <view class="btnContainer">
- <button type="default" class="btn-avatar" onTap="startAsr" plain>开始录音</button>
- <button type="default" class="btn-avatar" onTap="interrupt" plain>打断</button>
- <button type="default" class="btn-avatar" onTap="stopAsr" plain>停止录音</button>
- <button type="default" class="btn-avatar" onTap="onClear" plain>清空</button>
- <button type="default" class="btn-avatar" style="flex:1" onTap="query2" plain>你是谁</button>
- <button type="default" class="btn-avatar" style="flex:1" onTap="query1" plain>今天天气怎么样</button>
- <!-- <button type="default" class="btn-avatar" onTap="stopLive" plain>关闭流服务</button>-->
- </view>
- </view>
- </view>
|