Skip to content

Commit

Permalink
Add reinitEngine API for Android
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshLipan committed Oct 15, 2018
1 parent 432d55d commit 6297bbf
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,22 @@ export default class JMRTCViewController {
JMRTCModule.initEngine(success,fail)
}

/**
* 获取权限后重新初始化引擎(Android only)。
* @param {Function} success = (res) => { }
* @param {Function} fail = (error) => { }
*/
static reinitEngine(success, fail) {
if (Platform.OS == "android") {
JMRTCModule.reinitEngine(success, fail);
}
}

/**
* 释放音视频引擎
*/
static releaseEngine() {
JMRTCModule.releaseEngine()
JMRTCModule.releaseEngine();
}

/**
Expand Down

0 comments on commit 6297bbf

Please sign in to comment.