Skip to content

Commit

Permalink
添加使能重力适配接口
Browse files Browse the repository at this point in the history
Change-Id: I2c3f670bc14963fe925b6a8d01ee65eba4c94ecf
  • Loading branch information
SundoggyNew committed Apr 24, 2023
1 parent 3cf541b commit 1c4936f
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
import java.util.Map;

import static com.tencent.trtc.TRTCCloudDef.TRTC_GSENSOR_MODE_DISABLE;
import static com.tencent.trtc.TRTCCloudDef.TRTC_GSENSOR_MODE_UIAUTOLAYOUT;
import static com.tencent.trtc.TRTCCloudDef.TRTC_VIDEO_STREAM_TYPE_BIG;

/**
Expand Down Expand Up @@ -136,6 +137,14 @@ public void onFirstVideoFrame(String userId, int streamType, int width, int heig
}
};

public void setEnableGSensor(boolean enable) {
if (enable) {
mRTCCloud.setGSensorMode(TRTC_GSENSOR_MODE_UIAUTOLAYOUT);
} else {
mRTCCloud.setGSensorMode(TRTC_GSENSOR_MODE_DISABLE);
}
}

/**
* rtc 进房
*/
Expand Down

0 comments on commit 1c4936f

Please sign in to comment.