videoDetail.vue 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. <template>
  2. <view>
  3. <!-- <view class="timeBox flex justify-between align-center padding-lr-sm">
  4. <view class="time"></view>
  5. </view> -->
  6. <!-- 处理状态start -->
  7. <view class="processStatus">
  8. <view class="info-tit margin-left-xs">
  9. <text class="cuIcon-titles margin-right-xs"></text>
  10. 设备编号:{{deviceCode}}
  11. </view>
  12. <view class="padding-lr padding-bottom-lg ">
  13. <video id="myVideo" :src="videoUrl" style="width:100%" loop="loop" autoplay="autoplay"></video>
  14. <!-- <view class="video-js" ref="video" style="text-align:center;width:100%;height:400rpx">
  15. </view> -->
  16. </view>
  17. </view>
  18. <!-- 处理状态end -->
  19. </view>
  20. </template>
  21. <script>
  22. export default {
  23. data() {
  24. return {
  25. videoDetail: '',
  26. videoUrl:"",
  27. deviceCode:''
  28. }
  29. },
  30. onReady() {
  31. },
  32. onLoad: function(option) {
  33. this.companyCode = option.companyCode
  34. this.deviceType = option.deviceType
  35. this.deviceCode=option.deviceCode
  36. this.videoUrl = 'http://47.103.74.123/hls/'+option.deviceCode+'.m3u8';
  37. // this.videoUrl='http://devimages.apple.com/iphone/samples/bipbop/bipbopall.m3u8'
  38. alert(this.videoUrl)
  39. },
  40. methods: {
  41. // async getDeviceDetail(ming = {}) {
  42. // const res = await this.$myRequest({
  43. // url: 'OperationMonitoring/getMonitoringScreen',
  44. // data: ming
  45. // })
  46. // console.log(res.data.data[0])
  47. // this.videoDetail = res.data.data[0]
  48. // },
  49. }
  50. }
  51. </script>
  52. <style lang="scss">
  53. </style>