How do you load and use the Media plugin in Ionic 2


I’m trying to use the cordova media plugin in Ionic 2 but can’t figure out how to do it.

I’ve tried every form of import {…} from ‘…’ I can think of nothing.

I’ve tried to include it by just using globals like: $Media, $cordovaMedia $window.Media etc.

I dug through the ionic-native package, but found nothing.

What am I doing wrong?

From the command line, I’ve done this:
ionic plugin add

How do I make this thing load so I can call something like this:
let media = new Media(‘blah.mp3’);;


Bump. I have the same question. Trying to use the Media plugin but no idea how to import it. Anyone?


the same problem for me! I just would like to play a sound in ionic2.


This foruim dead? Still no answer :frowning:


see on my chifoumi(Rock, paper, scissors) I play a soon with ionic2 when you win