all
heyujie
2021-09-14 509171ab4b3b4f2115512bdfb09a583024fb5c53
src/components/player/index.vue
@@ -45,17 +45,22 @@
    showArea: {
      type: Boolean,
      default: false
    },
    hasPoster:{
      type: Boolean,
      default: true
    }
  },
  computed: {
    poster() {
      return "/images/player/player_poster.gif?t=" + Math.random()
    }
    // poster() {
    //   return "/images/player/player_poster.gif?t=" + Math.random()
    // }
  },
  data() {
    return {
      wfs: {},
      poster: "/images/player/player_poster.gif?t=" + Math.random(),
      wfsId: 0,
      Camera: new VideoRuleData(),
      showCanvas: true,
@@ -80,7 +85,7 @@
  },
  watch: {
    rtspUrl: function (newVal, oldVal) {
      console.log("new rstp:::", newVal);
      console.log("new rstp: ", newVal);
      if (newVal !== oldVal) {
        if (this.wfs.config) {
          this.wfs.destroy();
@@ -88,6 +93,7 @@
        }
        this.$nextTick(() => {
          this.clickStart();
          this.poster = "/images/player/player_poster.gif?t=" + Math.random()
        });
      }
    }