Skip to content

Commit 18db307

Browse files
committed
Update README.md
1 parent 05bb581 commit 18db307

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

README.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
11
[![GitHub issues](https://img.shields.io/github/issues/surmon-china/vue-video-player.svg?style=flat-square)](https://github.com/surmon-china/vue-video-player/issues)
22
[![GitHub forks](https://img.shields.io/github/forks/surmon-china/vue-video-player.svg?style=flat-square)](https://github.com/surmon-china/vue-video-player/network)
33
[![GitHub stars](https://img.shields.io/github/stars/surmon-china/vue-video-player.svg?style=flat-square)](https://github.com/surmon-china/vue-video-player/stargazers)
4-
[![Twitter](https://img.shields.io/twitter/url/https/github.com/surmon-china/vue-video-player.svg?style=flat-square)](https://twitter.com/intent/tweet?text=Wow:&url=%5Bobject%20Object%5D)
4+
[![Twitter](https://img.shields.io/twitter/url/https/github.com/surmon-china/vue-video-player.svg?style=flat-square)](https://twitter.com/intent/tweet?url=https://github.com/surmon-china/vue-video-player)
55

66
[![NPM](https://nodei.co/npm/vue-video-player.png?downloads=true&downloadRank=true&stars=true)](https://nodei.co/npm/vue-video-player/)
77

88

99
# Vue-Video-Player
10-
Video.js player component for Vue2.
11-
12-
Build by [video.js](https://github.com/videojs/video.js).
10+
[Video.js](https://github.com/videojs/video.js) player component for Vue2.
1311

1412

1513
# Example
@@ -37,15 +35,17 @@ var Vue = require('vue')
3735
var VueVideoPlayer = require('vue-video-player')
3836

3937

40-
// or import 'vue-quill-editor/ssr' to used in Nuxt.js/ssr
41-
var VueVideoPlayer = require('vue-video-player/ssr')
42-
43-
44-
// mount with global (If used in nuxt.js / SSR, you should keep it only in a browser-built environment)
38+
// mount with global
4539
Vue.use(VueVideoPlayer)
4640

4741

48-
// mount with component(can't work in ssr)
42+
// If used in Nuxt.js/SSR, you should keep it only in browser build environment
43+
if (process.BROWSER_BUILD) {
44+
const VueVideoPlayer = require('vue-video-player/ssr')
45+
Vue.use(VueVideoPlayer)
46+
}
47+
48+
// mount with component(can't work in Nuxt.js/SSR)
4949
import { videoPlayer } from 'vue-video-player'
5050

5151
export default {
@@ -59,8 +59,8 @@ export default {
5959
### Use the difference(使用方法的区别)
6060

6161
*SSR and the only difference in the use of the SPA:*
62-
- SPA uses the `component`, find quill instance by `ref attribute`.
63-
- SSR use `directive`, find quill instance by `directive arg`.
62+
- SPA uses the `component`, find videojs instance by `ref attribute`.
63+
- SSR use `directive`, find videojs instance by `directive arg`.
6464
- Other configurations, events are the same.
6565

6666
### Use in SSR

0 commit comments

Comments
 (0)