From 9d20fbd828556341d5564feb7b89ef28a96f3ec2 Mon Sep 17 00:00:00 2001 From: Matthew Neil Date: Wed, 13 Dec 2017 13:28:00 -0500 Subject: [PATCH] feat: add custom error for flashls crossdomain errors (#111) --- package.json | 2 +- src/plugin.js | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index b482a92..7401f65 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/src/plugin.js b/src/plugin.js index 6b5add6..07ffb90 100644 --- a/src/plugin.js +++ b/src/plugin.js @@ -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.' } } }; @@ -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 = `
${player.localize('Technical details')}