1
0
Fork 0
Agora-Miniapp-Tutorial/pages/test/test.wxml

21 lines
1.5 KiB
Plaintext
Raw Normal View History

2022-06-06 11:51:36 +08:00
<!--pages/test/test.wxml-->
<view style="display: flex">
<view style="width: 50%; height: 250px; padding: 20rpx 10rpx 20rpx 20rpx">
<live-pusher audio-quality="high" style="height:250px; width: 100%" url="{{pushUrl}}" mode="RTC" debug="{{debug}}" max-bitrate="500" min-bitrate="200"/>
</view>
<view style="width: 50%; height: 250px; padding: 20rpx 20rpx 20rpx 10rpx">
<live-player id="player" src="{{playUrl}}" mode="RTC" min-cache="0.1" max-cache="0.3" bindstatechange="playerStateChange" object-fit="fillCrop" style="height:250px; width: 100%;" debug="{{debug}}" />
</view>
</view>
<view style="padding: 0rpx 20rpx;border-bottom: 1px solid rgba(0,0,0,0.1);border-top: 1px solid rgba(0,0,0,0.1);">
<input placeholder="推流地址 (rtmp/flv)" bindconfirm='startPushing' placeholder-style='font-size: 28rpx; color: rgba(0,0,0,0.3)' style="font-size: 32rpx; color: #666; padding: 10rpx 0"></input>
</view>
<view style="padding: 0rpx 20rpx;border-bottom: 1px solid rgba(0,0,0,0.1);">
<input placeholder="拉流地址 (rtmp/flv)" bindconfirm='startPlaying' placeholder-style='font-size: 28rpx; color: rgba(0,0,0,0.3)' style="font-size: 32rpx; color: #666; padding: 10rpx 0"></input>
</view>
<view style="padding: 0rpx 20rpx; margin-top: 40rpx">
<text style="font-size: 30rpx; margin-right: 10rpx">Debug:</text> <switch checked="{{debug}}" bindchange="switchDebug" />
<button bindtap="onPause">Pause</button>
<button bindtap="onResume">Resume</button>
<button bindtap="onStopPushing">Stop</button>
</view>