mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2024-11-29 22:55:52 +08:00
ok
This commit is contained in:
parent
8b83220ccd
commit
b5df0c6374
@ -82,3 +82,14 @@ Java_com_zlm_rtc_NativeLib_makePushUrl(JNIEnv *env, jobject thiz, jstring app, j
|
||||
sprintf(url,"https://zlmediakit.com/index/api/webrtc?app=%s&stream=%s&type=push",appString,streamIdString);
|
||||
return env->NewStringUTF(url);
|
||||
}
|
||||
|
||||
|
||||
extern "C"
|
||||
JNIEXPORT jstring JNICALL
|
||||
Java_com_zlm_rtc_NativeLib_makeEchoUrl(JNIEnv *env, jobject thiz, jstring app, jstring stream_id) {
|
||||
const char *appString = env->GetStringUTFChars(app, 0);
|
||||
const char *streamIdString = env->GetStringUTFChars(stream_id, 0);
|
||||
char url[100];
|
||||
sprintf(url,"https://zlmediakit.com/index/api/webrtc?app=%s&stream=%s&type=echo",appString,streamIdString);
|
||||
return env->NewStringUTF(url);
|
||||
}
|
@ -14,6 +14,8 @@ class NativeLib {
|
||||
|
||||
external fun makePushUrl(app:String,streamId:String): String
|
||||
|
||||
external fun makeEchoUrl(app:String,streamId:String): String
|
||||
|
||||
companion object {
|
||||
// Used to load the 'rtc' library on application startup.
|
||||
init {
|
||||
|
Loading…
Reference in New Issue
Block a user