This commit is contained in:
Sam Potts 2018-03-27 23:47:58 +11:00
parent 7b1e4abda7
commit 0976afe282
14 changed files with 1063 additions and 1864 deletions

226
demo/dist/demo.js vendored
View File

@ -88,17 +88,6 @@ function serializer(replacer, cycleReplacer) {
} }
}); });
var stringify_2 = stringify_1.getSerialize;
var stringify = Object.freeze({
default: stringify_1,
__moduleExports: stringify_1,
getSerialize: stringify_2
});
var stringify$1 = ( stringify && stringify_1 ) || stringify;
var _window$3 = var _window$3 =
typeof window !== 'undefined' typeof window !== 'undefined'
? window ? window
@ -605,7 +594,7 @@ function serializeException$1(ex, depth, maxSize) {
var serialized = serializeObject(ex, depth); var serialized = serializeObject(ex, depth);
if (jsonSize(stringify$1(serialized)) > maxSize) { if (jsonSize(stringify_1(serialized)) > maxSize) {
return serializeException$1(ex, depth - 1); return serializeException$1(ex, depth - 1);
} }
@ -668,76 +657,15 @@ var utils = {
serializeKeysForMessage: serializeKeysForMessage$1 serializeKeysForMessage: serializeKeysForMessage$1
}; };
var utils_1 = utils.isObject; /*
var utils_2 = utils.isError; TraceKit - Cross brower stack traces
var utils_3 = utils.isErrorEvent;
var utils_4 = utils.isUndefined;
var utils_5 = utils.isFunction;
var utils_6 = utils.isPlainObject;
var utils_7 = utils.isString;
var utils_8 = utils.isArray;
var utils_9 = utils.isEmptyObject;
var utils_10 = utils.supportsErrorEvent;
var utils_11 = utils.supportsFetch;
var utils_12 = utils.supportsReferrerPolicy;
var utils_13 = utils.supportsPromiseRejectionEvent;
var utils_14 = utils.wrappedCallback;
var utils_15 = utils.each;
var utils_16 = utils.objectMerge;
var utils_17 = utils.truncate;
var utils_18 = utils.objectFrozen;
var utils_19 = utils.hasKey;
var utils_20 = utils.joinRegExp;
var utils_21 = utils.urlencode;
var utils_22 = utils.uuid4;
var utils_23 = utils.htmlTreeAsString;
var utils_24 = utils.htmlElementAsString;
var utils_25 = utils.isSameException;
var utils_26 = utils.isSameStacktrace;
var utils_27 = utils.parseUrl;
var utils_28 = utils.fill;
var utils_29 = utils.safeJoin;
var utils_30 = utils.serializeException;
var utils_31 = utils.serializeKeysForMessage;
This was originally forked from github.com/occ/TraceKit, but has since been
largely re-written and is now maintained as part of raven-js. Tests for
this are in test/vendor.
var utils$2 = Object.freeze({ MIT license
default: utils, */
__moduleExports: utils,
isObject: utils_1,
isError: utils_2,
isErrorEvent: utils_3,
isUndefined: utils_4,
isFunction: utils_5,
isPlainObject: utils_6,
isString: utils_7,
isArray: utils_8,
isEmptyObject: utils_9,
supportsErrorEvent: utils_10,
supportsFetch: utils_11,
supportsReferrerPolicy: utils_12,
supportsPromiseRejectionEvent: utils_13,
wrappedCallback: utils_14,
each: utils_15,
objectMerge: utils_16,
truncate: utils_17,
objectFrozen: utils_18,
hasKey: utils_19,
joinRegExp: utils_20,
urlencode: utils_21,
uuid4: utils_22,
htmlTreeAsString: utils_23,
htmlElementAsString: utils_24,
isSameException: utils_25,
isSameStacktrace: utils_26,
parseUrl: utils_27,
fill: utils_28,
safeJoin: utils_29,
serializeException: utils_30,
serializeKeysForMessage: utils_31
});
var utils$3 = ( utils$2 && utils ) || utils$2;
var TraceKit = { var TraceKit = {
collectWindowErrors: true, collectWindowErrors: true,
@ -877,9 +805,9 @@ TraceKit.report = (function reportModuleWrapper() {
function traceKitWindowOnError(msg, url, lineNo, colNo, ex) { function traceKitWindowOnError(msg, url, lineNo, colNo, ex) {
var stack = null; var stack = null;
// If 'ex' is ErrorEvent, get real Error from inside // If 'ex' is ErrorEvent, get real Error from inside
var exception = utils$3.isErrorEvent(ex) ? ex.error : ex; var exception = utils.isErrorEvent(ex) ? ex.error : ex;
// If 'msg' is ErrorEvent, get real message from inside // If 'msg' is ErrorEvent, get real message from inside
var message = utils$3.isErrorEvent(msg) ? msg.message : msg; var message = utils.isErrorEvent(msg) ? msg.message : msg;
if (lastExceptionStack) { if (lastExceptionStack) {
TraceKit.computeStackTrace.augmentStackTraceWithInitialElement( TraceKit.computeStackTrace.augmentStackTraceWithInitialElement(
@ -889,7 +817,7 @@ TraceKit.report = (function reportModuleWrapper() {
message message
); );
processLastException(); processLastException();
} else if (exception && utils$3.isError(exception)) { } else if (exception && utils.isError(exception)) {
// non-string `exception` arg; attempt to extract stack trace // non-string `exception` arg; attempt to extract stack trace
// New chrome and blink send along a real error object // New chrome and blink send along a real error object
@ -1356,13 +1284,6 @@ TraceKit.computeStackTrace = (function computeStackTraceWrapper() {
var tracekit = TraceKit; var tracekit = TraceKit;
var tracekit$2 = Object.freeze({
default: tracekit,
__moduleExports: tracekit
});
/* /*
* JavaScript MD5 * JavaScript MD5
* https://github.com/blueimp/JavaScript-MD5 * https://github.com/blueimp/JavaScript-MD5
@ -1630,13 +1551,6 @@ function md5(string, key, raw) {
var md5_1 = md5; var md5_1 = md5;
var md5$1 = Object.freeze({
default: md5_1,
__moduleExports: md5_1
});
function RavenConfigError(message) { function RavenConfigError(message) {
this.name = 'RavenConfigError'; this.name = 'RavenConfigError';
this.message = message; this.message = message;
@ -1646,13 +1560,6 @@ RavenConfigError.prototype.constructor = RavenConfigError;
var configError = RavenConfigError; var configError = RavenConfigError;
var configError$2 = Object.freeze({
default: configError,
__moduleExports: configError
});
var wrapMethod = function(console, level, callback) { var wrapMethod = function(console, level, callback) {
var originalConsoleLevel = console[level]; var originalConsoleLevel = console[level];
var originalConsole = console; var originalConsole = console;
@ -1666,14 +1573,14 @@ var wrapMethod = function(console, level, callback) {
console[level] = function() { console[level] = function() {
var args = [].slice.call(arguments); var args = [].slice.call(arguments);
var msg = utils$3.safeJoin(args, ' '); var msg = utils.safeJoin(args, ' ');
var data = {level: sentryLevel, logger: 'console', extra: {arguments: args}}; var data = {level: sentryLevel, logger: 'console', extra: {arguments: args}};
if (level === 'assert') { if (level === 'assert') {
if (args[0] === false) { if (args[0] === false) {
// Default browsers message // Default browsers message
msg = msg =
'Assertion failed: ' + (utils$3.safeJoin(args.slice(1), ' ') || 'console.assert'); 'Assertion failed: ' + (utils.safeJoin(args.slice(1), ' ') || 'console.assert');
data.extra.arguments = args.slice(1); data.extra.arguments = args.slice(1);
callback && callback(msg, data); callback && callback(msg, data);
} }
@ -1694,51 +1601,42 @@ var console$1 = {
wrapMethod: wrapMethod wrapMethod: wrapMethod
}; };
var console_1 = console$1.wrapMethod; /*global XDomainRequest:false */
var console$3 = Object.freeze({
default: console$1,
__moduleExports: console$1,
wrapMethod: console_1
});
var TraceKit$1 = ( tracekit$2 && tracekit ) || tracekit$2;
var md5$2 = ( md5$1 && md5_1 ) || md5$1;
var RavenConfigError$1 = ( configError$2 && configError ) || configError$2;
var require$$0 = ( console$3 && console$1 ) || console$3;
var isError = utils$3.isError; var isError = utils.isError;
var isObject = utils$3.isObject; var isObject = utils.isObject;
var isPlainObject = utils$3.isPlainObject; var isPlainObject = utils.isPlainObject;
var isErrorEvent = utils$3.isErrorEvent; var isErrorEvent = utils.isErrorEvent;
var isUndefined = utils$3.isUndefined; var isUndefined = utils.isUndefined;
var isFunction = utils$3.isFunction; var isFunction = utils.isFunction;
var isString = utils$3.isString; var isString = utils.isString;
var isArray = utils$3.isArray; var isArray = utils.isArray;
var isEmptyObject = utils$3.isEmptyObject; var isEmptyObject = utils.isEmptyObject;
var each = utils$3.each; var each = utils.each;
var objectMerge = utils$3.objectMerge; var objectMerge = utils.objectMerge;
var truncate = utils$3.truncate; var truncate = utils.truncate;
var objectFrozen = utils$3.objectFrozen; var objectFrozen = utils.objectFrozen;
var hasKey = utils$3.hasKey; var hasKey = utils.hasKey;
var joinRegExp = utils$3.joinRegExp; var joinRegExp = utils.joinRegExp;
var urlencode = utils$3.urlencode; var urlencode = utils.urlencode;
var uuid4 = utils$3.uuid4; var uuid4 = utils.uuid4;
var htmlTreeAsString = utils$3.htmlTreeAsString; var htmlTreeAsString = utils.htmlTreeAsString;
var isSameException = utils$3.isSameException; var isSameException = utils.isSameException;
var isSameStacktrace = utils$3.isSameStacktrace; var isSameStacktrace = utils.isSameStacktrace;
var parseUrl = utils$3.parseUrl; var parseUrl = utils.parseUrl;
var fill = utils$3.fill; var fill = utils.fill;
var supportsFetch = utils$3.supportsFetch; var supportsFetch = utils.supportsFetch;
var supportsReferrerPolicy = utils$3.supportsReferrerPolicy; var supportsReferrerPolicy = utils.supportsReferrerPolicy;
var serializeKeysForMessage = utils$3.serializeKeysForMessage; var serializeKeysForMessage = utils.serializeKeysForMessage;
var serializeException = utils$3.serializeException; var serializeException = utils.serializeException;
var wrapConsoleMethod = require$$0.wrapMethod; var wrapConsoleMethod = console$1.wrapMethod;
var dsnKeys = 'source protocol user pass host port path'.split(' '); var dsnKeys = 'source protocol user pass host port path'.split(' ');
var dsnPattern = /^(?:(\w+):)?\/\/(?:(\w+)(:\w+)?@)?([\w\.-]+)(?::(\d+))?(\/.*)/; var dsnPattern = /^(?:(\w+):)?\/\/(?:(\w+)(:\w+)?@)?([\w\.-]+)(?::(\d+))?(\/.*)/;
@ -1845,7 +1743,7 @@ Raven$2.prototype = {
debug: false, debug: false,
TraceKit: TraceKit$1, // alias to TraceKit TraceKit: tracekit, // alias to TraceKit
/* /*
* Configure Raven with a DSN and extra options * Configure Raven with a DSN and extra options
@ -1926,7 +1824,7 @@ Raven$2.prototype = {
} }
globalOptions.instrument = instrument; globalOptions.instrument = instrument;
TraceKit$1.collectWindowErrors = !!globalOptions.collectWindowErrors; tracekit.collectWindowErrors = !!globalOptions.collectWindowErrors;
// return for chaining // return for chaining
return self; return self;
@ -1943,7 +1841,7 @@ Raven$2.prototype = {
install: function() { install: function() {
var self = this; var self = this;
if (self.isSetup() && !self._isRavenInstalled) { if (self.isSetup() && !self._isRavenInstalled) {
TraceKit$1.report.subscribe(function() { tracekit.report.subscribe(function() {
self._handleOnErrorStackInfo.apply(self, arguments); self._handleOnErrorStackInfo.apply(self, arguments);
}); });
@ -2107,7 +2005,7 @@ Raven$2.prototype = {
* @return {Raven} * @return {Raven}
*/ */
uninstall: function() { uninstall: function() {
TraceKit$1.report.uninstall(); tracekit.report.uninstall();
this._detachPromiseRejectionHandler(); this._detachPromiseRejectionHandler();
this._unpatchFunctionToString(); this._unpatchFunctionToString();
@ -2202,7 +2100,7 @@ Raven$2.prototype = {
// raises an exception different from the one we asked to // raises an exception different from the one we asked to
// report on. // report on.
try { try {
var stack = TraceKit$1.computeStackTrace(ex); var stack = tracekit.computeStackTrace(ex);
this._handleStackInfo(stack, options); this._handleStackInfo(stack, options);
} catch (ex1) { } catch (ex1) {
if (ex !== ex1) { if (ex !== ex1) {
@ -2218,7 +2116,7 @@ Raven$2.prototype = {
var options = objectMerge(currentOptions, { var options = objectMerge(currentOptions, {
message: message:
'Non-Error exception captured with keys: ' + serializeKeysForMessage(exKeys), 'Non-Error exception captured with keys: ' + serializeKeysForMessage(exKeys),
fingerprint: [md5$2(exKeys)], fingerprint: [md5_1(exKeys)],
extra: currentOptions.extra || {} extra: currentOptions.extra || {}
}); });
options.extra.__serialized__ = serializeException(ex); options.extra.__serialized__ = serializeException(ex);
@ -2267,7 +2165,7 @@ Raven$2.prototype = {
// null exception name so `Error` isn't prefixed to msg // null exception name so `Error` isn't prefixed to msg
ex.name = null; ex.name = null;
var stack = TraceKit$1.computeStackTrace(ex); var stack = tracekit.computeStackTrace(ex);
// stack[0] is `throw new Error(msg)` call itself, we are interested in the frame that was just before that, stack[1] // stack[0] is `throw new Error(msg)` call itself, we are interested in the frame that was just before that, stack[1]
var initialCall = isArray(stack.stack) && stack.stack[1]; var initialCall = isArray(stack.stack) && stack.stack[1];
@ -2414,7 +2312,7 @@ Raven$2.prototype = {
*/ */
getContext: function() { getContext: function() {
// lol javascript // lol javascript
return JSON.parse(stringify$1(this._globalContext)); return JSON.parse(stringify_1(this._globalContext));
}, },
/* /*
@ -2550,12 +2448,12 @@ Raven$2.prototype = {
var lastEventId = options.eventId || this.lastEventId(); var lastEventId = options.eventId || this.lastEventId();
if (!lastEventId) { if (!lastEventId) {
throw new RavenConfigError$1('Missing eventId'); throw new configError('Missing eventId');
} }
var dsn = options.dsn || this._dsn; var dsn = options.dsn || this._dsn;
if (!dsn) { if (!dsn) {
throw new RavenConfigError$1('Missing DSN'); throw new configError('Missing DSN');
} }
var encode = encodeURIComponent; var encode = encodeURIComponent;
@ -3197,11 +3095,11 @@ Raven$2.prototype = {
try { try {
while (i--) dsn[dsnKeys[i]] = m[i] || ''; while (i--) dsn[dsnKeys[i]] = m[i] || '';
} catch (e) { } catch (e) {
throw new RavenConfigError$1('Invalid DSN: ' + str); throw new configError('Invalid DSN: ' + str);
} }
if (dsn.pass && !this._globalOptions.allowSecretKey) { if (dsn.pass && !this._globalOptions.allowSecretKey) {
throw new RavenConfigError$1( throw new configError(
'Do not specify your secret key in the DSN. See: http://bit.ly/raven-secret-key' 'Do not specify your secret key in the DSN. See: http://bit.ly/raven-secret-key'
); );
} }
@ -3716,7 +3614,7 @@ Raven$2.prototype = {
} }
if (supportsFetch()) { if (supportsFetch()) {
evaluatedFetchParameters.body = stringify$1(opts.data); evaluatedFetchParameters.body = stringify_1(opts.data);
var defaultFetchOptions = objectMerge({}, this._fetchDefaults); var defaultFetchOptions = objectMerge({}, this._fetchDefaults);
var fetchOptions = objectMerge(defaultFetchOptions, evaluatedFetchParameters); var fetchOptions = objectMerge(defaultFetchOptions, evaluatedFetchParameters);
@ -3791,7 +3689,7 @@ Raven$2.prototype = {
}); });
} }
request.send(stringify$1(opts.data)); request.send(stringify_1(opts.data));
}, },
_evaluateHash: function(hash) { _evaluateHash: function(hash) {
@ -3833,22 +3731,22 @@ Raven$2.prototype.setReleaseContext = Raven$2.prototype.setRelease;
var raven = Raven$2; var raven = Raven$2;
/**
* Enforces a single instance of the Raven client, and the
* main entry point for Raven. If you are a consumer of the
* Raven library, you SHOULD load this file (vs raven.js).
**/
var raven$2 = Object.freeze({
default: raven,
__moduleExports: raven
});
var RavenConstructor = ( raven$2 && raven ) || raven$2;
// This is to be defensive in environments where window does not exist (see https://github.com/getsentry/raven-js/pull/785)
var _window = var _window =
typeof window !== 'undefined' typeof window !== 'undefined'
? window ? window
: typeof commonjsGlobal !== 'undefined' ? commonjsGlobal : typeof self !== 'undefined' ? self : {}; : typeof commonjsGlobal !== 'undefined' ? commonjsGlobal : typeof self !== 'undefined' ? self : {};
var _Raven = _window.Raven; var _Raven = _window.Raven;
var Raven = new RavenConstructor(); var Raven = new raven();
/* /*
* Allow multiple versions of Raven to be installed. * Allow multiple versions of Raven to be installed.

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

9
dist/plyr.js vendored
View File

@ -1822,6 +1822,7 @@ var utils = {
// Plyr support checks // Plyr support checks
// ========================================================================== // ==========================================================================
// Check for feature support
var support = { var support = {
// Basic support // Basic support
audio: 'canPlayType' in document.createElement('audio'), audio: 'canPlayType' in document.createElement('audio'),
@ -4074,6 +4075,7 @@ var controls = {
// Plyr Event Listeners // Plyr Event Listeners
// ========================================================================== // ==========================================================================
// Sniff out the browser
var browser$1 = utils.getBrowser(); var browser$1 = utils.getBrowser();
var Listeners = function () { var Listeners = function () {
@ -6172,6 +6174,7 @@ var vimeo = {
// Plyr Media // Plyr Media
// ========================================================================== // ==========================================================================
// Sniff out the browser
var browser$3 = utils.getBrowser(); var browser$3 = utils.getBrowser();
var media = { var media = {
@ -6416,6 +6419,12 @@ var source = {
// License: The MIT License (MIT) // License: The MIT License (MIT)
// ========================================================================== // ==========================================================================
// Private properties
// TODO: Use a WeakMap for private globals
// const globals = new WeakMap();
// Plyr instance
var Plyr = function () { var Plyr = function () {
function Plyr(target, options) { function Plyr(target, options) {
var _this = this; var _this = this;

2
dist/plyr.js.map vendored

File diff suppressed because one or more lines are too long

2666
dist/plyr.polyfilled.js vendored

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -128,7 +128,7 @@ See [initialising](#initialising) for more information on advanced setups.
If you want to use our CDN (provided by [Fastly](https://www.fastly.com/)) for the JavaScript, you can use the following: If you want to use our CDN (provided by [Fastly](https://www.fastly.com/)) for the JavaScript, you can use the following:
```html ```html
<script src="https://cdn.plyr.io/3.0.3/plyr.js"></script> <script src="https://cdn.plyr.io/3.0.4/plyr.js"></script>
``` ```
_Note_: Be sure to read the [polyfills](#polyfills) section below about browser compatibility _Note_: Be sure to read the [polyfills](#polyfills) section below about browser compatibility
@ -144,13 +144,13 @@ Include the `plyr.css` stylsheet into your `<head>`
If you want to use our CDN (provided by [Fastly](https://www.fastly.com/)) for the default CSS, you can use the following: If you want to use our CDN (provided by [Fastly](https://www.fastly.com/)) for the default CSS, you can use the following:
```html ```html
<link rel="stylesheet" href="https://cdn.plyr.io/3.0.3/plyr.css"> <link rel="stylesheet" href="https://cdn.plyr.io/3.0.4/plyr.css">
``` ```
### SVG Sprite ### SVG Sprite
The SVG sprite is loaded automatically from our CDN (provided by [Fastly](https://www.fastly.com/)). To change this, see the [options](#options) below. For The SVG sprite is loaded automatically from our CDN (provided by [Fastly](https://www.fastly.com/)). To change this, see the [options](#options) below. For
reference, the CDN hosted SVG sprite can be found at `https://cdn.plyr.io/3.0.3/plyr.svg`. reference, the CDN hosted SVG sprite can be found at `https://cdn.plyr.io/3.0.4/plyr.svg`.
## Ads ## Ads

View File

@ -56,7 +56,7 @@ const defaults = {
// Sprite (for icons) // Sprite (for icons)
loadSprite: true, loadSprite: true,
iconPrefix: 'plyr', iconPrefix: 'plyr',
iconUrl: 'https://cdn.plyr.io/3.0.3/plyr.svg', iconUrl: 'https://cdn.plyr.io/3.0.4/plyr.svg',
// Blank video (used to prevent errors on source change) // Blank video (used to prevent errors on source change)
blankVideo: 'https://cdn.plyr.io/static/blank.mp4', blankVideo: 'https://cdn.plyr.io/static/blank.mp4',

View File

@ -1,6 +1,6 @@
// ========================================================================== // ==========================================================================
// Plyr // Plyr
// plyr.js v3.0.3 // plyr.js v3.0.4
// https://github.com/sampotts/plyr // https://github.com/sampotts/plyr
// License: The MIT License (MIT) // License: The MIT License (MIT)
// ========================================================================== // ==========================================================================

View File

@ -1,6 +1,6 @@
// ========================================================================== // ==========================================================================
// Plyr Polyfilled Build // Plyr Polyfilled Build
// plyr.js v3.0.3 // plyr.js v3.0.4
// https://github.com/sampotts/plyr // https://github.com/sampotts/plyr
// License: The MIT License (MIT) // License: The MIT License (MIT)
// ========================================================================== // ==========================================================================