Skip to content

Commit

Permalink
Update Android MLVB-API-Example
Browse files Browse the repository at this point in the history
  • Loading branch information
garyxgwang committed Sep 1, 2021
1 parent b0412d9 commit 1bd6c63
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
6 changes: 3 additions & 3 deletions Android/MLVB-API-Example/App/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ android {
applicationId "com.tencent.mlvb.apiexample"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 20
versionName "9.0.857"
versionCode 22
versionName "9.1.1084"
multiDexEnabled true
ndk {
abiFilters "armeabi-v7a", "arm64-v8a"
Expand All @@ -27,7 +27,7 @@ dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'com.android.support:multidex:1.0.1'
implementation 'androidx.multidex:multidex:2.0.0'
implementation rootProject.ext.liteavSdk
implementation project(':Debug')
implementation project(':Basic:LivePushCamera')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,9 @@ public boolean onMenuItemClick(MenuItem item) {
mResolutionFlag = V2TXLiveDef.V2TXLiveVideoResolution.V2TXLiveVideoResolution1920x1080;
mTextResolution.setText("1080P");
}
mLivePusher.setVideoQuality(mResolutionFlag, V2TXLiveDef.V2TXLiveVideoResolutionMode.V2TXLiveVideoResolutionModePortrait);
V2TXLiveDef.V2TXLiveVideoEncoderParam param = new V2TXLiveDef.V2TXLiveVideoEncoderParam(mResolutionFlag);
param.videoResolutionMode = V2TXLiveDef.V2TXLiveVideoResolutionMode.V2TXLiveVideoResolutionModePortrait;
mLivePusher.setVideoQuality(param);
}else{
Toast.makeText(LivePushCameraActivity.this, getString(R.string.livepushcamera_please_ensure_pushing), Toast.LENGTH_SHORT).show();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ public class AddressUtils {

public static final String WEBRTC = "webrtc://";
public static final String RTMP = "rtmp://";
public static final String HTTP = "http://";
public static final String PUSH_DOMAIN = "PLACEHOLDER";
public static final String PLAY_DOMAIN = "PLACEHOLDER";
public static final String KEY = "PLACEHOLDER";
Expand Down Expand Up @@ -58,7 +59,7 @@ public static String generatePlayUrl(String streamId, String userId, int type){
if(type == 0){
playUrl = "trtc://cloud.tencent.com/play/" + streamId + "?sdkappid=" + GenerateTestUserSig.SDKAPPID + "&userid=" + userId + "&usersig=" + GenerateTestUserSig.genTestUserSig(userId);
}else if(type == 1){
playUrl = RTMP + PLAY_DOMAIN + File.separator + APP_NAME + File.separator + streamId;
playUrl = HTTP + PLAY_DOMAIN + File.separator + APP_NAME + File.separator + streamId + ".flv";
}else if(type == 2){
playUrl = WEBRTC + PLAY_DOMAIN + File.separator + APP_NAME + File.separator + streamId;
}
Expand Down

0 comments on commit 1bd6c63

Please sign in to comment.