ChoiZ / NowPlaying

PhoneGap / Cordova iOS plugin that allows you to add metadatas in NowPlayingInfoCenter (MPNowPlayingInfoCenter) to your app [Discontinued]
10 stars 5 forks source link

Wont work with latest Cordova #1

Closed russellharrower closed 10 years ago

russellharrower commented 10 years ago

I am using the latest Cordova and I can not get it to work I have following step by step your instructions but with no success.

My code - Basiclly it runs or should run when the audio starts,

       window.onload = function() { playStream(); };
        function playStream() {
            try {
                var myaudio = new Audio('http://purr.ipetfindr.com:8080/queerdioAAC');
                myaudio.id = 'playerMyAdio';
                myaudio.play();
            } catch (e) {
                alert('no audio support!');
            }

            NowPlayingOnAir();

        }

app.initialize(); function NowPlayingOnAir(){ alert('Running');

            var nowPlaying = window.plugins.nowPlaying;
            artist = "Daft Punk";
            title = "One More Time";
            album = "Discovery";
            nowPlaying.updateMetas(artist,title,station);
        }
ChoiZ commented 10 years ago

I don't use phonegap 3.0.x. Maybe I have to do some fixes for this version. I try to setup phonegap 3.0.x this week end and I'll fix it ;)

russellharrower commented 10 years ago

thanks that would be great

ChoiZ commented 10 years ago

It's not as simple as I thought. If you have time, you can test with this doc: http://docs.phonegap.com/en/3.0.0/guide_platforms_ios_plugin.md.html#iOS%20Plugins

I can't setup phonegap 3 on my computer, I've got too many errors with nodejs. I'll try later…

wuuster commented 10 years ago

Hey ChoIZ,

I really would like to use this plugin. Any ideas why this isn't working for PhoneGap 3.0. I would really appreciate your help

wuuster commented 10 years ago

More so, I'm using HTML 5 Audio Tag to put out my Audio

ChoiZ commented 10 years ago

I use html5 too… so I can't setup Phonegap 3… I have open an issue on phonegap-cli.

I hope it's works soon on my computer.

wuuster commented 10 years ago

https://github.com/wuuster/NowPlaying-2.0

I wrote an updated version using your code for ios7 and phonegap 3

gauthierm commented 10 years ago

See PR #2. It will work with the cordova plugin command-line.

ChoiZ commented 10 years ago

Does it works with phonegap 3 too?

I'll try it and merge thanks

gauthierm commented 10 years ago

I'm using Cordova rather than PhoneGap but if I understand correctly, PhoneGap 3.0 is Cordova 3.0 + a couple of extra plugins.

wuuster commented 10 years ago

Same shit

ChoiZ commented 10 years ago

Thank you @wuuster for your commit. Sorry but the pull request made ​​by @gauthierm is more functional for phonegap 3/3 cordova with folders for each plateform, xml… I hope you understand my choice.

Thank you both for your work.