Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

custom error message for no plugins case

  • Loading branch information...
commit 0317f2b54a68d0faa2416bc9cfdf7b0d50415c9b 1 parent 8ea286a
@svoynow svoynow authored
Showing with 7 additions and 3 deletions.
  1. +7 −3 src/js/me-shim.js
View
10 src/js/me-shim.js
@@ -406,9 +406,13 @@ mejs.HtmlMediaElementShim = {
errorContainer.style.height = htmlMediaElement.height + 'px';
} catch (e) {}
- errorContainer.innerHTML = (poster !== '') ?
- '<a href="' + playback.url + '"><img src="' + poster + '" width="100%" height="100%" /></a>' :
- '<a href="' + playback.url + '"><span>' + mejs.i18n.t('Download File') + '</span></a>';
+ if (options.customError) {
+ errorContainer.innerHTML = options.customError;
+ } else {
+ errorContainer.innerHTML = (poster !== '') ?
+ '<a href="' + playback.url + '"><img src="' + poster + '" width="100%" height="100%" /></a>' :
+ '<a href="' + playback.url + '"><span>' + mejs.i18n.t('Download File') + '</span></a>';
+ }
htmlMediaElement.parentNode.insertBefore(errorContainer, htmlMediaElement);
htmlMediaElement.style.display = 'none';
Please sign in to comment.
Something went wrong with that request. Please try again.