uniapp,h5

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. <template>
  2. <view class="container">
  3. <uni-section title="选择视频" type="line">
  4. <view class="example-body">
  5. <uni-file-picker limit="9" autoUpload="false" file-mediatype="video" title="最多选择9个视频"></uni-file-picker>
  6. </view>
  7. </uni-section>
  8. <!-- <button @click="uploadVideo()">立即上传</button> -->
  9. </view>
  10. </template>
  11. <script>
  12. export default {
  13. data() {
  14. return {
  15. selectedVideo: []
  16. };
  17. },
  18. methods: {
  19. handleVideoSelect(event) {
  20. this.selectedVideo = event.target.files;
  21. },
  22. uploadVideo() {
  23. console.log();
  24. // 调用上传函数,传入selectedVideo
  25. // 上传成功后,提示用户到上传管理界面查看
  26. }
  27. }
  28. };
  29. </script>
  30. <style scoped>
  31. .container {
  32. padding: 20upx;
  33. }
  34. .example-body {
  35. padding: 15px;
  36. padding-top: 0;
  37. }
  38. .custom-image-box {
  39. /* #ifndef APP-NVUE */
  40. display: flex;
  41. /* #endif */
  42. flex-direction: row;
  43. justify-content: space-between;
  44. align-items: center;
  45. }
  46. .text {
  47. font-size: 24px;
  48. color: #333;
  49. }
  50. </style>
  51. <!-- <template>
  52. <view class="video-wrap">
  53. <video :src="hlsUrl" controls autoplay></video>
  54. </view>
  55. </template>
  56. <script>
  57. export default {
  58. data() {
  59. return {
  60. hlsUrl: 'https://afanai.top:8088/video/428743782.mp4', // 这里替换为你的Flask服务器地址
  61. };
  62. },
  63. };
  64. </script>
  65. <style>
  66. .video-wrap video {
  67. width: 100%;
  68. height: auto;
  69. }
  70. </style> -->