Вопрос по jquery, android – Phonegap Media API (Android) - медиа не определено

11

Error: User Rate Limit Exceeded

Error: User Rate Limit Exceeded

Uncaught ReferenceError: Media is not defined at
file:///android_asset/www/script.js:3

Here is my code:

$(document).ready(function(){
  var myMedia = new Media("/android_asset/www/one.mp3");

  $('.one').click(function(){ 
    myMedia.play();
  });
});

Error: User Rate Limit Exceeded

Ваш Ответ

1   ответ
19

Media

<script type="text/javascript">

var myMedia = null;
document.addEventListener("deviceready",onDeviceReady,false);

function onDeviceReady () {
    myMedia = new Media("/android_asset/www/one.mp3", 
        function(){
            if (myMedia) {
                myMedia.stop();
                myMedia.release();
            }
        }, 
        function(error){
            console.log(error.message);
        }
    );
}

$(document).ready(function(){
    $('.one').click(function(event){ 
        myMedia.play();
    });
});

</script>
Error: User Rate Limit Exceeded
Error: User Rate Limit Exceeded user1328173

Похожие вопросы