【问题标题】:ngCordova capture not working on devicengCordova 捕获无法在设备上运行
【发布时间】:2015-11-04 00:52:21
【问题描述】:

我正在尝试使用 Ionic 和 ngCordova 录制音频。

这是我的代码: $scope.captureAudio = 函数() { var options = { 限制:3,持续时间:10 };

$cordovaCapture.captureAudio(options).then(function(audioData) {
  // Success! Audio data is here
  alert(audioData);
  console.log(audioData);
}, function(err) {
  // An error occurred. Show a message to the user
  alert(err);
});
};

当我在模拟器中运行它时,它可以正常工作并调出录音机,录音完成后它会注销 audioData。

当我将它上传到 ionic 视图并运行它时,我什么也得不到。甚至没有错误。

以前有人见过这样的吗?

谢谢 凯文

【问题讨论】:

    标签: javascript ios ionic hybrid-mobile-app ngcordova


    【解决方案1】:

    离子视图尚不支持$cordovaCapture 插件。

    请在link 中查看支持的插件列表。

    您可以使用运行命令直接在设备中运行代码。

    离子运行安卓

    【讨论】:

      猜你喜欢
      • 2016-12-18
      • 2015-10-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多