Skip to content

Commit

Permalink
feat: add custom error for flashls crossdomain errors (#111)
Browse files Browse the repository at this point in the history
  • Loading branch information
mjneil authored Dec 13, 2017
1 parent 5a7c423 commit 9d20fbd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@
"npm-run-all": "^4.0.2",
"qunitjs": "^1.21.0",
"rimraf": "^2.6.1",
"rollup": "^0.41.6",
"rollup": "^0.51.0",
"rollup-plugin-babel": "^2.7.1",
"rollup-plugin-commonjs": "^8.0.2",
"rollup-plugin-json": "^2.1.1",
Expand Down
5 changes: 4 additions & 1 deletion src/plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@ const defaults = {
},
'PLAYER_ERR_GEO_RESTRICTED': {
headline: 'This video is restricted from playing in your current geographic region'
},
'FLASHLS_ERR_CROSS_DOMAIN': {
headline: 'The video could not be loaded: crossdomain access denied.'
}
}
};
Expand Down Expand Up @@ -217,7 +220,7 @@ const initPlugin = function(player, options) {
return;
}

error = videojs.mergeOptions(error, options.errors[error.code || 0]);
error = videojs.mergeOptions(error, options.errors[error.code || error.type || 0]);

if (error.message) {
details = `<div class="vjs-errors-details">${player.localize('Technical details')}
Expand Down

0 comments on commit 9d20fbd

Please sign in to comment.