@donniefitz2 wrote:
I'm loosing hope. Please help me from having to use Xamarin
I'm trying to use the cordova media plugin with Ionic 2, but for the life of me, I can't figure out how to get a reference to the Media object for that plugin. Every piece of advice I have gotten for this problem informs me that you don't have to do anything special to reference plugins (no imports or anything).
Given that advice, I should be able to just use something like:
let myMedia = new Media()
anywhere in my app. But it simply does not exist. I've tried window.Media. Still nothing. I have no idea how to reference this plugin's object.I'm on the latest version of Ionic 2 beta with TypeScript. I've un-installed and re-installed the plugin to no avail. Below is the very brief snippet of code I'm trying to set up:
export class SoundService { constructor() { let media = new Media(); // this does not exist. } }
Thanks
Posts: 1
Participants: 1