Skip to content

Commit

Permalink
Android Smart Update to 8.6.688
Browse files Browse the repository at this point in the history
  • Loading branch information
garyxgwang committed Apr 30, 2021
1 parent ef0a9a3 commit 3b63dd3
Show file tree
Hide file tree
Showing 14 changed files with 202 additions and 35 deletions.
4 changes: 2 additions & 2 deletions Android/Demo/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ android {
applicationId "com.tencent.liteav.demo"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 15
versionName "8.5.662"
versionCode 16
versionName "8.6.688"

multiDexEnabled true
ndk {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ protected void onCreate(Bundle savedInstanceState) {
setContentView(R.layout.activity_main);

mTvVersion = (TextView) findViewById(R.id.main_tv_version);
mTvVersion.setText(getString(R.string.app_tv_smart_version, TXLiveBase.getSDKVersionStr()+"(8.5.662)"));
mTvVersion.setText(getString(R.string.app_tv_smart_version, TXLiveBase.getSDKVersionStr()+"(8.6.688)"));

mMainTitle = (TextView) findViewById(R.id.main_title);
mMainTitle.setOnLongClickListener(new View.OnLongClickListener() {
Expand Down Expand Up @@ -111,12 +111,12 @@ public void onGroupClicked(GroupBean groupItem) {
public void onChildClicked(GroupBean groupItem, ChildBean childItem) {
if (childItem.mIconId == R.drawable.xiaoshipin) {
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setData(Uri.parse("https://dldir1.qq.com/hudongzhibo/liteav/XiaoShiPin.apk"));
intent.setData(Uri.parse("http://dldir1.qq.com/hudongzhibo/liteav/XiaoShiPin.apk"));
startActivity(intent);
return;
} else if (childItem.mIconId == R.drawable.xiaozhibo) {
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setData(Uri.parse("https://dldir1.qq.com/hudongzhibo/liteav/xiaozhibo.apk"));
intent.setData(Uri.parse("http://dldir1.qq.com/hudongzhibo/liteav/xiaozhibo.apk"));
startActivity(intent);
return;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,9 @@ public class AudioEffectPanel extends FrameLayout {
private ImageButton mImgbtnBGMPlay;
private TXAudioEffectManager mAudioEffectManager;
private BGMListener mBGMPlayListenr;
private static final String ONLINE_BGM_FIRST = "https://liteav.sdk.qcloud.com/app/res/bgm/testmusic1.mp3";
private static final String ONLINE_BGM_SECOND = "https://liteav.sdk.qcloud.com/app/res/bgm/testmusic2.mp3";
private static final String ONLINE_BGM_THIRD = "https://liteav.sdk.qcloud.com/app/res/bgm/testmusic3.mp3";
private static final String ONLINE_BGM_FIRST = "http://liteav.sdk.qcloud.com/app/res/bgm/testmusic1.mp3";
private static final String ONLINE_BGM_SECOND = "http://liteav.sdk.qcloud.com/app/res/bgm/testmusic2.mp3";
private static final String ONLINE_BGM_THIRD = "http://liteav.sdk.qcloud.com/app/res/bgm/testmusic3.mp3";

private int mBGMId = -1;
private float mPitch = 0;
Expand Down Expand Up @@ -390,7 +390,7 @@ private List<ItemEntity> createAudioChangeItems() {
list.add(new ItemEntity(getResources().getString(R.string.audio_effect_setting_changetype_luoli), R.drawable.audio_effect_setting_changetype_luoli, AUDIO_VOICECHANGER_TYPE_2));
list.add(new ItemEntity(getResources().getString(R.string.audio_effect_setting_changetype_dashu), R.drawable.audio_effect_setting_changetype_dashu, AUDIO_VOICECHANGER_TYPE_3));
list.add(new ItemEntity(getResources().getString(R.string.audio_effect_setting_changetype_metal), R.drawable.audio_effect_setting_changetype_metal, AUDIO_VOICECHANGER_TYPE_4));
list.add(new ItemEntity(getResources().getString(R.string.audio_effect_setting_changetype_sick), R.drawable.audio_effect_setting_changetype_sick, AUDIO_VOICECHANGER_TYPE_5));
// list.add(new ItemEntity(getResources().getString(R.string.audio_effect_setting_changetype_sick), R.drawable.audio_effect_setting_changetype_sick, AUDIO_VOICECHANGER_TYPE_5));
list.add(new ItemEntity(getResources().getString(R.string.audio_effect_setting_changetype_foreign), R.drawable.audio_effect_setting_changetype_foreign, AUDIO_VOICECHANGER_TYPE_6));
list.add(new ItemEntity(getResources().getString(R.string.audio_effect_setting_changetype_kunsou), R.drawable.audio_effect_setting_changetype_kunsou, AUDIO_VOICECHANGER_TYPE_7));
list.add(new ItemEntity(getResources().getString(R.string.audio_effect_setting_changetype_feizai), R.drawable.audio_effect_setting_changetype_feizai, AUDIO_VOICECHANGER_TYPE_8));
Expand Down
15 changes: 15 additions & 0 deletions Android/Demo/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ buildscript {
}
dependencies {
classpath 'com.android.tools.build:gradle:3.5.3'
if (!videoEngineSourcePath.isEmpty()) {
classpath 'me.tatarka:gradle-retrolambda:3.7.1'
}


// NOTE: Do not place your application dependencies here; they belong
Expand All @@ -30,13 +33,25 @@ task clean(type: Delete) {
delete rootProject.buildDir
}

if (!liteavSourcePath.isEmpty()) {
apply from: new File(getRootDir().getPath(), "../source_link_gradle/liteav_source_build.gradle").getAbsolutePath()
}

if (!videoEngineSourcePath.isEmpty()) {
apply from: new File(getRootDir().getPath(), "../source_link_gradle/videoengine_source_build.gradle").getAbsolutePath()
}

ext {
compileSdkVersion = 26
buildToolsVersion = "28.0.3"
supportSdkVersion = "26.0.1"
minSdkVersion = 19
targetSdkVersion = 26
if (!liteavSourcePath.isEmpty()) {
liteavSdk="com.tencent.liteavsdk:LiteAVSDK_Smart:latest.release"
} else {
liteavSdk="com.tencent.liteavsdk:LiteAVSDK_Smart:latest.release"
}
imSdk = 'com.tencent.imsdk:imsdk:4.9.1'
versionCode = 1
versionName = "v1.0"
Expand Down
6 changes: 6 additions & 0 deletions Android/Demo/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,10 @@ org.gradle.jvmargs=-Xmx1536m
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true

# 是否启用源码调试
# liteavSourcePath=/Users/aazgulhuang/Code/liteav-worktree/personal_parkhuang_develop_lvb
liteavSourcePath=

# 是否启用源码调试
#videoEngineSourcePath=/Users/aazgulhuang/Code/liteav-base/src/liteav
videoEngineSourcePath=
8 changes: 8 additions & 0 deletions Android/Demo/settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,11 @@ include ':audioeffectsettingkit'
include ':liveplayerdemo'
include ':livepusherdemo'
include ':livelinkmicdemoold'

if (!liteavSourcePath.isEmpty()) {
apply from: new File(settingsDir, '../source_link_gradle/liteav_source_settings.gradle').getAbsolutePath()
}

if (!videoEngineSourcePath.isEmpty()) {
apply from: new File(settingsDir, '../source_link_gradle/videoengine_source_settings.gradle').getAbsolutePath()
}
1 change: 1 addition & 0 deletions Android/XiaoZhiBo/audioeffectsettingkit/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile "com.android.support:appcompat-v7:$rootProject.ext.supportSdkVersion"
compile "com.android.support:recyclerview-v7:$rootProject.ext.supportSdkVersion"
compile "com.android.support:design:$rootProject.ext.supportSdkVersion"
compile 'de.hdodenhof:circleimageview:3.1.0'
compile rootProject.ext.liteavSdk
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
package com.tencent.liteav.audiosettingkit;

import android.content.Context;
import android.support.annotation.NonNull;
import android.support.design.widget.BottomSheetDialog;
import android.view.Window;

import com.tencent.liteav.audio.TXAudioEffectManager;

public class AudioEffectDialog extends BottomSheetDialog {

private AudioEffectPanel mAudioEffectPanel;

public AudioEffectDialog(@NonNull Context context) {
super(context);
initialize(context);
}

@Override
public void show() {
super.show();
mAudioEffectPanel.showAudioPanel();
}

@Override
public void cancel() {
super.cancel();
mAudioEffectPanel.hideAudioPanel();
}

@Override
public void dismiss() {
super.dismiss();
mAudioEffectPanel.hideAudioPanel();
}

private void initialize(Context context) {
mAudioEffectPanel = new AudioEffectPanel(context);
setContentView(mAudioEffectPanel);
Window window = getWindow();
if (window != null) {
window.findViewById(R.id.design_bottom_sheet).setBackgroundResource(android.R.color.transparent);
}
}

public void setAudioEffectManager(TXAudioEffectManager audioEffectManager) {
mAudioEffectPanel.setAudioEffectManager(audioEffectManager);
}

public void setOnAudioEffectPanelHideListener(AudioEffectPanel.OnAudioEffectPanelHideListener listener) {
mAudioEffectPanel.setOnAudioEffectPanelHideListener(listener);
}

public void setBackgroundColor(int color) {
mAudioEffectPanel.setBackgroundColor(color);
}

public void reset() {
mAudioEffectPanel.reset();
}

public void unInit() {
mAudioEffectPanel.unInit();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import android.graphics.drawable.Drawable;
import android.os.Handler;
import android.os.Looper;
import android.support.annotation.NonNull;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.util.AttributeSet;
Expand Down Expand Up @@ -81,9 +82,9 @@ public class AudioEffectPanel extends FrameLayout {
private ImageButton mImgbtnBGMPlay;
private TXAudioEffectManager mAudioEffectManager;
private BGMListener mBGMPlayListenr;
private static final String ONLINE_BGM_FIRST = "https://liteav.sdk.qcloud.com/app/res/bgm/testmusic1.mp3";
private static final String ONLINE_BGM_SECOND = "https://liteav.sdk.qcloud.com/app/res/bgm/testmusic2.mp3";
private static final String ONLINE_BGM_THIRD = "https://liteav.sdk.qcloud.com/app/res/bgm/testmusic3.mp3";
private static final String ONLINE_BGM_FIRST = "http://liteav.sdk.qcloud.com/app/res/bgm/testmusic1.mp3";
private static final String ONLINE_BGM_SECOND = "http://liteav.sdk.qcloud.com/app/res/bgm/testmusic2.mp3";
private static final String ONLINE_BGM_THIRD = "http://liteav.sdk.qcloud.com/app/res/bgm/testmusic3.mp3";

private int mBGMId = -1;
private float mPitch = 0;
Expand All @@ -96,15 +97,23 @@ public class AudioEffectPanel extends FrameLayout {
private int mVoiceChangerPosition = 0;
private int mVoiceReverbPosition = 0;

public AudioEffectPanel(@NonNull Context context) {
super(context);
initialize(context);
}

public AudioEffectPanel(Context context, AttributeSet attrs) {
super(context, attrs);
initialize(context);
}

private void initialize(Context context) {
mContext = context;
LayoutInflater.from(context).inflate(R.layout.audio_effect_panel, this);
initView();
}

private void initView() {

mMainPanel = (LinearLayout) findViewById(R.id.ll_panel);
mTvClosePanel = (TextView) findViewById(R.id.tv_close_panel);
mTvBGMVolume = (TextView) findViewById(R.id.tv_bgm_volume);
Expand Down Expand Up @@ -223,9 +232,12 @@ public void onClick(View v) {
mReverbItemEntityList = createReverbItems();
mBGMItemEntityList = createBGMItems();
// 选变声
mChangerRVAdapter = new RecyclerViewAdapter(mContext, mChangerItemEntityList, new OnItemClickListener() {
mChangerRVAdapter = new RecyclerViewAdapter(mChangerItemEntityList, new OnItemClickListener() {
@Override
public void onItemClick(int position) {
if (position == mChangerRVAdapter.getSelectPosition()) {
return;
}
int type = mChangerItemEntityList.get(position).mType;
Log.d(TAG, "select changer type " + type);
if (mAudioEffectManager != null) {
Expand All @@ -242,9 +254,12 @@ public void onItemClick(int position) {
mRVAuidoChangeType.setLayoutManager(layoutManager);
mRVAuidoChangeType.setAdapter(mChangerRVAdapter);
// 选混响
mReverbRVAdapter = new RecyclerViewAdapter(mContext, mReverbItemEntityList, new OnItemClickListener() {
mReverbRVAdapter = new RecyclerViewAdapter(mReverbItemEntityList, new OnItemClickListener() {
@Override
public void onItemClick(int position) {
if (position == mReverbRVAdapter.getSelectPosition()) {
return;
}
int type = mReverbItemEntityList.get(position).mType;
Log.d(TAG, "select reverb type " + type);
if (mAudioEffectManager != null) {
Expand Down Expand Up @@ -375,13 +390,14 @@ private List<ItemEntity> createAudioChangeItems() {
list.add(new ItemEntity(getResources().getString(R.string.audio_effect_setting_changetype_luoli), R.drawable.audio_effect_setting_changetype_luoli, AUDIO_VOICECHANGER_TYPE_2));
list.add(new ItemEntity(getResources().getString(R.string.audio_effect_setting_changetype_dashu), R.drawable.audio_effect_setting_changetype_dashu, AUDIO_VOICECHANGER_TYPE_3));
list.add(new ItemEntity(getResources().getString(R.string.audio_effect_setting_changetype_metal), R.drawable.audio_effect_setting_changetype_metal, AUDIO_VOICECHANGER_TYPE_4));
list.add(new ItemEntity(getResources().getString(R.string.audio_effect_setting_changetype_sick), R.drawable.audio_effect_setting_changetype_sick, AUDIO_VOICECHANGER_TYPE_5));
// list.add(new ItemEntity(getResources().getString(R.string.audio_effect_setting_changetype_sick), R.drawable.audio_effect_setting_changetype_sick, AUDIO_VOICECHANGER_TYPE_5));
list.add(new ItemEntity(getResources().getString(R.string.audio_effect_setting_changetype_foreign), R.drawable.audio_effect_setting_changetype_foreign, AUDIO_VOICECHANGER_TYPE_6));
list.add(new ItemEntity(getResources().getString(R.string.audio_effect_setting_changetype_kunsou), R.drawable.audio_effect_setting_changetype_kunsou, AUDIO_VOICECHANGER_TYPE_7));
list.add(new ItemEntity(getResources().getString(R.string.audio_effect_setting_changetype_feizai), R.drawable.audio_effect_setting_changetype_feizai, AUDIO_VOICECHANGER_TYPE_8));
list.add(new ItemEntity(getResources().getString(R.string.audio_effect_setting_changetype_dianliu), R.drawable.audio_effect_setting_changetype_dianliu, AUDIO_VOICECHANGER_TYPE_9));
list.add(new ItemEntity(getResources().getString(R.string.audio_effect_setting_changetype_machine), R.drawable.audio_effect_setting_changetype_machine, AUDIO_VOICECHANGER_TYPE_10));
list.add(new ItemEntity(getResources().getString(R.string.audio_effect_setting_changetype_kongling), R.drawable.audio_effect_setting_changetype_kongling, AUDIO_VOICECHANGER_TYPE_11));
list.get(0).mIsSelected = true;
return list;
}

Expand All @@ -395,6 +411,7 @@ private List<ItemEntity> createReverbItems() {
list.add(new ItemEntity(getResources().getString(R.string.audio_effect_setting_reverbtype_hongliang), R.drawable.audio_effect_setting_reverbtype_hongliang, AUDIO_REVERB_TYPE_5));
list.add(new ItemEntity(getResources().getString(R.string.audio_effect_setting_reverbtype_heavymetal), R.drawable.audio_effect_setting_reverbtype_heavymetal, AUDIO_REVERB_TYPE_6));
list.add(new ItemEntity(getResources().getString(R.string.audio_effect_setting_reverbtype_cixing), R.drawable.audio_effect_setting_reverbtype_cixing, AUDIO_REVERB_TYPE_7));
list.get(0).mIsSelected = true;
return list;
}

Expand All @@ -411,16 +428,13 @@ public ItemEntity(String title, int iconId, int type) {
}
}

public class RecyclerViewAdapter extends
RecyclerView.Adapter<RecyclerViewAdapter.ViewHolder> {
public class RecyclerViewAdapter extends RecyclerView.Adapter<RecyclerViewAdapter.ViewHolder> {

private Context context;
private List<ItemEntity> list;
private OnItemClickListener onItemClickListener;
private int selectPosition = 0;

public RecyclerViewAdapter(Context context, List<ItemEntity> list,
OnItemClickListener onItemClickListener) {
this.context = context;
public RecyclerViewAdapter(List<ItemEntity> list, OnItemClickListener onItemClickListener) {
this.list = list;
this.onItemClickListener = onItemClickListener;
}
Expand All @@ -439,6 +453,7 @@ public void bind(final ItemEntity model, final int position,
mItemImg.setImageResource(model.mIconId);
mTitleTv.setText(model.mTitle);
if (model.mIsSelected) {
selectPosition = position;
mItemImg.setBorderWidth(4);
mItemImg.setBorderColor(getResources().getColor(R.color.white));
mTitleTv.setTextColor(getResources().getColor(R.color.white));
Expand Down Expand Up @@ -481,13 +496,17 @@ public int getItemCount() {
return list.size();
}

public int getSelectPosition() {
return selectPosition;
}

}

private List<BGMItemEntity> createBGMItems() {
List<BGMItemEntity> list = new ArrayList<>();
list.add(new BGMItemEntity("环绕声测试1", ONLINE_BGM_FIRST, "佚名"));
list.add(new BGMItemEntity("环绕声测试2", ONLINE_BGM_SECOND, "佚名"));
list.add(new BGMItemEntity("环绕声测试3", ONLINE_BGM_THIRD, "佚名"));
list.add(new BGMItemEntity(getResources().getString(R.string.audio_effect_setting_surround_sound_test_1), ONLINE_BGM_FIRST, getResources().getString(R.string.audio_effect_setting_unknown)));
list.add(new BGMItemEntity(getResources().getString(R.string.audio_effect_setting_surround_sound_test_2), ONLINE_BGM_SECOND, getResources().getString(R.string.audio_effect_setting_unknown)));
list.add(new BGMItemEntity(getResources().getString(R.string.audio_effect_setting_surround_sound_test_3), ONLINE_BGM_THIRD, getResources().getString(R.string.audio_effect_setting_unknown)));
return list;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,10 @@

<TextView
android:layout_width="match_parent"
android:layout_height="40dp"
android:layout_height="wrap_content"
android:gravity="center"
android:padding="10dp"
android:text="音效设置"
android:text="@string/audio_effect_setting_title"
android:textColor="@android:color/white"
android:textSize="16sp" />

Expand Down
Loading

0 comments on commit 3b63dd3

Please sign in to comment.