Skip to content

Commit

Permalink
webpack, remove deps, umd, styling
Browse files Browse the repository at this point in the history
  • Loading branch information
mrbar42 committed Apr 26, 2017
1 parent a26a627 commit 850ead1
Show file tree
Hide file tree
Showing 12 changed files with 213 additions and 190 deletions.
16 changes: 16 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# http://editorconfig.org

root = true

[*]
charset = utf-8
indent_style = space
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true

[*.{js,json}]
indent_size = 2

[*.html]
indent_size = 4
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
.idea
.node_modules
node_modules
dist
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# HLS plugin for video.js using hls.js
Plays HLS with [video.js](https://github.com/videojs/video.js) on any platform, even where it's not natively supported, using [Dailymotion's hls.js](https://github.com/dailymotion/hls.js) tech.
Plays HLS with [video.js](https://github.com/videojs/video.js) on any platform, even where it's not natively supported, using [Dailymotion's hls.js](https://github.com/dailymotion/hls.js) tech.

This bundled plugin is an **alternative** to the original [videojs-contrib-hls](https://github.com/videojs/videojs-contrib-hls) and runs directly on top of [video.js 5.0+](https://github.com/videojs/video.js).

Like the original implemenation, this plugin implements a source handler for m3u8 files.
Like the original implementation, this plugin implements a source handler for m3u8 files.

## Installation
### NPM
Expand All @@ -14,7 +14,7 @@ npm install --save videojs-contrib-hls.js
```

### CDN
Get the latest stable version from the [CDN](https://npmcdn.com/videojs-contrib-hls.js)
Get the latest stable version from the [CDN](https://unpkg.com/videojs-contrib-hls.js)

### Releases
Download a release of [videojs-contrib-hls](https://github.com/peer5/videojs-contrib-hls.js/releases)
Expand All @@ -27,7 +27,7 @@ Get a copy of [videojs-contrib-hls](#installation) and include it in your page a
<source src="https://example.com/index.m3u8" type="application/x-mpegURL">
</video>
<script src="video.js"></script>
<script src="videojs-contrib-hlsjs.js"></script>
<script src="videojs-contrib-hlsjs.min.js"></script>
<script>
var player = videojs('#player');
</script>
Expand All @@ -41,7 +41,7 @@ hls.js is [very configurable](https://github.com/dailymotion/hls.js/blob/master/
<source src="https://example.com/index.m3u8" type="application/x-mpegURL">
</video>
<script src="video.js"></script>
<script src="videojs-contrib-hlsjs.js"></script>
<script src="videojs-contrib-hlsjs.min.js"></script>
<script>
var player = videojs('video', {
autoplay: true,
Expand Down
2 changes: 2 additions & 0 deletions dist/videojs-contrib-hlsjs.min.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions dist/videojs-contrib-hlsjs.min.js.map

Large diffs are not rendered by default.

10 changes: 10 additions & 0 deletions examples/commonjs-app.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
'use strict';

var videojs = require('video.js');
require('videojs-contrib-media-sources'); // increase browser support with MSE polyfill
require('videojs-contrib-hlsjs'); // auto attaches hlsjs handler


window.onload = function() {
var player = videojs('#player');
};
8 changes: 6 additions & 2 deletions examples/bundled.html → examples/example.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,12 @@
<head>
<meta charset="UTF-8">
<title>Videojs-contrib-hls.js</title>
<link rel="stylesheet" href="../node_modules/video.js/dist/video-js.min.css">
<script src="../node_modules/video.js/dist/video.min.js"></script>
<link href="http://vjs.zencdn.net/5.19.2/video-js.css" rel="stylesheet">
<script src="http://vjs.zencdn.net/5.19.2/video.js"></script>

<!-- increase browser support with MSE polyfill -->
<script src="http://unpkg.com/videojs-contrib-media-sources@4.4.4/dist/videojs-contrib-media-sources.min.js"></script>

<script src="../dist/videojs-contrib-hlsjs.js"></script>
</head>
<body>
Expand Down
22 changes: 0 additions & 22 deletions examples/seperated.html

This file was deleted.

15 changes: 0 additions & 15 deletions gulpfile.js

This file was deleted.

19 changes: 10 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,23 +1,24 @@
{
"name": "videojs-contrib-hls.js",
"version": "2.0.1",
"version": "3.0.0",
"description": "hls.js plugin for videojs",
"main": "/dist/videojs-contrib-hlsjs.js",
"main": "dist/videojs-contrib-hlsjs.min.js",
"directories": {
"example": "examples"
},
"dependencies": {
"hls.js": "^0.6.7",
"video.js": "^5.11.9",
"videojs-contrib-hls": "^3.6.6",
"videojs-contrib-media-sources": "^4.0.4"
"hls.js": "^0.7.6"
},
"devDependencies": {
"gulp": "^3.9.1",
"gulp-concat": "^2.6.0"
"webpack": "2.4.1"
},
"peerDependencies": {
"video.js": "*"
},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
"build": "webpack --bail -p",
"clean": "rm -fr dist",
"prepublish": "npm run clean && npm run build"
},
"repository": {
"type": "git",
Expand Down
Loading

0 comments on commit 850ead1

Please sign in to comment.