【发布时间】:2015-02-24 10:05:22
【问题描述】:
我为 iPad 创建了一个 PhoneGap/Cordova 应用程序,我想通过 AirPlay 将应用程序中的特定图像共享到第二个屏幕(运行 AirServer 的 PC 或 Mac(请参阅http://www.airserver.com))。
于是我安装了PhoneGap插件“ExternalScreen”:
网站: http://www.tricedesigns.com/2012/01/12/multi-screen-ios-apps-with-phonegap/
Github:https://github.com/triceam/phonegap-plugins/tree/master/iPhone/ExternalScreen
所以在我的应用程序中,我调用了以下代码以查看它是否有效(AirPlay 已经连接到 AirServer 并且镜像已打开。我可以在我的 AirServer 实例上看到 iPad 的屏幕内容):
PGExternalScreen.loadHTML('HELLO', function(e){
alert(e);
}, function(){
alert(e);
});
上面的代码总是会提示“External Web View Unavailable”。
但有趣的是,下面的代码会提示'available':
PGExternalScreen.checkExternalScreenAvailable(function(){
alert('available');
}, function(){
alert('not available');
});
怎么了?
【问题讨论】:
-
我也试过 Reflector (airsquirrels.com/reflector) 而不是 AirServer 但结果相同:-(
标签: javascript cordova airplay airserver