polyvPlayer.vue 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. <template>
  2. <view>
  3. <view class="video_box" style="width: 100%; height: 421rpx">
  4. <!-- #ifdef MP-WEIXIN -->
  5. <polyv-player
  6. id="playerVideo"
  7. playerId="playerVideo"
  8. height="421rpx"
  9. :vid="vid"
  10. :showSettingBtn="true"
  11. :enablePlayGesture="true"
  12. :custom-cache="false"
  13. :object-fit="'contain'"
  14. @statechange="onStateChange"
  15. @fullscreenchange="fullscreenchange"
  16. @error="playError"
  17. :autoplay="autoplay"
  18. :page-gesture="true"
  19. :vslide-gesture="true"
  20. :vslide-gesture-in-fullscreen="true"
  21. :isAllowSeek="isAllowSeek"
  22. :playbackRate="playbackRate"
  23. :enableAutoRotation="enableAutoRotation"
  24. @loadedmetadata="loadedmetadata"
  25. ></polyv-player>
  26. <!-- #endif -->
  27. <!-- #ifdef H5 -->
  28. <view v-show="vid" id="player"></view>
  29. <!-- #endif -->
  30. </view>
  31. </view>
  32. </template>
  33. <script>
  34. export default {
  35. name: "SaasMiniprogramPolyvPlayer",
  36. prop: {
  37. vid: {
  38. type: String,
  39. defaule: "",
  40. },
  41. },
  42. data() {
  43. return {};
  44. },
  45. mounted() {},
  46. methods: {},
  47. watch: {
  48. vid: {
  49. hander
  50. },
  51. },
  52. };
  53. </script>
  54. <style lang="scss" scoped></style>