videojs-errors
Advanced tools
Comparing version 3.0.2 to 3.0.3
@@ -0,1 +1,12 @@ | ||
<a name="3.0.3"></a> | ||
## [3.0.3](https://github.com/brightcove/videojs-errors/compare/v3.0.2...v3.0.3) (2017-09-06) | ||
### Features | ||
* Add Czech translation ([#106](https://github.com/brightcove/videojs-errors/issues/106)) ([3cb9c1e](https://github.com/brightcove/videojs-errors/commit/3cb9c1e)) | ||
### Bug Fixes | ||
* Resolve an issue where 'error' events triggered on the player during contrib-ads playback would not be recognized. ([#109](https://github.com/brightcove/videojs-errors/issues/109)) ([3b48430](https://github.com/brightcove/videojs-errors/commit/3b48430)) | ||
<a name="3.0.2"></a> | ||
@@ -2,0 +13,0 @@ ## [3.0.2](https://github.com/brightcove/videojs-errors/compare/v3.0.1...v3.0.2) (2017-06-08) |
@@ -274,3 +274,3 @@ 'use strict'; | ||
player.off('dispose', onDisposeHandler); | ||
player.off('error', onErrorHandler); | ||
player.off(['aderror', 'error'], onErrorHandler); | ||
}; | ||
@@ -298,3 +298,3 @@ | ||
player.on('dispose', onDisposeHandler); | ||
player.on('error', onErrorHandler); | ||
player.on(['aderror', 'error'], onErrorHandler); | ||
@@ -301,0 +301,0 @@ player.ready(function () { |
@@ -270,3 +270,3 @@ import videojs from 'video.js'; | ||
player.off('dispose', onDisposeHandler); | ||
player.off('error', onErrorHandler); | ||
player.off(['aderror', 'error'], onErrorHandler); | ||
}; | ||
@@ -294,3 +294,3 @@ | ||
player.on('dispose', onDisposeHandler); | ||
player.on('error', onErrorHandler); | ||
player.on(['aderror', 'error'], onErrorHandler); | ||
@@ -297,0 +297,0 @@ player.ready(function () { |
/** | ||
* videojs-errors | ||
* @version 3.0.2 | ||
* @version 3.0.3 | ||
* @copyright 2017 Brightcove, Inc. | ||
@@ -310,3 +310,3 @@ * @license Apache-2.0 | ||
player.off('dispose', onDisposeHandler); | ||
player.off('error', onErrorHandler); | ||
player.off(['aderror', 'error'], onErrorHandler); | ||
}; | ||
@@ -334,3 +334,3 @@ | ||
player.on('dispose', onDisposeHandler); | ||
player.on('error', onErrorHandler); | ||
player.on(['aderror', 'error'], onErrorHandler); | ||
@@ -337,0 +337,0 @@ player.ready(function () { |
/** | ||
* videojs-errors | ||
* @version 3.0.2 | ||
* @version 3.0.3 | ||
* @copyright 2017 Brightcove, Inc. | ||
* @license Apache-2.0 | ||
*/ | ||
!function(e,r){"object"==typeof exports&&"undefined"!=typeof module?module.exports=r(require("video.js")):"function"==typeof define&&define.amd?define(["video.js"],r):e.videojsErrors=r(e.videojs)}(this,function(e){"use strict";e="default"in e?e["default"]:e;var r,o="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n={},i=(Object.freeze||Object)({"default":n}),t=i&&n||i,s=void 0!==o?o:"undefined"!=typeof window?window:{};"undefined"!=typeof document?r=document:(r=s["__GLOBAL_DOCUMENT_CACHE@4"])||(r=s["__GLOBAL_DOCUMENT_CACHE@4"]=t);var d=r,a=e.getComponent("Flash"),l=!e.browser.IS_IPHONE,c=e.registerPlugin||e.plugin,u={header:"",code:"",message:"",timeout:45e3,dismiss:l,progressDisabled:!1,errors:{1:{type:"MEDIA_ERR_ABORTED",headline:"The video download was cancelled"},2:{type:"MEDIA_ERR_NETWORK",headline:"The video connection was lost, please confirm you are connected to the internet"},3:{type:"MEDIA_ERR_DECODE",headline:"The video is bad or in a format that cannot be played on your browser"},4:{type:"MEDIA_ERR_SRC_NOT_SUPPORTED",headline:"This video is either unavailable or not supported in this browser"},5:{type:"MEDIA_ERR_ENCRYPTED",headline:"The video you are trying to watch is encrypted and we do not know how to decrypt it"},unknown:{type:"MEDIA_ERR_UNKNOWN",headline:"An unanticipated problem was encountered, check back soon and try again"},"-1":{type:"PLAYER_ERR_NO_SRC",headline:"No video has been loaded"},"-2":{type:"PLAYER_ERR_TIMEOUT",headline:"Could not download the video"},PLAYER_ERR_DOMAIN_RESTRICTED:{headline:"This video is restricted from playing on your current domain"},PLAYER_ERR_IP_RESTRICTED:{headline:"This video is restricted at your current IP address"},PLAYER_ERR_GEO_RESTRICTED:{headline:"This video is restricted from playing in your current geographic region"}}},f=function v(r,o){var n=void 0,i=void 0,t=void 0,s=[],l=function(r){o.errors=e.mergeOptions(o.errors,r),Object.keys(o.errors).forEach(function(e){var r=o.errors[e];r.type||(r.type=e)})};l();var c=function(){r.clearTimeout(i),t&&(t=!1,r.removeClass("vjs-waiting")),i=r.setTimeout(function(){r.error()||r.paused()||r.ended()||(t=!0,r.addClass("vjs-waiting"))},1e3),r.clearTimeout(n),n=r.setTimeout(function(){r.error()||r.paused()||r.ended()||r.error({code:-2,type:"PLAYER_ERR_TIMEOUT"})},o.timeout),r.error()&&-2===r.error().code&&r.error(null)},f=function(){for(var e=void 0;s.length;)e=s.shift(),r.off(e[0],e[1]);r.clearTimeout(n),r.clearTimeout(i)},p=function(e,o){var n=function(){if(!r.error()){var e=r.$(".vjs-tech");if(e&&"application/x-shockwave-flash"===e.type&&!e.vjs_getProperty)return void r.error({code:-2,type:"PLAYER_ERR_TIMEOUT"});if(r.paused())return c();if(r.ended())return c()}o.call(this)};r.on(e,n),s.push([e,n])},h=function(){var e=0;f(),c(),p(["timeupdate","adtimeupdate"],function(){var o=r.currentTime();o!==e&&(e=o,c())}),o.progressDisabled||p("progress",c)},E=function(){r.currentSrc()||r.error({code:-1,type:"PLAYER_ERR_NO_SRC"})},R=function(){var n="",i=r.error(),t=d.createElement("div"),s="";if(i){(i=e.mergeOptions(i,o.errors[i.code||0])).message&&(n='<div class="vjs-errors-details">'+r.localize("Technical details")+'\n : <div class="vjs-errors-message">'+r.localize(i.message)+"</div>\n </div>"),4===i.code&&a&&!a.isSupported()&&(n+='<span class="vjs-errors-flashmessage">'+r.localize("If you are using an older browser please try upgrading or installing Flash.")+"</span>");var l=r.getChild("errorDisplay");if(t.className="vjs-errors-dialog",t.id="vjs-errors-dialog",s='<div class="vjs-errors-content-container">\n <h2 class="vjs-errors-headline">'+this.localize(i.headline)+"</h2>\n <div><b>"+this.localize("Error Code")+"</b>: "+(i.type||i.code)+"</div>\n "+n+"\n </div>",l.closeable(!("dismiss"in i)||i.dismiss)){s+='<div class="vjs-errors-ok-button-container">\n <button class="vjs-errors-ok-button">'+this.localize("OK")+"</button>\n </div>",t.innerHTML=s,l.fillWith(t),l.contentEl().firstChild.appendChild(l.getChild("closeButton").el());var c=l.el().querySelector(".vjs-errors-ok-button");r.on(c,"click",function(){l.close()})}else t.innerHTML=s,l.fillWith(t);(r.currentWidth()<=600||r.currentHeight()<=250)&&l.addClass("vjs-xs"),l.one("modalclose",function(){return r.error(null)})}},y=function _(){f(),r.removeClass("vjs-errors"),r.off("play",h),r.off("play",E),r.off("dispose",_),r.off("error",R)},g=function(o){y(),v(r,e.mergeOptions(u,o))};g.extend=function(e){return l(e)},g.getAll=function(){return e.mergeOptions(o.errors)},g.disableProgress=function(e){o.progressDisabled=e,h()},r.on("play",h),r.on("play",E),r.on("dispose",y),r.on("error",R),r.ready(function(){r.addClass("vjs-errors")}),r.errors=g},p=function(r){f(this,e.mergeOptions(u,r))};return["extend","getAll","disableProgress"].forEach(function(r){p[r]=function(){e.log.warn("The errors."+r+"() method is not available until the plugin has been initialized!")}}),c("errors",p),p}); | ||
!function(e,r){"object"==typeof exports&&"undefined"!=typeof module?module.exports=r(require("video.js")):"function"==typeof define&&define.amd?define(["video.js"],r):e.videojsErrors=r(e.videojs)}(this,function(e){"use strict";e="default"in e?e["default"]:e;var r,o="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n={},i=(Object.freeze||Object)({"default":n}),t=i&&n||i,s=void 0!==o?o:"undefined"!=typeof window?window:{};"undefined"!=typeof document?r=document:(r=s["__GLOBAL_DOCUMENT_CACHE@4"])||(r=s["__GLOBAL_DOCUMENT_CACHE@4"]=t);var d=r,a=e.getComponent("Flash"),l=!e.browser.IS_IPHONE,c=e.registerPlugin||e.plugin,u={header:"",code:"",message:"",timeout:45e3,dismiss:l,progressDisabled:!1,errors:{1:{type:"MEDIA_ERR_ABORTED",headline:"The video download was cancelled"},2:{type:"MEDIA_ERR_NETWORK",headline:"The video connection was lost, please confirm you are connected to the internet"},3:{type:"MEDIA_ERR_DECODE",headline:"The video is bad or in a format that cannot be played on your browser"},4:{type:"MEDIA_ERR_SRC_NOT_SUPPORTED",headline:"This video is either unavailable or not supported in this browser"},5:{type:"MEDIA_ERR_ENCRYPTED",headline:"The video you are trying to watch is encrypted and we do not know how to decrypt it"},unknown:{type:"MEDIA_ERR_UNKNOWN",headline:"An unanticipated problem was encountered, check back soon and try again"},"-1":{type:"PLAYER_ERR_NO_SRC",headline:"No video has been loaded"},"-2":{type:"PLAYER_ERR_TIMEOUT",headline:"Could not download the video"},PLAYER_ERR_DOMAIN_RESTRICTED:{headline:"This video is restricted from playing on your current domain"},PLAYER_ERR_IP_RESTRICTED:{headline:"This video is restricted at your current IP address"},PLAYER_ERR_GEO_RESTRICTED:{headline:"This video is restricted from playing in your current geographic region"}}},f=function v(r,o){var n=void 0,i=void 0,t=void 0,s=[],l=function(r){o.errors=e.mergeOptions(o.errors,r),Object.keys(o.errors).forEach(function(e){var r=o.errors[e];r.type||(r.type=e)})};l();var c=function(){r.clearTimeout(i),t&&(t=!1,r.removeClass("vjs-waiting")),i=r.setTimeout(function(){r.error()||r.paused()||r.ended()||(t=!0,r.addClass("vjs-waiting"))},1e3),r.clearTimeout(n),n=r.setTimeout(function(){r.error()||r.paused()||r.ended()||r.error({code:-2,type:"PLAYER_ERR_TIMEOUT"})},o.timeout),r.error()&&-2===r.error().code&&r.error(null)},f=function(){for(var e=void 0;s.length;)e=s.shift(),r.off(e[0],e[1]);r.clearTimeout(n),r.clearTimeout(i)},p=function(e,o){var n=function(){if(!r.error()){var e=r.$(".vjs-tech");if(e&&"application/x-shockwave-flash"===e.type&&!e.vjs_getProperty)return void r.error({code:-2,type:"PLAYER_ERR_TIMEOUT"});if(r.paused())return c();if(r.ended())return c()}o.call(this)};r.on(e,n),s.push([e,n])},h=function(){var e=0;f(),c(),p(["timeupdate","adtimeupdate"],function(){var o=r.currentTime();o!==e&&(e=o,c())}),o.progressDisabled||p("progress",c)},E=function(){r.currentSrc()||r.error({code:-1,type:"PLAYER_ERR_NO_SRC"})},R=function(){var n="",i=r.error(),t=d.createElement("div"),s="";if(i){(i=e.mergeOptions(i,o.errors[i.code||0])).message&&(n='<div class="vjs-errors-details">'+r.localize("Technical details")+'\n : <div class="vjs-errors-message">'+r.localize(i.message)+"</div>\n </div>"),4===i.code&&a&&!a.isSupported()&&(n+='<span class="vjs-errors-flashmessage">'+r.localize("If you are using an older browser please try upgrading or installing Flash.")+"</span>");var l=r.getChild("errorDisplay");if(t.className="vjs-errors-dialog",t.id="vjs-errors-dialog",s='<div class="vjs-errors-content-container">\n <h2 class="vjs-errors-headline">'+this.localize(i.headline)+"</h2>\n <div><b>"+this.localize("Error Code")+"</b>: "+(i.type||i.code)+"</div>\n "+n+"\n </div>",l.closeable(!("dismiss"in i)||i.dismiss)){s+='<div class="vjs-errors-ok-button-container">\n <button class="vjs-errors-ok-button">'+this.localize("OK")+"</button>\n </div>",t.innerHTML=s,l.fillWith(t),l.contentEl().firstChild.appendChild(l.getChild("closeButton").el());var c=l.el().querySelector(".vjs-errors-ok-button");r.on(c,"click",function(){l.close()})}else t.innerHTML=s,l.fillWith(t);(r.currentWidth()<=600||r.currentHeight()<=250)&&l.addClass("vjs-xs"),l.one("modalclose",function(){return r.error(null)})}},y=function _(){f(),r.removeClass("vjs-errors"),r.off("play",h),r.off("play",E),r.off("dispose",_),r.off(["aderror","error"],R)},g=function(o){y(),v(r,e.mergeOptions(u,o))};g.extend=function(e){return l(e)},g.getAll=function(){return e.mergeOptions(o.errors)},g.disableProgress=function(e){o.progressDisabled=e,h()},r.on("play",h),r.on("play",E),r.on("dispose",y),r.on(["aderror","error"],R),r.ready(function(){r.addClass("vjs-errors")}),r.errors=g},p=function(r){f(this,e.mergeOptions(u,r))};return["extend","getAll","disableProgress"].forEach(function(r){p[r]=function(){e.log.warn("The errors."+r+"() method is not available until the plugin has been initialized!")}}),c("errors",p),p}); |
{ | ||
"name": "videojs-errors", | ||
"version": "3.0.2", | ||
"version": "3.0.3", | ||
"author": "Brightcove, Inc.", | ||
@@ -5,0 +5,0 @@ "description": "A Video.js plugin for custom error reporting", |
@@ -284,3 +284,3 @@ import videojs from 'video.js'; | ||
player.off('dispose', onDisposeHandler); | ||
player.off('error', onErrorHandler); | ||
player.off(['aderror', 'error'], onErrorHandler); | ||
}; | ||
@@ -304,3 +304,3 @@ | ||
player.on('dispose', onDisposeHandler); | ||
player.on('error', onErrorHandler); | ||
player.on(['aderror', 'error'], onErrorHandler); | ||
@@ -307,0 +307,0 @@ player.ready(() => { |
@@ -303,3 +303,3 @@ (function (QUnit,sinon,videojs) { | ||
player.off('dispose', onDisposeHandler); | ||
player.off('error', onErrorHandler); | ||
player.off(['aderror', 'error'], onErrorHandler); | ||
}; | ||
@@ -327,3 +327,3 @@ | ||
player.on('dispose', onDisposeHandler); | ||
player.on('error', onErrorHandler); | ||
player.on(['aderror', 'error'], onErrorHandler); | ||
@@ -330,0 +330,0 @@ player.ready(function () { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1152563
63
3308