Skip to content
This repository has been archived by the owner on Nov 15, 2018. It is now read-only.

Commit

Permalink
fix: 修复视频加载两次的BUG
Browse files Browse the repository at this point in the history
  • Loading branch information
jsonleex committed May 2, 2018
1 parent b9547cc commit 51ad9a3
Showing 1 changed file with 13 additions and 8 deletions.
21 changes: 13 additions & 8 deletions src/components/FeedCard/FeedVideo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,16 @@
>
<video
controls
:poster="cover_file"
x-webkit-airplay="true"
webkit-playsinline="true"
playsinline="true"
preload="none"
v-if="videoFile"
:poster="coverFile"
:ref="`video_${id}`"
>
<source
:src="video_file"
:src="videoFile"
type="video/mp4"
>
Your browser does not support the video tag.
Expand Down Expand Up @@ -40,13 +45,13 @@ export default {
return this.video.width < this.video.height
? 5.18
: parseInt(this.video.height * this.ratio) / 100;
},
video_file() {
return `/api/v2/files/${this.video.video_id}`;
},
cover_file() {
return `/api/v2/files/${this.video.cover_id}`;
}
// video_file() {
// return `/api/v2/files/${this.video.video_id}`;
// },
// cover_file() {
// return `/api/v2/files/${this.video.cover_id}`;
// }
},
methods: {
getVideoUrl() {
Expand Down

0 comments on commit 51ad9a3

Please sign in to comment.