Skip to content

Commit

Permalink
v1.1.3
Browse files Browse the repository at this point in the history
Update dependencies;
  • Loading branch information
cycjimmy committed Mar 27, 2018
1 parent 6e9e0d7 commit 42afad4
Show file tree
Hide file tree
Showing 10 changed files with 1,382 additions and 968 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,5 @@ yarn-error.log
# project
.publish
dist
yarn.lock

11 changes: 11 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,13 @@
# IDE
.idea

# test
test
.travis.yml

# project
src
static
dist
yarn.lock

9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
[![devDependencies Status][david-dev-image]][david-dev-url]
[![node version][node-image]][node-url]
[![npm download][download-image]][download-url]
[![jsdelivr][jsdelivr-image]][jsdelivr-url]
[![npm license][license-image]][download-url]

[npm-image]: https://img.shields.io/npm/v/jsmpeg-player.svg?style=flat-square
Expand All @@ -20,6 +21,8 @@
[node-url]: http://nodejs.org/download/
[download-image]: https://img.shields.io/npm/dm/jsmpeg-player.svg?style=flat-square
[download-url]: https://npmjs.org/package/jsmpeg-player
[jsdelivr-image]: https://data.jsdelivr.com/v1/package/npm/jsmpeg-player/badge
[jsdelivr-url]: https://www.jsdelivr.com/package/npm/jsmpeg-player
[license-image]: https://img.shields.io/npm/l/jsmpeg-player.svg?style=flat-square

* JSMpeg player is based on [jsmpeg](https://github.com/phoboslab/jsmpeg).
Expand Down Expand Up @@ -75,6 +78,12 @@
</script>
```

## CDN
To use via a CDN include this in your html:
```text
<script src="https://cdn.jsdelivr.net/npm/jsmpeg-player@1.1.3/build/JSMpeg.min.js"></script>
```

## Encoding Video/Audio for [jsmpeg](https://github.com/phoboslab/jsmpeg) by [ffmpeg](https://ffmpeg.org/). E.g:
```shell
$ ffmpeg -i input.mp4 -f mpegts
Expand Down
92 changes: 60 additions & 32 deletions build/JSMpeg.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
exports["JSMpeg"] = factory();
else
root["JSMpeg"] = factory();
})(this, function() {
})(typeof self !== 'undefined' ? self : this, function() {
return /******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
Expand Down Expand Up @@ -344,7 +344,9 @@ function pug_merge(a, b) {
a[key] = (Array.isArray(valA) ? valA : [valA]).concat(b[key] || []);
} else if (key === 'style') {
var valA = pug_style(a[key]);
valA = valA && valA[valA.length - 1] !== ';' ? valA + ';' : valA;
var valB = pug_style(b[key]);
valB = valB && valB[valB.length - 1] !== ';' ? valB + ';' : valB;
a[key] = valA + valB;
} else {
a[key] = b[key];
Expand Down Expand Up @@ -423,10 +425,7 @@ function pug_style(val) {
}
return out;
} else {
val += '';
if (val[val.length - 1] !== ';')
return val + ';';
return val;
return val + '';
}
};

Expand Down Expand Up @@ -1039,38 +1038,57 @@ var addStyles = function addStyles(element, styles) {
/* 5 */
/***/ (function(module, exports, __webpack_require__) {

// style-loader: Adds some css to the DOM by adding a <style> tag

// load the styles
var content = __webpack_require__(6);

if(typeof content === 'string') content = [[module.i, content, '']];
// Prepare cssTransformation

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
// add the styles to the DOM
options.insertInto = undefined;

var update = __webpack_require__(8)(content, options);

if(content.locals) module.exports = content.locals;
// Hot Module Replacement

if(false) {
// When the styles change, update the <style> tags
if(!content.locals) {
module.hot.accept("!!../../node_modules/css-loader/index.js??ref--1-1!../../node_modules/sass-loader/lib/loader.js??ref--1-2!./style.scss", function() {
var newContent = require("!!../../node_modules/css-loader/index.js??ref--1-1!../../node_modules/sass-loader/lib/loader.js??ref--1-2!./style.scss");
if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];
update(newContent);
});
}
// When the module is disposed, remove the <style> tags
module.hot.accept("!!../../node_modules/css-loader/index.js??ref--1-1!../../node_modules/sass-loader/lib/loader.js??ref--1-2!./style.scss", function() {
var newContent = require("!!../../node_modules/css-loader/index.js??ref--1-1!../../node_modules/sass-loader/lib/loader.js??ref--1-2!./style.scss");

if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];

var locals = (function(a, b) {
var key, idx = 0;

for(key in a) {
if(!b || a[key] !== b[key]) return false;
idx++;
}

for(key in b) idx--;

return idx === 0;
}(content.locals, newContent.locals));

if(!locals) throw new Error('Aborting CSS HMR due to changed css-modules locals.');

update(newContent);
});

module.hot.dispose(function() { update(); });
}

/***/ }),
/* 6 */
/***/ (function(module, exports, __webpack_require__) {

exports = module.exports = __webpack_require__(7)(undefined);
exports = module.exports = __webpack_require__(7)(false);
// imports


Expand Down Expand Up @@ -1199,14 +1217,26 @@ var isOldIE = memoize(function () {
return window && document && document.all && !window.atob;
});

var getTarget = function (target) {
return document.querySelector(target);
};

var getElement = (function (fn) {
var memo = {};

return function(selector) {
if (typeof memo[selector] === "undefined") {
var styleTarget = fn.call(this, selector);
return function(target) {
// If passing function in options, then use it for resolve "head" element.
// Useful for Shadow Root style i.e
// {
// insertInto: function () { return document.querySelector("#foo").shadowRoot }
// }
if (typeof target === 'function') {
return target();
}
if (typeof memo[target] === "undefined") {
var styleTarget = getTarget.call(this, target);
// Special case to return head of iframe instead of iframe itself
if (styleTarget instanceof window.HTMLIFrameElement) {
if (window.HTMLIFrameElement && styleTarget instanceof window.HTMLIFrameElement) {
try {
// This will throw an exception if access to iframe is blocked
// due to cross-origin restrictions
Expand All @@ -1215,13 +1245,11 @@ var getElement = (function (fn) {
styleTarget = null;
}
}
memo[selector] = styleTarget;
memo[target] = styleTarget;
}
return memo[selector]
return memo[target]
};
})(function (target) {
return document.querySelector(target)
});
})();

var singleton = null;
var singletonCounter = 0;
Expand All @@ -1240,10 +1268,10 @@ module.exports = function(list, options) {

// Force single-tag solution on IE6-9, which has a hard limit on the # of <style>
// tags it will allow on a page
if (!options.singleton) options.singleton = isOldIE();
if (!options.singleton && typeof options.singleton !== "boolean") options.singleton = isOldIE();

// By default, add <style> tags to the <head> element
if (!options.insertInto) options.insertInto = "head";
if (!options.insertInto) options.insertInto = "head";

// By default, add <style> tags to the bottom of the target
if (!options.insertAt) options.insertAt = "bottom";
Expand Down Expand Up @@ -1610,7 +1638,7 @@ module.exports = function (css) {
.replace(/^'(.*)'$/, function(o, $1){ return $1; });

// already a full url? no change
if (/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/)/i.test(unquotedOrigUrl)) {
if (/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(unquotedOrigUrl)) {
return fullMatch;
}

Expand Down
2 changes: 1 addition & 1 deletion build/JSMpeg.min.js

Large diffs are not rendered by default.

92 changes: 60 additions & 32 deletions dist/JSMpeg.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/JSMpeg.js.map

Large diffs are not rendered by default.

Loading

0 comments on commit 42afad4

Please sign in to comment.