MacGapProject / MacGap2

MacGap 2
MIT License
1.2k stars 84 forks source link

Supporting external displays? #59

Open Montoya opened 9 years ago

Montoya commented 9 years ago

Hi, I just finished integrating this cordova plugin with an iPad project, it was pretty easy: https://github.com/pearj/ExternalScreen-iOS

Would it be possible to do something similar in MacGap2? Has anyone done anything like this yet?

jeff-h commented 9 years ago

Hi — looks cool, but how do you see this translating to the desktop?

Montoya commented 9 years ago

Well the functionality should be very similar. You can connect a desktop or laptop to an external display using HDMI, lightning or airplay. If MacGap had an API for detecting external screens, like:

MacGap.ExternalScreen.setupScreenConnectionNotificationHandlers()

MacGap.ExternalScreen.loadHTMLResource()

MacGap.ExternalScreen.loadHTML()

MacGap.ExternalScreen.invokeJavaScript()

MacGap.ExternalScreen.checkExternalScreenAvailable()

MacGap.ExternalScreen.registerForNotifications()

then you could override the default mirroring behavior and show a second webview when an external screen is connected.