|
@@ -14,7 +14,6 @@ import com.tencent.trtc.TRTCCloud;
|
|
import com.tencent.trtc.TRTCCloudDef;
|
|
import com.tencent.trtc.TRTCCloudDef;
|
|
import com.tencent.trtc.TRTCCloudListener;
|
|
import com.tencent.trtc.TRTCCloudListener;
|
|
|
|
|
|
-import org.json.JSONException;
|
|
|
|
import org.json.JSONObject;
|
|
import org.json.JSONObject;
|
|
|
|
|
|
import java.util.ArrayList;
|
|
import java.util.ArrayList;
|
|
@@ -121,7 +120,7 @@ public class TRTCSdkManager {
|
|
params.put("level", level);
|
|
params.put("level", level);
|
|
jsonObject.put("params", params);
|
|
jsonObject.put("params", params);
|
|
mCloud.callExperimentalAPI(jsonObject.toString());
|
|
mCloud.callExperimentalAPI(jsonObject.toString());
|
|
- } catch (JSONException e) {
|
|
|
|
|
|
+ } catch (Exception e) {
|
|
e.printStackTrace();
|
|
e.printStackTrace();
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -142,7 +141,7 @@ public class TRTCSdkManager {
|
|
params.put("level", level);
|
|
params.put("level", level);
|
|
jsonObject.put("params", params);
|
|
jsonObject.put("params", params);
|
|
mCloud.callExperimentalAPI(jsonObject.toString());
|
|
mCloud.callExperimentalAPI(jsonObject.toString());
|
|
- } catch (JSONException e) {
|
|
|
|
|
|
+ } catch (Exception e) {
|
|
e.printStackTrace();
|
|
e.printStackTrace();
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -163,7 +162,7 @@ public class TRTCSdkManager {
|
|
params.put("level", level);
|
|
params.put("level", level);
|
|
jsonObject.put("params", params);
|
|
jsonObject.put("params", params);
|
|
mCloud.callExperimentalAPI(jsonObject.toString());
|
|
mCloud.callExperimentalAPI(jsonObject.toString());
|
|
- } catch (JSONException e) {
|
|
|
|
|
|
+ } catch (Exception e) {
|
|
e.printStackTrace();
|
|
e.printStackTrace();
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -343,10 +342,12 @@ public class TRTCSdkManager {
|
|
|
|
|
|
public void setRemoteRenderParams(String targetId, int type, int fillMode, int mirrorType) {
|
|
public void setRemoteRenderParams(String targetId, int type, int fillMode, int mirrorType) {
|
|
// 将远端用户 denny 的主路画面设置为填充模式,并开启左右镜像模式
|
|
// 将远端用户 denny 的主路画面设置为填充模式,并开启左右镜像模式
|
|
- TRTCCloudDef.TRTCRenderParams param = new TRTCCloudDef.TRTCRenderParams();
|
|
|
|
- param.fillMode = fillMode;
|
|
|
|
- param.mirrorType = mirrorType;//TRTCCloudDef.TRTC_VIDEO_MIRROR_TYPE_DISABLE;
|
|
|
|
- mCloud.setRemoteRenderParams(targetId, type, param);
|
|
|
|
|
|
+ if (mCloud != null) {
|
|
|
|
+ TRTCCloudDef.TRTCRenderParams param = new TRTCCloudDef.TRTCRenderParams();
|
|
|
|
+ param.fillMode = fillMode;
|
|
|
|
+ param.mirrorType = mirrorType;//TRTCCloudDef.TRTC_VIDEO_MIRROR_TYPE_DISABLE;
|
|
|
|
+ mCloud.setRemoteRenderParams(targetId, type, param);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
public void stopRemoteView(String targetId, int type) {
|
|
public void stopRemoteView(String targetId, int type) {
|