Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
hexray-newbee committed Dec 14, 2017
1 parent 3bf1d97 commit 2a08322
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"version": "0.1.2",
"description": "Video.js tech for FLV playback in MSE with flv.js",
"main": "es5/plugin.js",
"module": "dist/video-flvjs.js",
"generator-videojs-plugin": {
"version": "2.2.0"
},
Expand Down Expand Up @@ -82,6 +83,7 @@
],
"dependencies": {
"browserify-versionify": "^1.0.6",
"flv.js": "^1.3.3",
"video.js": "^5.10.1"
},
"devDependencies": {
Expand All @@ -96,7 +98,6 @@
"budo": "^8.0.4",
"bundle-collapser": "^1.2.1",
"chg": "^0.3.2",
"flv.js": "^1.1.0",
"glob": "^6.0.3",
"global": "^4.3.0",
"husky": "^0.14.3",
Expand Down
5 changes: 3 additions & 2 deletions src/plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
*/

import videojs from 'video.js';
import flvjs from 'flv.js';

const Html5 = videojs.getTech('Html5');

Expand Down Expand Up @@ -30,7 +31,7 @@ class Flvjs extends Html5 {

mediaDataSource.type = mediaDataSource.type === undefined ? 'flv' : mediaDataSource.type;
mediaDataSource.url = src;
this.flvPlayer = window.flvjs.createPlayer(mediaDataSource, config);
this.flvPlayer = flvjs.createPlayer(mediaDataSource, config);
this.flvPlayer.attachMediaElement(this.el_);
this.flvPlayer.load();
}
Expand All @@ -55,7 +56,7 @@ class Flvjs extends Html5 {
*/
Flvjs.isSupported = function() {

return window.flvjs && window.flvjs.isSupported();
return flvjs && flvjs.isSupported();
};

/**
Expand Down

0 comments on commit 2a08322

Please sign in to comment.