【问题标题】:PhoneGap/Cordova ExternalScreen plugin states "External Web View unavailable"PhoneGap/Cordova ExternalScreen 插件状态“外部 Web 视图不可用”
【发布时间】:2015-02-24 10:05:22
【问题描述】:

我为 iPad 创建了一个 PhoneGap/Cordova 应用程序,我想通过 AirPlay 将应用程序中的特定图像共享到第二个屏幕(运行 AirServer 的 PC 或 Mac(请参阅http://www.airserver.com))。

于是我安装了PhoneGap插件“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');
});

怎么了?

【问题讨论】:

标签: javascript cordova airplay airserver


【解决方案1】:

好的,我找到了这个问题的原因。我忘了调用它来初始化

PGExternalScreen.setupScreenConnectionNotificationHandlers(success, fail);

RTFM,我猜 :-(

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-10-01
    • 1970-01-01
    • 1970-01-01
    • 2015-02-02
    • 1970-01-01
    相关资源
    最近更新 更多