vue-video-player
Advanced tools
Comparing version 3.1.4 to 4.0.0-rc1
@@ -9,5 +9,3 @@ /** | ||
window.videojs = require('video.js') | ||
require('video.js/dist/video-js.css') | ||
var playerComponent = require('./player.vue') | ||
var playerComponent = require('./src/player.vue') | ||
playerComponent = playerComponent.default || playerComponent | ||
@@ -14,0 +12,0 @@ |
{ | ||
"name": "vue-video-player", | ||
"version": "3.1.4", | ||
"description": "Video Player component for Vue2", | ||
"version": "4.0.0-rc1", | ||
"description": "Video Player component for Vue", | ||
"main": "index.js", | ||
@@ -15,6 +15,6 @@ "scripts": { | ||
"vue-video-player", | ||
"vue.js video player", | ||
"vue.js video", | ||
"vue video player", | ||
"vue video", | ||
"vue videojs", | ||
"vue.js player" | ||
"vue player" | ||
], | ||
@@ -26,3 +26,3 @@ "author": { | ||
}, | ||
"license": "GPL", | ||
"license": "MIT OR GPL-3.0", | ||
"bugs": { | ||
@@ -33,4 +33,4 @@ "url": "https://github.com/surmon-china/vue-video-player/issues" | ||
"dependencies": { | ||
"video.js": "^5.11.7" | ||
"video.js": "^6.2.4" | ||
} | ||
} |
@@ -11,8 +11,10 @@ [![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) | ||
# Vue-Video-Player | ||
[Video.js](https://github.com/videojs/video.js) player component for Vue2. | ||
[Video.js](https://github.com/videojs/video.js) player component for Vue. | ||
# Update | ||
The latest version of the update, I hope the component itself is a simple and lightweight player, in addition to the videojs core library itself, no other packages; if you need other videojs extensions, you need to import the corresponding scriptjs plugin in the entry script file or component script Resource package. | ||
Updated to video.js 6+. | ||
todo: example page && ssr && cdn script. | ||
# Example | ||
@@ -33,2 +35,7 @@ [Demo Page](https://surmon-china.github.io/vue-video-player) | ||
``` javascript | ||
// require videojs style [and custom videojs theme] | ||
require('video.js/dist/video-js.css') | ||
require('vue-video-player/src/custom-theme.css') | ||
// import | ||
@@ -49,3 +56,3 @@ import Vue from 'vue' | ||
// If used in Nuxt.js/SSR, you should keep it only in browser build environment | ||
if (process.BROWSER_BUILD) { | ||
if (process.browser) { | ||
const VueVideoPlayer = require('vue-video-player/ssr') | ||
@@ -56,4 +63,7 @@ Vue.use(VueVideoPlayer) | ||
// If you need to use more videojs extensions, you can introduce the corresponding videojs plug-in package before the vue program is instantiated, such as: | ||
require('some-videojs-plugin') | ||
// require more plugin resource... | ||
const { videojs } = VueVideoPlayer | ||
videojs.plugin('myPlugin', myPluginFunction) | ||
videojs.addLanguage('ml', myLanguageObject) | ||
videojs.registerPlugin('examplePlugin', examplePlugin) | ||
// videojs.[methods]... | ||
@@ -108,4 +118,8 @@ // mount with component(can't work in Nuxt.js/SSR) | ||
<template> | ||
<video-player ref="videoPlayer" | ||
<video-player class="video-player-box" | ||
ref="videoPlayer" | ||
:options="playerOptions" | ||
:start="0" | ||
:playsinline="true" | ||
customEventName="customstateevent" | ||
@@ -138,7 +152,2 @@ title="you can listen some event if you need" | ||
playerOptions: { | ||
// component options | ||
start: 0, | ||
playsinline: false, | ||
// videojs options | ||
@@ -202,8 +211,5 @@ muted: true, | ||
* [video.js api](http://docs.videojs.com/docs/api/player.html#Methodsmuted) | ||
* [video.js docs](http://docs.videojs.com/#) | ||
# Videojs Issues | ||
- [videojs-contrib-hls](https://github.com/videojs/videojs-contrib-hls/issues/600) | ||
# Credits | ||
@@ -220,6 +226,16 @@ - [video.js](https://github.com/videojs/video.js) | ||
- [videojs-hotkeys](https://github.com/ctd1500/videojs-hotkeys) | ||
- [videojs-flash](https://github.com/videojs/videojs-flash) | ||
- [videojs-contrib-ads](https://github.com/videojs/videojs-contrib-ads) | ||
- [more plugins...](https://github.com/search?o=desc&q=videojs+plugin&s=stars&type=Repositories&utf8=%E2%9C%93) | ||
# License | ||
Licensed under either of | ||
* MIT license ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT) | ||
* GNU General Public License, version 3 ([LICENSE-GPL](LICENSE-GPL) or https://opensource.org/licenses/GPL-3.0) | ||
at your option. | ||
# Author Blog | ||
[Surmon](https://surmon.me) |
@@ -10,3 +10,3 @@ | ||
var video = document.createElement('video') | ||
video.className = 'video-js vjs-custom-skin' | ||
video.className = 'video-js' | ||
el.appendChild(video) | ||
@@ -146,3 +146,3 @@ } | ||
var video = document.createElement('video') | ||
video.className = 'video-js vjs-custom-skin' | ||
video.className = 'video-js' | ||
el.appendChild(video) | ||
@@ -149,0 +149,0 @@ } |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Mixed license
License(Experimental) Package contains multiple licenses.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Misc. License Issues
License(Experimental) A package's licensing information has fine-grained problems.
Found 1 instance in 1 package
116551
43
0
234
3
1279
2
+ Addedglobal@4.3.2(transitive)
+ Addedvideo.js@6.13.0(transitive)
+ Addedvideojs-font@2.1.0(transitive)
+ Addedxhr@2.4.0(transitive)
- Removedglobal@4.3.04.4.0(transitive)
- Removedprocess@0.11.10(transitive)
- Removedvideo.js@5.20.5(transitive)
- Removedvideojs-font@2.0.0(transitive)
- Removedvideojs-swf@5.4.1(transitive)
- Removedxhr@2.2.2(transitive)
Updatedvideo.js@^6.2.4