Skip to content

Commit a4ca3ba

Browse files
committed
Fix bug, update sdk.
1 parent 81af041 commit a4ca3ba

File tree

76 files changed

+3277
-136
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

76 files changed

+3277
-136
lines changed

Demo/app/build.gradle

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ android {
88
applicationId "com.tencent.liteav.demo"
99
minSdkVersion rootProject.ext.minSdkVersion
1010
targetSdkVersion rootProject.ext.targetSdkVersion
11-
versionCode 14
12-
versionName "9.2.1029"
11+
versionCode 24
12+
versionName "9.3.1169"
1313

1414
multiDexEnabled true
1515
ndk {
@@ -63,6 +63,4 @@ dependencies {
6363
exclude group: 'com.google.code.gson', module: 'gson'
6464
})
6565

66-
compile 'com.tencent.bugly:crashreport_upgrade:1.5.1'
67-
compile 'com.tencent.bugly:nativecrashreport:3.8.0'
6866
}

Demo/app/proguard-rules.pro

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -20,27 +20,3 @@
2020
# hide the original source file name.
2121
#-renamesourcefileattribute SourceFile
2222
-keep class com.tencent.** { *; }
23-
24-
-dontwarn com.tencent.bugly.**
25-
-keep public class com.tencent.bugly.**{*;}
26-
27-
-keep public class * extends com.qq.taf.jce.JceStruct{*;}
28-
29-
#wup的协议包:
30-
-keep public class com.qq.jce.*{
31-
public * ;
32-
protected * ;
33-
}
34-
35-
#native jni接口
36-
-keepclasseswithmembernames class * {
37-
native <methods>;
38-
}
39-
40-
#native 回调接口
41-
-keep public interface com.tencent.feedback.eup.jni.NativeExceptionHandler{
42-
*;
43-
}
44-
-keep public class com.tencent.feedback.eup.jni.NativeExceptionUpload{
45-
*;
46-
}
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
[00:00.00]北京欢迎你
2+
[00:02.96]作词:林夕 作曲:小柯
3+
[00:03.65]演唱:群星
4+
[00:05.96]
5+
[00:13.88](陈天佳)迎接另一个晨曦 带来全新空气
6+
[00:19.66](刘欢)气息改变情味不变 茶香飘满情谊
7+
[00:25.71](那英)我家大门常打开 开放怀抱等你
8+
[00:31.82](孙燕姿)拥抱过就有了默契 你会爱上这里
9+
[00:38.04](孙悦)不管远近都是客人 请不用客气
10+
[00:43.79](王力宏)相约好了再一起 我们欢迎你
11+
[00:50.14](韩红)我家种着万年青 开放每段传奇
12+
[00:55.92](周华健)为传统的土壤播种 为你留下回忆
13+
[01:02.31](梁咏琪)陌生熟悉都是客人 请不用拘礼
14+
[01:08.13](羽泉)第几次来没关系 有太多话题
15+
[01:15.86](成龙)北京欢迎你 为你开天辟地
16+
[01:22.54](任贤齐)流动中的魅力充满着朝气
17+
[01:28.77](蔡依林)北京欢迎你 在太阳下分享呼吸
18+
[01:35.14](孙楠)在黄土地刷新成绩
19+
[01:40.43]
20+
[02:05.36](周笔畅)我家大门常打开 开怀容纳天地
21+
[02:11.71](韦唯)岁月绽放青春笑容 迎接这个日期
22+
[02:17.76](黄晓明)天大地大都是朋友 请不用客气
23+
[02:23.72](韩庚)画意诗情带笑意 只为等待你
24+
[02:29.34](汪峰)北京欢迎你 像音乐感动你
25+
[02:35.36](莫文蔚)让我们都加油去超越自己
26+
[02:41.51](谭晶)北京欢迎你 有梦想谁都了不起
27+
[02:48.02](陈奕迅)有勇气就会有奇迹
28+
[02:53.87](阎维文)北京欢迎你 为你开天辟地
29+
[02:59.69](戴玉强)流动中的魅力充满着朝气
30+
[03:05.84](王霞.李双松)北京欢迎你 在太阳下分享呼吸
31+
[03:12.26](廖昌永)在黄土地刷新成绩
32+
[03:18.17](林依轮)北京欢迎你 像音乐感动你
33+
[03:23.96](张娜拉)让我们都加油去超越自己
34+
[03:29.78](林俊杰)北京欢迎你 有梦想谁都了不起
35+
[03:36.60](阿杜)有勇气就会有奇迹
36+
[03:41.74](京剧) 北京欢迎你呀
37+
[03:49.33](容祖儿)我家大门常打开 开放怀抱等你
38+
[03:55.11](李宇春)拥抱过就有了默契 你会爱上这里
39+
[04:01.38](黄大炜)不管远近都是客人 请不用客气
40+
[04:07.34](陈坤)相约好了再一起 我们欢迎你
41+
[04:12.96](谢霆锋)北京欢迎你 为你开天辟地
42+
[04:18.74](韩磊)流动中的魅力充满着朝气
43+
[04:24.89](徐若瑄)北京欢迎你 在太阳下分享呼吸
44+
[04:31.32](费翔)在黄土地刷新成绩
45+
[04:36.61]
46+
[05:02.12](汤灿)我家大门常打开 开怀容纳天地
47+
[05:08.22](林志玲 张梓琳)岁月绽放青春笑容 迎接这个日期
48+
[05:14.18](张靓颖)天大地大都是朋友 请不用客气
49+
[05:20.25](许茹芸 伍思凯)画意诗情带笑意 只为等待你
50+
[05:25.92](杨坤.范玮琪)北京欢迎你 像音乐感动你
51+
[05:31.55](游鸿明.周晓欧)让我们都加油去超越自己
52+
[05:37.80](沙宝亮.满文军)北京欢迎你 有梦想谁都了不起
53+
[05:44.32](金海心.何润东)有勇气就会有奇迹
54+
[05:50.18](飞儿.庞龙)北京欢迎你 为你开天辟地
55+
[05:55.92](吴克群.齐峰)流动中的魅力充满着朝气
56+
[06:02.18](5566.胡彦斌)北京欢迎你 在太阳下分享呼吸
57+
[06:08.59](郑希怡.刀郎)在黄土地刷新成绩
58+
[06:14.46](纪敏 屠洪刚 吴彤)北京欢迎你 像音乐感动你
59+
[06:20.27](郭容 刘耕宏 腾格尔)让我们都加油去超越自己
60+
[06:26.61](金莎 苏醒 韦嘉)北京欢迎你 有梦想谁都了不起
61+
[06:33.06](付丽珊 黄征 房祖明)有勇气就会有奇迹
62+
[06:39.04](全体)北京欢迎你 有梦想谁都了不起
63+
[06:45.14](全体)有勇气就会有奇迹
64+
[06:50.87](全体)北京欢迎你 有梦想谁都了不起
65+
[06:57.13](全体)有勇气就会有奇迹
66+
[07:13.08]
16.7 MB
Binary file not shown.
Lines changed: 13 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,20 @@
11
package com.tencent.liteav.demo;
22

3-
import android.app.ApplicationErrorReport;
43
import android.content.Context;
54
import android.os.Build;
65
import android.os.StrictMode;
6+
77
import androidx.multidex.MultiDexApplication;
8-
import android.util.Log;
98

10-
import com.tencent.bugly.Bugly;
11-
import com.tencent.bugly.beta.Beta;
12-
import com.tencent.bugly.beta.download.DownloadListener;
13-
import com.tencent.bugly.beta.download.DownloadTask;
14-
import com.tencent.bugly.beta.upgrade.UpgradeStateListener;
15-
import com.tencent.bugly.crashreport.CrashReport;
169
import com.tencent.rtmp.TXLiveBase;
10+
import com.tencent.rtmp.TXLiveBaseListener;
1711

1812
import java.lang.reflect.Constructor;
1913
import java.lang.reflect.Field;
2014
import java.lang.reflect.Method;
2115

2216
public class DemoApplication extends MultiDexApplication {
23-
private static String TAG = "DemoApplication";
24-
private static final String BUGLY_APPID = ""; //配置bugly组件的appId
25-
private static final String BUGLY_APP_CHANNEL = ""; // 配置bugly组件的APP渠道号
26-
private static final boolean BUGLY_ENABLE_DEBUG = true; //配置bugly组件的调试模式(true或者false)
17+
private static String TAG = "DemoApplication";
2718

2819
// private RefWatcher mRefWatcher;
2920
private static DemoApplication instance;
@@ -41,9 +32,17 @@ public void onCreate() {
4132
mAppContext = this.getApplicationContext();
4233
instance = this;
4334

44-
TXLiveBase.setConsoleEnabled(true);
45-
initBugly();
35+
4636
TXLiveBase.getInstance().setLicence(instance, licenceUrl, licenseKey);
37+
TXLiveBase.setListener(new TXLiveBaseListener() {
38+
@Override
39+
public void onUpdateNetworkTime(int errCode, String errMsg) {
40+
if (errCode != 0) {
41+
TXLiveBase.updateNetworkTime();
42+
}
43+
}
44+
});
45+
TXLiveBase.updateNetworkTime();
4746

4847
// 短视频licence设置
4948
StrictMode.VmPolicy.Builder builder = new StrictMode.VmPolicy.Builder();
@@ -78,57 +77,4 @@ private void closeAndroidPDialog() {
7877
e.printStackTrace();
7978
}
8079
}
81-
82-
//配置bugly组件的APP ID,bugly组件为腾讯提供的用于crash上报,分析和升级的开放组件,如果您不需要该组件,可以自行移除
83-
private void initBugly() {
84-
CrashReport.UserStrategy strategy = new CrashReport.UserStrategy(getApplicationContext());
85-
strategy.setAppVersion(TXLiveBase.getSDKVersionStr());
86-
strategy.setAppChannel(BUGLY_APP_CHANNEL);
87-
//监听安装包下载状态
88-
Beta.downloadListener = new DownloadListener() {
89-
@Override
90-
public void onReceive(DownloadTask downloadTask) {
91-
}
92-
93-
@Override
94-
public void onCompleted(DownloadTask downloadTask) {
95-
Log.d(TAG, "downloadListener download apk file success");
96-
}
97-
98-
@Override
99-
public void onFailed(DownloadTask downloadTask, int i, String s) {
100-
Log.d(TAG, "downloadListener download apk file fail");
101-
}
102-
};
103-
104-
//监听APP升级状态
105-
Beta.upgradeStateListener = new UpgradeStateListener() {
106-
@Override
107-
public void onUpgradeFailed(boolean b) {
108-
Log.d(TAG, "upgradeStateListener upgrade failed");
109-
}
110-
111-
@Override
112-
public void onUpgradeSuccess(boolean b) {
113-
Log.d(TAG, "upgradeStateListener upgrade success");
114-
}
115-
116-
@Override
117-
public void onUpgradeNoVersion(boolean b) {
118-
Log.d(TAG, "upgradeStateListener upgrade has no new version");
119-
}
120-
121-
@Override
122-
public void onUpgrading(boolean b) {
123-
Log.d(TAG, "upgradeStateListener upgrading");
124-
}
125-
126-
@Override
127-
public void onDownloadCompleted(boolean b) {
128-
Log.d(TAG, "upgradeStateListener download apk file success");
129-
}
130-
};
131-
Bugly.init(getApplicationContext(), BUGLY_APPID, BUGLY_ENABLE_DEBUG, strategy);
132-
}
133-
13480
}

Demo/app/src/main/java/com/tencent/liteav/demo/MainActivity.java

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,19 @@
77
import android.net.Uri;
88
import android.os.AsyncTask;
99
import android.os.Bundle;
10-
import androidx.recyclerview.widget.LinearLayoutManager;
11-
import androidx.recyclerview.widget.RecyclerView;
1210
import android.util.Log;
1311
import android.view.LayoutInflater;
1412
import android.view.View;
1513
import android.view.ViewGroup;
1614
import android.widget.ImageView;
1715
import android.widget.TextView;
1816

17+
import androidx.recyclerview.widget.LinearLayoutManager;
18+
import androidx.recyclerview.widget.RecyclerView;
1919

2020
import com.tencent.liteav.demo.common.widget.expandableadapter.BaseExpandableRecyclerViewAdapter;
2121
import com.tencent.liteav.demo.player.demo.SuperPlayerActivity;
22+
import com.tencent.liteav.demo.player.demo.shortvideo.view.ShortVideoActivity;
2223
import com.tencent.rtmp.TXLiveBase;
2324

2425
import java.io.File;
@@ -34,9 +35,9 @@
3435
public class MainActivity extends Activity {
3536
private static final String TAG = "MainActivity";
3637

37-
private TextView mMainTitle;
38-
private TextView mTvVersion;
39-
private RecyclerView mRvList;
38+
private TextView mMainTitle;
39+
private TextView mTvVersion;
40+
private RecyclerView mRvList;
4041
private MainExpandableAdapter mAdapter;
4142

4243
@Override
@@ -52,7 +53,7 @@ protected void onCreate(Bundle savedInstanceState) {
5253
setContentView(R.layout.activity_main);
5354

5455
mTvVersion = (TextView) findViewById(R.id.main_tv_version);
55-
mTvVersion.setText(getString(R.string.app_tv_super_player_version, TXLiveBase.getSDKVersionStr()+"(9.2.1029)"));
56+
mTvVersion.setText(getString(R.string.app_tv_super_player_version, TXLiveBase.getSDKVersionStr()+"(9.3.1169)"));
5657

5758
mMainTitle = (TextView) findViewById(R.id.main_title);
5859
mMainTitle.setOnLongClickListener(new View.OnLongClickListener() {
@@ -137,6 +138,7 @@ private List<GroupBean> initGroupData() {
137138
// 初始化播放器
138139
List<ChildBean> playerChildList = new ArrayList<>();
139140
playerChildList.add(new ChildBean(getString(R.string.app_item_super_player), R.drawable.play, 3, SuperPlayerActivity.class));
141+
playerChildList.add(new ChildBean(getString(R.string.app_item_shortvideo_player), R.drawable.play, 3, ShortVideoActivity.class));
140142
if (playerChildList.size() != 0) {
141143
GroupBean playerGroupBean = new GroupBean(getString(R.string.app_item_player), R.drawable.composite, playerChildList);
142144
groupList.add(playerGroupBean);
@@ -148,7 +150,7 @@ private List<GroupBean> initGroupData() {
148150

149151
private static class MainExpandableAdapter extends BaseExpandableRecyclerViewAdapter<GroupBean, ChildBean, GroupVH, ChildVH> {
150152
private List<GroupBean> mListGroupBean;
151-
private GroupBean mGroupBean;
153+
private GroupBean mGroupBean;
152154

153155
public void setSelectedChildBean(GroupBean groupBean) {
154156
boolean isExpand = isExpand(groupBean);
@@ -222,7 +224,7 @@ public void onBindChildViewHolder(ChildVH holder, GroupBean groupBean, ChildBean
222224

223225
public static class GroupVH extends BaseExpandableRecyclerViewAdapter.BaseGroupViewHolder {
224226
ImageView ivLogo;
225-
TextView textView;
227+
TextView textView;
226228

227229
GroupVH(View itemView) {
228230
super(itemView);
@@ -238,7 +240,7 @@ protected void onExpandStatusChanged(RecyclerView.Adapter relatedAdapter, boolea
238240

239241
public static class ChildVH extends RecyclerView.ViewHolder {
240242
TextView textView;
241-
View divideView;
243+
View divideView;
242244

243245
ChildVH(View itemView) {
244246
super(itemView);
@@ -249,9 +251,9 @@ public static class ChildVH extends RecyclerView.ViewHolder {
249251
}
250252

251253
private class GroupBean implements BaseExpandableRecyclerViewAdapter.BaseGroupBean<ChildBean> {
252-
private String mName;
254+
private String mName;
253255
private List<ChildBean> mChildList;
254-
private int mIconId;
256+
private int mIconId;
255257

256258
public GroupBean(String name, int iconId, List<ChildBean> list) {
257259
mName = name;
@@ -289,9 +291,9 @@ public int getIconId() {
289291

290292
private class ChildBean {
291293
public String mName;
292-
public int mIconId;
293-
public Class mTargetClass;
294-
public int mType;
294+
public int mIconId;
295+
public Class mTargetClass;
296+
public int mType;
295297

296298
public ChildBean(String name, int iconId, int type, Class targetActivityClass) {
297299
this.mName = name;

Demo/app/src/main/res/layout/app_activity_my_info.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@
4343
android:id="@+id/tv_show_name"
4444
android:layout_width="wrap_content"
4545
android:layout_height="wrap_content"
46+
android:maxWidth="300dp"
47+
android:singleLine="true"
4648
android:layout_marginTop="10dp"
4749
android:textColor="@color/app_color_white"
4850
android:textSize="18sp"

Demo/app/src/main/res/values-en/strings.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
<string name="app_item_mlvb">MLVB</string>
4242

4343
<string name="app_item_super_player">Superplayer</string>
44+
<string name="app_item_shortvideo_player">Short Video Player</string>
4445
<string name="app_item_player">Player</string>
4546

4647
<string name="app_item_video_recording">Shooting</string>

Demo/app/src/main/res/values-zh/strings.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@
4444

4545
<string name="app_item_super_player">超级播放器</string>
4646
<string name="app_item_player">播放器</string>
47+
<string name="app_item_shortvideo_player">短视频播放</string>
4748

4849
<string name="app_item_video_recording">视频录制</string>
4950
<string name="app_item_effects_editor">特效编辑</string>

Demo/app/src/main/res/values/strings.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@
4444

4545
<string name="app_item_super_player">超级播放器</string>
4646
<string name="app_item_player">播放器</string>
47+
<string name="app_item_shortvideo_player">短视频播放</string>
4748

4849
<string name="app_item_video_recording">视频录制</string>
4950
<string name="app_item_effects_editor">特效编辑</string>

0 commit comments

Comments
 (0)