3 Replies Latest reply on Aug 18, 2016 2:26 PM by eddiel97215021

    I cant seem to get the plugin cordova-plugin-music-controls to work.

    eddiel97215021

      I'm trying to add audio controls to my app, but I can't.

      I put this in config.xml

         <plugin name="cordova-plugin-music-controls" source="npm" />

       

       

      and this in an inline script in index.html

                MusicControls.create({

          track       : 'Time is Running Out', // optional, default : ''

          artist      : 'Muse', // optional, default : ''

       

          isPlaying   : true, // optional, default : true

          dismissable : true, // optional, default : false

       

          // hide previous/next/close buttons:

          hasPrev   : false, // show previous button, optional, default: true

          hasNext   : false, // show next button, optional, default: true

          hasClose  : true, // show close button, optional, default: false

       

          // Android only, optional

          // text displayed in the status bar when the notification (and the ticker) are updated

          ticker   : 'Now playing "Time is Running Out"'

      }, onSuccess, onError);

       

       

      but I can't get it to work? anyone could help? If you could give me a zip of a project with the bare minumum to open the MusicControls, that would mean the world to me. I know javacript, but I can't figure out how to call the MusicControls.create function/