live-pusher.wxml 1.2 KB

1234567891011121314151617181920212223242526272829
  1. <import src="../../../common/head.wxml" />
  2. <import src="../../../common/foot.wxml" />
  3. <view class="container page" data-weui-theme="{{theme}}">
  4. <template is="head" data="{{title: 'live-pusher'}}"/>
  5. <view class="page-body">
  6. <view class="page-section">
  7. <live-pusher id="pusher" url="{{ videoSrc }}" mode="RTC" autopush bindstatechange="handleLivePusherStateChange" binderror="handleLivePusherError"></live-pusher>
  8. </view>
  9. <view class="page-section">
  10. <view class="page-url">视频地址 (支持rtmp):</view>
  11. <input name="input" placeholder="视频推送链接" value="{{ videoSrc }}" bindinput="handleVideoSrcInput" />
  12. <button type="primary" bindtap="handleScanQRCode">
  13. 扫码
  14. </button>
  15. </view>
  16. <view class="page-section">
  17. <button bindtap="handleStart" class="page-body-button" type="primary">开始</button>
  18. <button bindtap="handlePause" class="page-body-button" type="primary">暂停</button>
  19. <button bindtap="handleStop" class="page-body-button" type="primary">停止</button>
  20. <button bindtap="handleResume" class="page-body-button" type="primary">恢复</button>
  21. <button bindtap="handleSwitchCamera" class="page-body-button" type="primary">切换摄像头</button>
  22. </view>
  23. </view>
  24. <template is="foot" />
  25. </view>