1
ionic3のphoneRTCを使用してリアルタイムの音声通話アプリを作成しています。Cordovaプラグインのインポート
は、私が今
<plugin name="com.dooble.phonertc" spec="~2.0.1" />
をからconfig.xmlには、次のコマンド私のpackage.json
"cordova": {
"plugins": {
"com.dooble.phonertc": {}
}
}
と次に次の行を追加します
ionic cordova plugin add cordova-plugin-phonertc --save
を使用してコルドバプラグインを追加しました私はhome.tsファイルでこれをどのように使用したり、インポートしたりするのか分かりません。上記の方法は、あなたが動作しません場合は
:
.TS
declare var cordova;
@Component({
})
export class Page2 {
constructor(public platform: Platform) {
}
getMyPluginInfo() {
this.platform.ready().then(() => {//this is very important
cordova.plugins.yourPlugin.YourPluginMethod();//replace plugin's name with this `yourPlugin` and `YourPluginMethod` with plugin's method which you want
});
}
}
注:phonertc
以来