Reputation: 15983
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":
Website: http://www.tricedesigns.com/2012/01/12/multi-screen-ios-apps-with-phonegap/
Github: https://github.com/triceam/phonegap-plugins/tree/master/iPhone/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?
Upvotes: 0
Views: 290
Reputation: 15983
Ok, I found the reason for this problem. I forgot to call this to initialize
PGExternalScreen.setupScreenConnectionNotificationHandlers(success, fail);
RTFM, I guess :-(
Upvotes: 0