Skip to content

Commit

Permalink
fix the bug video can not play again after pausing
Browse files Browse the repository at this point in the history
  • Loading branch information
mryanshenghong committed Jan 8, 2021
1 parent 950ece0 commit 5ff3996
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/Blog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ export default class CardView extends Vue {
if (this.currentMediaRef.type === "music" && this.currentMediaRef.ele !== this.$refs.musicPlayer) {
this.currentMediaRef.ele.pause();
}
if (this.currentMediaRef.type === "video" && this.currentMediaRef.ele !== this.$refs.videoPlayer) {
if (this.currentMediaRef.type === "video" && this.currentMediaRef.ele !== (this.$refs.videoPlayer as any).$refs.video) {
this.currentMediaRef.ele.pause();
}
}
Expand All @@ -127,7 +127,7 @@ export default class CardView extends Vue {
if (this.currentMediaRef.type === "music" && this.currentMediaRef.ele !== this.$refs.musicPlayer) {
this.currentMediaRef.ele.pause();
}
if (this.currentMediaRef.type === "video" && this.currentMediaRef.ele !== this.$refs.videoPlayer) {
if (this.currentMediaRef.type === "video" && this.currentMediaRef.ele !== (this.$refs.videoPlayer as any).$refs.video) {
this.currentMediaRef.ele.pause();
}
}
Expand Down

0 comments on commit 5ff3996

Please sign in to comment.