0

I created a PhoneGap/Cordova app for iPad and I want to share specific images from the app via AirPlay to a second screen (A PC or Mac running AirServer (see http://www.airserver.com)).

So I installed the PhoneGap plugin "ExternalScreen":

So within my app I called the following code to see if it works (AirPlay is already connected to AirServer and mirroring is on. I can see the screen content of the iPad on my AirServer instance):

PGExternalScreen.loadHTML('HELLO', function(e){
    alert(e);
}, function(){
    alert(e);
});

The code above will always alert 'External Web View Unavailable'.

But the funny thing is, the following code will alert 'available':

PGExternalScreen.checkExternalScreenAvailable(function(){
    alert('available');
}, function(){
    alert('not available');
});

What's wrong?

Timo Ernst
  • 15,243
  • 23
  • 104
  • 165

1 Answers1

0

Ok, I found the reason for this problem. I forgot to call this to initialize

PGExternalScreen.setupScreenConnectionNotificationHandlers(success, fail);

RTFM, I guess :-(

Timo Ernst
  • 15,243
  • 23
  • 104
  • 165