视频添加poster
This commit is contained in:
parent
1fdb683fc7
commit
8c2bb79da2
BIN
public/images/a1.jpg
Normal file
BIN
public/images/a1.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 76 KiB |
BIN
public/images/a2.jpg
Normal file
BIN
public/images/a2.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 83 KiB |
BIN
public/images/a3.jpg
Normal file
BIN
public/images/a3.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 23 KiB |
BIN
public/images/a4.jpg
Normal file
BIN
public/images/a4.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 12 KiB |
BIN
public/images/a5.jpg
Normal file
BIN
public/images/a5.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 33 KiB |
@ -58,6 +58,7 @@
|
||||
"width": 720,
|
||||
"height": 720
|
||||
},
|
||||
"poster":"a1.jpg",
|
||||
"height": 3840,
|
||||
"width": 2160,
|
||||
"ratio": "1080p",
|
||||
@ -342,6 +343,7 @@
|
||||
"width": 720,
|
||||
"height": 720
|
||||
},
|
||||
"poster":"a2.jpg",
|
||||
"height": 1920,
|
||||
"width": 1080,
|
||||
"ratio": "1080p",
|
||||
@ -914,6 +916,7 @@
|
||||
"width": 720,
|
||||
"height": 720
|
||||
},
|
||||
"poster":"a3.jpg",
|
||||
"height": 1920,
|
||||
"width": 1080,
|
||||
"ratio": "720p",
|
||||
@ -1163,6 +1166,7 @@
|
||||
"width": 720,
|
||||
"height": 720
|
||||
},
|
||||
"poster":"a4.jpg",
|
||||
"height": 1080,
|
||||
"width": 1920,
|
||||
"ratio": "1080p",
|
||||
@ -1424,6 +1428,7 @@
|
||||
"width": 720,
|
||||
"height": 720
|
||||
},
|
||||
"poster":"a5.jpg",
|
||||
"height": 1920,
|
||||
"width": 1080,
|
||||
"ratio": "1080p",
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
<!-- <video :src="item.video + '?v=123'"-->
|
||||
<video
|
||||
:src="item.video.play_addr.url_list[0]"
|
||||
:poster="_checkImgUrl(item.video.cover.url_list[0])"
|
||||
:poster="poster"
|
||||
ref="video"
|
||||
muted
|
||||
preload
|
||||
@ -82,7 +82,7 @@ import Loading from '../Loading'
|
||||
import ItemToolbar from './ItemToolbar'
|
||||
import ItemDesc from './ItemDesc'
|
||||
import bus, { EVENT_KEY } from '../../utils/bus'
|
||||
import { SlideItemPlayStatus } from '../../utils/const_var'
|
||||
import { SlideItemPlayStatus } from '@/utils/const_var'
|
||||
import { computed } from 'vue'
|
||||
import { Icon } from '@iconify/vue'
|
||||
|
||||
@ -134,6 +134,9 @@ export default {
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
poster() {
|
||||
return _checkImgUrl(this.item.video.poster ?? this.item.video.cover.url_list[0])
|
||||
},
|
||||
durationStyle() {
|
||||
return { width: this.playX + 'px' }
|
||||
},
|
||||
|
||||
Loading…
Reference in New Issue
Block a user