1 Reply Latest reply on Sep 24, 2018 5:20 PM by natoc42364749

    cordova-plugin-media problem

    Jsulmar Level 1

      cordova-plugin-media 3.0.1 is installed, but Media constructor is not defined.  Any ideas why this plugin does not seem to be working for me?

        • 1. Re: cordova-plugin-media problem

          This is an old unanswered question. I'm surprised that even though this is an old question, I'm experiencing the same problem too. I'm getting this JS error (using Chrome's Android USB-debugging tool):

          Uncaught ReferenceError: Media is not defined

              at Channel.onDeviceReady (index.js:74)

              at Channel.fire (cordova.js:846)

              at cordova.js:231



          I have this in my config.xml

          <plugin name="cordova-plugin-file" spec="~6.0.1" />

          <plugin name="cordova-plugin-media" spec="~5.0.2" />


          I have the "new Media(src)" wrapped in an ondeviceready event.


          Running on actual Android Device (Android version 8.0).

          I used Phonegap Build to build the apk.


          If I run using the Phonegap Android Emulator, everything works fine.