video.wxml 4.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. <!--miniprogram/pages/video/video.wxml-->
  2. <view class="videobg">
  3. <view class="videoGroup">
  4. <view class="widthClient">
  5. <video id="myVideo" data-i="{{urlOne.i}}" class="widthClient" style="{{playerCom ? 'opacity: 1' : 'opacity: 0'}};position: absolute"
  6. bindended="videoEnd" bindwaiting="bindwaiting" bindprogress="bindprogress1" bindplay="bindplay"
  7. src="{{urlOne.url}}" binderror="videoErrorCallback" show-center-play-btn='{{false}}' controls="{{false}}"
  8. muted="{{muted}}" initial-time="{{0.01}}" bindtimeupdate="upProgress"
  9. enable-progress-gesture="{{false}}"></video>
  10. </view>
  11. <view class="widthClient">
  12. <video id="myVideo2" data-i="{{urlTwo.i}}" class="widthClient"
  13. style="{{!playerCom ? 'opacity: 1' : 'opacity: 0'}}" bindended="videoEnd" bindwaiting="bindwaiting"
  14. bindprogress="bindprogress2" bindplay="bindplay" src="{{urlTwo.url}}" show-center-play-btn='{{false}}'
  15. controls="{{false}}" muted="{{muted}}" initial-time="{{0.01}}" bindtimeupdate="upProgress"
  16. enable-progress-gesture="{{false}}"></video>
  17. </view>
  18. </view>
  19. <view class="widthClient">
  20. <view class="fun">
  21. <text>{{durationFormat}}/{{ allDurationFormat }}</text>
  22. <view class="item-button" bindtap="backStep">
  23. <image style="width: 18px; height: 18px; background-color: #181818;" wx:if="{{stepIndex > 0}}"
  24. mode="{{item.mode}}" src="../../resources/image/l.png">
  25. </image>
  26. <image style="width: 18px; height: 18px; background-color: #181818;" wx:if="{{stepIndex <= 0}}"
  27. mode="{{item.mode}}" src="../../resources/image/l2.png">
  28. </image>
  29. </view>
  30. <view class="item-button" bindtap="backNext">
  31. <image style="width: 18px; height: 18px; background-color: #181818;"
  32. wx:if="{{stepIndex < maxStepIndex && maxStepIndex >= 1}}" mode="{{item.mode}}"
  33. src="../../resources/image/r.png">
  34. </image>
  35. <image style="width: 18px; height: 18px; background-color: #181818;" wx:if="{{ maxStepIndex < 1}}"
  36. src="../../resources/image/r2.png">
  37. </image>
  38. </view>
  39. <view class="item-button">
  40. <mp-icon bindtap="play" wx:if="{{ !playStatus }}" icon="play" color="#fff" size="{{25}}"></mp-icon>
  41. <mp-icon bindtap="pause" wx:if="{{ playStatus }}" icon="pause" color="#fff" size="{{25}}"></mp-icon>
  42. </view>
  43. </view>
  44. <view id="progress">
  45. <!-- scroll-with-animation="{{!isScroll}}" -->
  46. <scroll-view class="scrollx" enhanced="{{true}}" bindtouchstart="acttouch" bindtouchend="endProgress"
  47. bindscroll="moveProgress" bindtouchend="endProgress" scroll-x scroll-left="{{progress}}">
  48. <view class="tarck" style="width: {{100 * imgFrame.length}}rpx">
  49. <view class="progressLong">
  50. <view wx:if="{{imgFrame.length}}">
  51. <image lazy-load style="width: 100rpx; height:55rpx" wx:for="{{imgFrame}}" src="{{item}}" wx:key="item">
  52. </image>
  53. </view>
  54. <view>
  55. <image style="width: 100%;height: 60px" wx:for="{{music}}" wx:key="id" wx:if="{{music.length}}"
  56. src="{{item.bo}}"></image>
  57. </view>
  58. <image style="width: 100%;height: 60px" wx:if="{{currentValue}}"
  59. src="https://main-bucket.bj.bcebos.com/miniprog-avres/voice/voice.aac.png"></image>
  60. <!-- <wave-form style="width: {{50 * imgFrame.length}}rpx" long="{{50 * imgFrame.length}}" wx:if="{{music.length}}"></wave-form> -->
  61. <!-- <wave-form style="width: {{50 * imgFrame.length}}rpx" long="{{50 * imgFrame.length}}" color="{{'#df8e2e'}}" wx:if="{{currentValue}}"></wave-form> -->
  62. </view>
  63. </view>
  64. </scroll-view>
  65. <view class="cursorProgress"></view>
  66. </view>
  67. <view class="selectBtn">
  68. <view class="weui-flex__item" style="text-align: center">
  69. <view class="weui-flex">
  70. <view class="weui-flex__item">
  71. <view class="item-button" bindtap="showMusic">
  72. <mp-icon icon="music" color="#fff" size="{{25}}"></mp-icon>
  73. </view>
  74. </view>
  75. <view class="weui-flex__item">
  76. <view class="item-button">
  77. <mp-icon bindtap="share" icon="share" color="#fff" size="{{25}}"></mp-icon>
  78. </view>
  79. </view>
  80. <view class="weui-flex__item">
  81. <view class="item-button" bindtap="showText">
  82. <mp-icon icon="text" color="#fff" size="{{25}}"></mp-icon>
  83. </view>
  84. </view>
  85. </view>
  86. </view>
  87. </view>
  88. </view>
  89. </view>
  90. <text-input show="{{active === 'text'}}" stepIndex="{{stepIndex}}" currentValue="{{currentValue}}" bindadd="handleText">
  91. </text-input>
  92. <music-list music="{{music}}" show="{{active === 'music'}}" bindchange="handleMusicChange"
  93. bindremove="handleMusicRemove"></music-list>
  94. <!-- 遮罩 -->
  95. <view wx:if="{{showBg}}" class="bag" bindtap="showBag"></view>