/**
* @license
* Video.js 7.8.4 <http://videojs.com/>
* Copyright Brightcove, Inc. <https://www.brightcove.com/>
* Available under Apache License Version 2.0
* <https://github.com/videojs/video.js/blob/master/LICENSE>
*
* Includes vtt.js <https://github.com/mozilla/vtt.js>
* Available under Apache License Version 2.0
* <https://github.com/mozilla/vtt.js/blob/master/LICENSE>
*/
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('global/window'), require('global/document')) :
typeof define === 'function' && define.amd ? define(['global/window', 'global/document'], factory) :
(global = global || self, global.videojs = factory(global.window, global.document));
}(this, (function (window$3, document) { 'use strict';
window$3 = window$3 && Object.prototype.hasOwnProperty.call(window$3, 'default') ? window$3['default'] : window$3;
document = document && Object.prototype.hasOwnProperty.call(document, 'default') ? document['default'] : document;
var version = "7.8.4";
/**
* @file create-logger.js
* @module create-logger
*/
var history = [];
/**
* Log messages to the console and history based on the type of message
*
* @private
* @param {string} type
* The name of the console method to use.
*
* @param {Array} args
* The arguments to be passed to the matching console method.
*/
var LogByTypeFactory = function LogByTypeFactory(name, log) {
return function (type, level, args) {
var lvl = log.levels[level];
var lvlRegExp = new RegExp("^(" + lvl + ")$");
if (type !== 'log') {
// Add the type to the front of the message when it's not "log".
args.unshift(type.toUpperCase() + ':');
} // Add console prefix after adding to history.
args.unshift(name + ':'); // Add a clone of the args at this point to history.
if (history) {
history.push([].concat(args)); // only store 1000 history entries
var splice = history.length - 1000;
history.splice(0, splice > 0 ? splice : 0);
} // If there's no console then don't try to output messages, but they will
// still be stored in history.
if (!window$3.console) {
return;
} // Was setting these once outside of this function, but containing them
// in the function makes it easier to test cases where console doesn't exist
// when the module is executed.
var fn = window$3.console[type];
if (!fn && type === 'debug') {
// Certain browsers don't have support for console.debug. For those, we
// should default to the closest comparable log.
fn = window$3.console.info || window$3.console.log;
} // Bail out if there's no console or if this type is not allowed by the
// current logging level.
if (!fn || !lvl || !lvlRegExp.test(type)) {
return;
}
fn[Array.isArray(args) ? 'apply' : 'call'](window$3.console, args);
};
};
function createLogger(name) {
// This is the private tracking variable for logging level.
var level = 'info'; // the curried logByType bound to the specific log and history
var logByType;
/**
* Logs plain debug messages. Similar to `console.log`.
*
* Due to [limitations](https://github.com/jsdoc3/jsdoc/issues/955#issuecomment-313829149)
* of our JSDoc template, we cannot properly document this as both a function
* and a namespace, so its function signature is documented here.
*
* #### Arguments
* ##### *args
* Mixed[]
*
* Any combination of values that could be passed to `console.log()`.
*
* #### Return Value
*
* `undefined`
*
* @namespace
* @param {Mixed[]} args
* One or more messages or objects that should be logged.
*/
var log = function log() {
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
logByType('log', level, args);
}; // This is the logByType helper that the logging methods below use
logByType = LogByTypeFactory(name, log);
/**
* Create a new sublogger which chains the old name to the new name.
*
* For example, doing `videojs.log.createLogger('player')` and then using that logger will log the following:
* ```js
* mylogger('foo');
* // > VIDEOJS: player: foo
* ```
*
* @param {string} name
* The name to add call the new logger
* @return {Object}
*/
log.createLogger = function (subname) {
return createLogger(name + ': ' + subname);
};
/**
* Enumeration of available logging levels, where the keys are the level names
* and the values are `|`-separated strings containing logging methods allowed
* in that logging level. These strings are used to create a regular expression
* matching the function name being called.
*
* Levels provided by Video.js are:
*
* - `off`: Matches no calls. Any value that can be cast to `false` will have
* this effect. The most restrictive.
* - `all`: Matches only Video.js-provided functions (`debug`, `log`,
* `log.warn`, and `log.error`).
* - `debug`: Matches `log.debug`, `log`, `log.warn`, and `log.error` calls.
* - `info` (default): Matches `log`, `log.warn`, and `log.error` calls.
* - `warn`: Matches `log.warn` and `log.error` calls.
* - `error`: Matches only `log.error` calls.
*
* @type {Object}
*/
log.levels = {
all: 'debug|log|warn|error',
off: '',
debug: 'debug|log|warn|error',
info: 'log|warn|error',
warn: 'warn|error',
error: 'error',
DEFAULT: level
};
/**
* Get or set the current logging level.
*
* If a string matching a key from {@link module:log.levels} is provided, acts
* as a setter.
*
* @param {string} [lvl]
* Pass a valid level to set a new logging level.
*
* @return {string}
* The current logging level.
*/
log.level = function (lvl) {
if (typeof lvl === 'string') {
if (!log.levels.hasOwnProperty(lvl)) {
throw new Error("\"" + lvl + "\" in not a valid log level");
}
level = lvl;
}
return level;
};
/**
* Returns an array containing everything that has been logged to the history.
*
* This array is a shallow clone of the internal history record. However, its
* contents are _not_ cloned; so, mutating objects inside this array will
* mutate them in history.
*
* @return {Array}
*/
log.history = function () {
return history ? [].concat(history) : [];
};
/**
* Allows you to filter the history by the given logger name
*
* @param {string} fname
* The name to filter by
*
* @return {Array}
* The filtered list to return
*/
log.history.filter = function (fname) {
return (history || []).filter(function (historyItem) {
// if the first item in each historyItem includes `fname`, then it's a match
return new RegExp(".*" + fname + ".*").test(historyItem[0]);
});
};
/**
* Clears the internal history tracking, but does not prevent further history
* tracking.
*/
log.history.clear = function () {
if (history) {
history.length = 0;
}
};
/**
* Disable history tracking if it is currently enabled.
*/
log.history.disable = function () {
if (history !== null) {
history.length = 0;
history = null;
}
};
/**
* Enable history tracking if it is currently disabled.
*/
log.history.enable = function () {
if (history === null) {
history = [];
}
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
Java毕业设计-基于ssm框架的疫情冷链追溯系统(源码+说明+演示视频) 【项目技术】 java+mysql+ssm+b/s 【实现功能】 前台方面(经营者用户): 经营者在使用本系统过程中,主要需要满足其浏览所有商品、投诉建议、入库登记、出库登记等功能。 后台方面(管理者用户): 主要需要满足其后台用户管理、经营者管理、商品管理等功能。
资源推荐
资源详情
资源评论
收起资源包目录
Java毕业设计-基于ssm框架的疫情冷链追溯系统(源码+说明+演示视频).zip (2000个子文件)
bootstrap.css 151KB
bootstrap.css 151KB
summernote-bs2.css 149KB
summernote-bs2.css 149KB
summernote-bs3.css 144KB
summernote-bs3.css 144KB
bootstrap.css 138KB
bootstrap.css 138KB
bootstrap.min.css 120KB
bootstrap.min.css 120KB
bootstrap.min.css 118KB
bootstrap.min.css 118KB
1.css 111KB
1.css 111KB
style.css 95KB
style.css 95KB
materialdesignicons.css 93KB
materialdesignicons.css 93KB
styleLR.css 91KB
styleLR.css 91KB
animate.css 70KB
animate.css 70KB
ionicons.css 57KB
ionicons.css 57KB
video-js-cdn.css 44KB
video-js.css 44KB
video-js-cdn.css 44KB
video-js.css 44KB
video-js-cdn.css 44KB
video-js.css 44KB
video-js-cdn.css 44KB
video-js.css 44KB
style.css 40KB
style.css 40KB
video-js-cdn.min.css 39KB
video-js.min.css 39KB
video-js-cdn.min.css 39KB
video-js.min.css 39KB
video-js-cdn.min.css 39KB
video-js.min.css 39KB
video-js-cdn.min.css 39KB
video-js.min.css 39KB
font-awesome.css 36KB
font-awesome.css 36KB
jquery-ui-1.9.2.custom.css 30KB
jquery-ui-1.9.2.custom.css 30KB
jquery-ui.min.css 29KB
jquery-ui.min.css 29KB
bootstrap-theme.css 26KB
bootstrap-theme.css 26KB
jquery-ui-1.9.2.custom.min.css 26KB
jquery-ui-1.9.2.custom.min.css 26KB
fullcalendar.css 25KB
fullcalendar.css 25KB
bootstrap-theme.min.css 23KB
bootstrap-theme.min.css 23KB
default.css 21KB
default.css 21KB
sweetalert.css 21KB
sweetalert.css 21KB
bootstrap-editable.css 21KB
bootstrap-editable.css 21KB
themify-icons.css 16KB
themify-icons.css 16KB
bootstrap-datepicker.min.css 15KB
bootstrap-datepicker.min.css 15KB
jquery.dataTables-custom.css 14KB
jquery.dataTables-custom.css 14KB
simple-line-icons.css 13KB
simple-line-icons.css 13KB
jquery.datatables.min.css 13KB
jquery.datatables.min.css 13KB
dropzone.css 12KB
dropzone.css 12KB
videojs-icons.css 11KB
videojs-icons.css 11KB
summernote.css 10KB
summernote.css 10KB
main.css 9KB
main.css 9KB
daterangepicker.css 8KB
daterangepicker.css 8KB
jquery-jvectormap-2.0.2.css 6KB
jquery-jvectormap-2.0.2.css 6KB
style.css 6KB
style.css 6KB
ie7.css 6KB
ie7.css 6KB
jquery.steps.css 6KB
jquery.steps.css 6KB
responsive.css 6KB
responsive.css 6KB
jquery.toast.min.css 5KB
jquery.toast.min.css 5KB
swipebox.css 4KB
swipebox.css 4KB
bootstrap-colorpicker.min.css 4KB
bootstrap-colorpicker.min.css 4KB
rolling.css 4KB
rolling.css 4KB
共 2000 条
- 1
- 2
- 3
- 4
- 5
- 6
- 20
资源评论
岛上程序猿
- 粉丝: 5444
- 资源: 4237
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功