diff --git a/assets/www/android/platform.js b/assets/www/android/platform.js index 0873927f..74cf4598 100644 --- a/assets/www/android/platform.js +++ b/assets/www/android/platform.js @@ -141,6 +141,14 @@ function sharePage() { ); } +function showAudio() { + if (audioPlayer.isAvailable()) { + audioPlayer.createMenuArray(); + }else { + chrome.showNotification("audio unavailable for this page"); + } +} + chrome.showNotification = function(text) { // Using PhoneGap-Toast plugin for Android's lightweight "Toast" style notifications. // https://github.com/m00sey/PhoneGap-Toast @@ -160,7 +168,7 @@ function updateMenuState() { 'go-forward': function() { chrome.goForward(); }, 'select-text': function() { selectText(); }, 'view-settings': function() { appSettings.showSettings(); }, - 'listen-sound': function() { audioPlayer.createMenuArray(); }, + 'listen-sound': function() { showAudio(); }, 'word-of-the-day': function() { chrome.loadWordoftheDay(); }, }; $('#appMenu command').each(function() { diff --git a/assets/www/index.html b/assets/www/index.html index b35356ce..8c0314b2 100644 --- a/assets/www/index.html +++ b/assets/www/index.html @@ -267,7 +267,7 @@