Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@videojs/http-streaming

Package Overview
Dependencies
Maintainers
14
Versions
157
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@videojs/http-streaming - npm Package Compare versions

Comparing version 0.7.1 to 0.7.2

16

es5/dash-playlist-loader.js

@@ -12,6 +12,6 @@ 'use strict';

var _video2 = _interopRequireDefault(_video);
var _mpdParser = require('mpd-parser');
var _mpdParser2 = _interopRequireDefault(_mpdParser);
var _playlistLoader = require('./playlist-loader');

@@ -35,2 +35,5 @@

var EventTarget = _video2.default.EventTarget,
mergeOptions = _video2.default.mergeOptions;
/**

@@ -48,4 +51,5 @@ * Returns a new master manifest that is the result of merging an updated master manifest

*/
var updateMaster = exports.updateMaster = function updateMaster(oldMaster, newMaster) {
var update = (0, _video.mergeOptions)(oldMaster, {
var update = mergeOptions(oldMaster, {
// These are top level properties that can be updated

@@ -226,3 +230,3 @@ duration: newMaster.duration,

value: function parseMasterXml() {
var master = _mpdParser2.default.parse(this.masterXml_, {
var master = (0, _mpdParser.parse)(this.masterXml_, {
manifestUri: this.srcUrl,

@@ -321,3 +325,3 @@ clientOffset: this.clientOffset_

var utcTiming = _mpdParser2.default.parseUTCTiming(this.masterXml_);
var utcTiming = (0, _mpdParser.parseUTCTiming)(this.masterXml_);

@@ -507,4 +511,4 @@ // No UTCTiming element found in the mpd. Use Date header from mpd request as the

return DashPlaylistLoader;
}(_video.EventTarget);
}(EventTarget);
exports.default = DashPlaylistLoader;

@@ -16,6 +16,6 @@ 'use strict';

var _video2 = _interopRequireDefault(_video);
var _m3u8Parser = require('m3u8-parser');
var _m3u8Parser2 = _interopRequireDefault(_m3u8Parser);
var _window = require('global/window');

@@ -40,2 +40,6 @@

var mergeOptions = _video2.default.mergeOptions,
EventTarget = _video2.default.EventTarget,
log = _video2.default.log;
/**

@@ -50,2 +54,3 @@ * Loops through all supported media groups in master and calls the provided

*/
var forEachMediaGroup = exports.forEachMediaGroup = function forEachMediaGroup(master, callback) {

@@ -85,3 +90,3 @@ ['AUDIO', 'SUBTITLES'].forEach(function (mediaType) {

for (var i = offset; i < length; i++) {
result[i - offset] = (0, _video.mergeOptions)(original[i], result[i - offset]);
result[i - offset] = mergeOptions(original[i], result[i - offset]);
}

@@ -116,3 +121,3 @@ return result;

var updateMaster = exports.updateMaster = function updateMaster(master, media) {
var result = (0, _video.mergeOptions)(master, {});
var result = mergeOptions(master, {});
var playlist = result.playlists[media.uri];

@@ -130,3 +135,3 @@

var mergedPlaylist = (0, _video.mergeOptions)(playlist, media);
var mergedPlaylist = mergeOptions(playlist, media);

@@ -175,3 +180,3 @@ // if the update could overlap existing segment information, merge the two segment lists

_video.log.warn('Invalid playlist STREAM-INF detected. Missing BANDWIDTH attribute.');
log.warn('Invalid playlist STREAM-INF detected. Missing BANDWIDTH attribute.');
}

@@ -303,3 +308,3 @@ }

var parser = new _m3u8Parser2.default.Parser();
var parser = new _m3u8Parser.Parser();

@@ -567,3 +572,3 @@ parser.push(xhr.responseText);

var parser = new _m3u8Parser2.default.Parser();
var parser = new _m3u8Parser.Parser();

@@ -620,4 +625,4 @@ parser.push(req.responseText);

return PlaylistLoader;
}(_video.EventTarget);
}(EventTarget);
exports.default = PlaylistLoader;

@@ -10,2 +10,4 @@ 'use strict';

var _video2 = _interopRequireDefault(_video);
var _window = require('global/window');

@@ -18,2 +20,9 @@

/**
* @file playlist.js
*
* Playlist related utilities.
*/
var createTimeRange = _video2.default.createTimeRange;
/**
* walk backward until we find a duration we can use

@@ -26,7 +35,2 @@ * or return a failure

/**
* @file playlist.js
*
* Playlist related utilities.
*/
var backwardDuration = function backwardDuration(playlist, endSequence) {

@@ -311,5 +315,5 @@ var result = 0;

if (seekableEnd === null) {
return (0, _video.createTimeRange)();
return createTimeRange();
}
return (0, _video.createTimeRange)(seekableStart, seekableEnd);
return createTimeRange(seekableStart, seekableEnd);
};

@@ -316,0 +320,0 @@

@@ -6,3 +6,3 @@ 'use strict';

});
exports.simpleTypeFromSourceType = undefined;
exports.simpleTypeFromSourceType = exports.emeOptions = exports.HlsSourceHandler = exports.HlsHandler = exports.Hls = undefined;

@@ -39,6 +39,2 @@ var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

var _m3u8Parser = require('m3u8-parser');
var _m3u8Parser2 = _interopRequireDefault(_m3u8Parser);
var _video = require('video.js');

@@ -121,3 +117,3 @@

var simpleTypeFromSourceType = exports.simpleTypeFromSourceType = function simpleTypeFromSourceType(type) {
var simpleTypeFromSourceType = function simpleTypeFromSourceType(type) {
var mpegurlRE = /^(audio|video|application)\/(x-|vnd\.apple\.)?mpegurl/i;

@@ -802,3 +798,2 @@

}
_video2.default.m3u8 = _m3u8Parser2.default;
_video2.default.options.hls = _video2.default.options.hls || {};

@@ -812,8 +807,6 @@

module.exports = {
Hls: Hls,
HlsHandler: HlsHandler,
HlsSourceHandler: HlsSourceHandler,
emeOptions: emeOptions,
simpleTypeFromSourceType: simpleTypeFromSourceType
};
exports.Hls = Hls;
exports.HlsHandler = HlsHandler;
exports.HlsSourceHandler = HlsSourceHandler;
exports.emeOptions = emeOptions;
exports.simpleTypeFromSourceType = simpleTypeFromSourceType;

@@ -13,6 +13,19 @@ 'use strict';

var videojsXHR = _video2.default.xhr,
mergeOptions = _video2.default.mergeOptions; /**
* @file xhr.js
*/
/**
* A wrapper for videojs.xhr that tracks bandwidth.
*
* @param {Object} options options for the XHR
* @param {Function} callback the callback to call when done
* @return {Request} the xhr request that is going to be made
*/
var xhrFactory = function xhrFactory() {
var xhr = function XhrFunction(options, callback) {
// Add a default timeout for all hls requests
options = (0, _video.mergeOptions)({
options = mergeOptions({
timeout: 45e3

@@ -33,3 +46,3 @@ }, options);

var request = (0, _video.xhr)(options, function (error, response) {
var request = videojsXHR(options, function (error, response) {
var reqResponse = request.response;

@@ -78,13 +91,4 @@

return xhr;
}; /**
* @file xhr.js
*/
};
/**
* A wrapper for videojs.xhr that tracks bandwidth.
*
* @param {Object} options options for the XHR
* @param {Function} callback the callback to call when done
* @return {Request} the xhr request that is going to be made
*/
exports.default = xhrFactory;
{
"name": "@videojs/http-streaming",
"version": "0.7.1",
"version": "0.7.2",
"description": "Play back HLS with video.js, even where it's not natively supported",

@@ -5,0 +5,0 @@ "main": "es5/videojs-http-streaming.js",

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc