File tree Expand file tree Collapse file tree 4 files changed +16
-2
lines changed Expand file tree Collapse file tree 4 files changed +16
-2
lines changed Original file line number Diff line number Diff line change 2
2
<md-card >
3
3
<md-card-actions v-md-ink-ripple >
4
4
<div class =" md-subhead" >
5
- <span >Only Flash & custom event name / 仅使用Flash模式播放 & 自定义事件名称</span >
5
+ <span >Only Flash & custom event name & hotkeys plugin / 仅使用Flash模式播放 & 自定义事件名称 & 热键插件 </span >
6
6
</div >
7
7
<md-button class =" md-icon-button"
8
8
target =" _blank"
14
14
<div class =" item" >
15
15
<div class =" player" >
16
16
<video-player :options =" playerOptions"
17
+ @ready =" playerIsReady"
17
18
@changed =" playerStateChanged($event)"
18
19
ref =" videoPlayer" >
19
20
</video-player >
24
25
</template >
25
26
26
27
<script >
28
+ // hotkeys plugin
29
+ require (' videojs-hotkeys' )
27
30
export default {
28
31
data () {
29
32
return {
39
42
}],
40
43
language: ' zh-CN' ,
41
44
techOrder: [' flash' ],
42
- poster: " /static/images/author-2.jpg"
45
+ poster: " /vue-video-player/ static/images/author-2.jpg"
43
46
}
44
47
}
45
48
},
51
54
methods: {
52
55
playerStateChanged (playerCurrentState ) {
53
56
// console.log('example 2: state changed', playerCurrentState)
57
+ },
58
+ playerIsReady (player ) {
59
+ console .log (' example 2 ready!' , player)
60
+ player .hotkeys ({
61
+ volumeStep: 0.1 ,
62
+ seekStep: 5 ,
63
+ enableModifiersForNumbers: false
64
+ })
54
65
}
55
66
}
56
67
}
Original file line number Diff line number Diff line change 23
23
</template >
24
24
25
25
<script >
26
+ // resolution-switcher plugin
26
27
require (' videojs-resolution-switcher' )
27
28
require (' videojs-resolution-switcher/lib/videojs-resolution-switcher.css' )
28
29
export default {
Original file line number Diff line number Diff line change 23
23
</template >
24
24
25
25
<script >
26
+ // hls plugin
26
27
require (' videojs-contrib-hls/dist/videojs-contrib-hls' )
27
28
export default {
28
29
data () {
Original file line number Diff line number Diff line change 21
21
</template >
22
22
23
23
<script >
24
+ // youtube plugin
24
25
require (' videojs-youtube' )
25
26
require (' videojs-contrib-hls/dist/videojs-contrib-hls' )
26
27
export default {
You can’t perform that action at this time.
0 commit comments