Skip to content

Commit

Permalink
Release v1.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshLipan committed Oct 30, 2018
1 parent a38baa8 commit 94f8187
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion android/src/io/jmrtc/android/JMRTCModule.java
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public class JMRTCModule extends ReactContextBaseJavaModule {

private Context mContext;
private JMTRCUtils mJMessageUtils;
private HashMap<String, SurfaceView> surfaceViewCache;
public static HashMap<String, SurfaceView> surfaceViewCache;

private JMRtcSession session;//通话数据元信息对象
boolean requestPermissionSended = false;
Expand Down
6 changes: 6 additions & 0 deletions android/src/io/jmrtc/android/RNJMRTCViewManager.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package io.jmrtc.android;

import android.util.Log;
import android.view.SurfaceView;
import android.widget.FrameLayout;

import com.facebook.react.uimanager.ThemedReactContext;
Expand All @@ -24,6 +25,11 @@ protected FrameLayout createViewInstance(ThemedReactContext reactContext) {
@ReactProp(name = "username")
public void setUsername(final FrameLayout view, String username) {
Log.i(TAG,"username:"+username);
SurfaceView surfaceView = JMRTCModule.surfaceViewCache.get(username);
if(surfaceView != null){
view.addView(surfaceView);
}

}

@Override
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "jmrtc-react-native",
"version": "1.0.1",
"version": "1.1.0",
"description": "a jmrtc plugin for react native application",
"main": "index.js",
"repository": {
Expand All @@ -12,7 +12,7 @@
"native",
"jmrtc"
],
"author": "huminiOS",
"author": "huminiOS,JoshLipan",
"license": "ISC",
"bugs": {
"url": "https://github.com/jpush/jmessage-react-plugin/issues"
Expand Down

0 comments on commit 94f8187

Please sign in to comment.