Skip to content

Commit 1c4936f

Browse files
committed
添加使能重力适配接口
Change-Id: I2c3f670bc14963fe925b6a8d01ee65eba4c94ecf
1 parent 3cf541b commit 1c4936f

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

sdk/video-advanced-app-android/src/main/java/com/tencent/iot/video/link/rtc/impl/TIoTCoreXP2PBridge.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
import java.util.Map;
1717

1818
import static com.tencent.trtc.TRTCCloudDef.TRTC_GSENSOR_MODE_DISABLE;
19+
import static com.tencent.trtc.TRTCCloudDef.TRTC_GSENSOR_MODE_UIAUTOLAYOUT;
1920
import static com.tencent.trtc.TRTCCloudDef.TRTC_VIDEO_STREAM_TYPE_BIG;
2021

2122
/**
@@ -136,6 +137,14 @@ public void onFirstVideoFrame(String userId, int streamType, int width, int heig
136137
}
137138
};
138139

140+
public void setEnableGSensor(boolean enable) {
141+
if (enable) {
142+
mRTCCloud.setGSensorMode(TRTC_GSENSOR_MODE_UIAUTOLAYOUT);
143+
} else {
144+
mRTCCloud.setGSensorMode(TRTC_GSENSOR_MODE_DISABLE);
145+
}
146+
}
147+
139148
/**
140149
* rtc 进房
141150
*/

0 commit comments

Comments
 (0)