...
 
......@@ -108,18 +108,34 @@ android {
abiFilters "armeabi-v7a", "x86"
}
}
lintOptions {
checkReleaseBuilds false
// Or, if you prefer, you can continue to check for errors in release builds,
// but continue the build even when errors are found:
abortOnError false
}
signingConfigs {
release {
storeFile file(MYAPP_RELEASE_STORE_FILE)
storePassword MYAPP_RELEASE_STORE_PASSWORD
keyAlias MYAPP_RELEASE_KEY_ALIAS
keyPassword MYAPP_RELEASE_KEY_PASSWORD
}
}
splits {
abi {
reset()
enable enableSeparateBuildPerCPUArchitecture
universalApk false // If true, also generate a universal APK
include "armeabi-v7a", "x86"
include "armeabi-v7a", "x86", "arm64-v8a"
}
}
buildTypes {
release {
minifyEnabled enableProguardInReleaseBuilds
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
signingConfig signingConfigs.release
}
}
// applicationVariants are e.g. debug, release
......
......@@ -5,7 +5,6 @@ import android.content.DialogInterface;
import android.text.TextUtils;
import android.util.Log;
import com.blankj.utilcode.util.ToastUtils;
import com.easefun.polyv.businesssdk.PolyvChatDomainManager;
import com.easefun.polyv.businesssdk.model.chat.PolyvChatDomain;
import com.easefun.polyv.businesssdk.model.video.PolyvPlayBackVO;
......@@ -20,6 +19,7 @@ import com.easefun.polyv.foundationsdk.net.PolyvResponseBean;
import com.easefun.polyv.foundationsdk.net.PolyvResponseExcutor;
import com.easefun.polyv.foundationsdk.net.PolyvrResponseCallback;
import com.easefun.polyv.linkmic.PolyvLinkMicClient;
import com.easefun.polyv.thirdpart.blankj.utilcode.util.ToastUtils;
import com.easefun.polyvsdk.cloudclass.R;
import com.facebook.react.bridge.Arguments;
import com.facebook.react.bridge.Promise;
......
......@@ -31,7 +31,7 @@ allprojects {
maven {
url 'http://maven.aliyun.com/nexus/content/repositories/releases/'
}
maven { url 'https://dl.bintray.com/polyv/abn' }
maven { url 'https://dl.bintray.com/polyv/android' }
}
}
ext {
......@@ -39,6 +39,6 @@ ext {
compileSdkVersion = 27
minSdkVersion = 16
targetSdkVersion = 27
versionCode = 8202
versionName = "0.8.2.02"
versionCode = 80
versionName = "0.8.0"
}
......@@ -8,15 +8,14 @@ android {
versionCode rootProject.ext.versionCode
versionName rootProject.ext.versionName
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
consumerProguardFiles "proguard-rules.pro"
}
buildTypes {
release {
minifyEnabled false
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
qatest {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
lintOptions {
......@@ -34,9 +33,13 @@ dependencies {
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
api 'com.android.support:design:27.1.1'
api 'com.easefun.polyv:polyvSDKCloudClass:0.8.2.02'
api 'com.easefun.polyv:polyvSDKCloudClass:0.8.0'
//glide
api 'jp.wasabeef:glide-transformations:3.3.0'
api "com.github.bumptech.glide:okhttp3-integration:4.7.1"
api ('jp.wasabeef:glide-transformations:3.3.0'){
// exclude group:'com.github.bumptech.glide',module:'glide'
}
api ("com.github.bumptech.glide:okhttp3-integration:4.7.1"){
// exclude group:'com.github.bumptech.glide',module:'glide'
}
annotationProcessor 'com.github.bumptech.glide:compiler:4.7.1'
}
......@@ -9,7 +9,7 @@ import android.view.View;
import android.view.ViewGroup;
import android.view.animation.LinearInterpolator;
import com.blankj.utilcode.util.ScreenUtils;
import com.easefun.polyv.thirdpart.blankj.utilcode.util.ScreenUtils;
import com.easefun.polyv.businesssdk.api.auxiliary.PolyvAuxiliaryVideoview;
import com.easefun.polyv.businesssdk.api.common.player.PolyvBaseVideoView;
import com.easefun.polyv.businesssdk.api.common.player.microplayer.PolyvCommonVideoView;
......
......@@ -5,9 +5,8 @@ import android.support.annotation.NonNull;
import android.support.v7.widget.RecyclerView;
import android.view.View;
import com.bumptech.glide.request.RequestOptions;
import com.easefun.polyv.commonui.adapter.viewholder.ClickableViewHolder;
import com.easefun.polyv.commonui.utils.glide.progress.PolyvMyProgressManager;
import com.easefun.polyv.commonui.utils.imageloader.glide.progress.PolyvMyProgressManager;
import java.util.ArrayList;
import java.util.HashMap;
......@@ -23,8 +22,6 @@ public abstract class PolyvBaseRecyclerViewAdapter extends
private List<RecyclerView.OnScrollListener> mListeners = new ArrayList<>();
protected RequestOptions requestOptions_t;
protected RequestOptions requestOptions_s;
protected Map<String, List<Integer>> loadImgMap = new HashMap<>();
public PolyvBaseRecyclerViewAdapter(RecyclerView recyclerView) {
......@@ -62,15 +59,6 @@ public abstract class PolyvBaseRecyclerViewAdapter extends
return loadImgMap;
}
public RequestOptions getRequestOptions_t() {
return requestOptions_t;
}
public RequestOptions getRequestOptions_s() {
return requestOptions_s;
}
public void onDestory(){
if (getLoadImgMap() != null) {
for (String key : getLoadImgMap().keySet()) {
......
......@@ -11,19 +11,13 @@ import android.widget.FrameLayout;
import android.widget.ImageView;
import android.widget.ProgressBar;
import com.blankj.utilcode.util.ConvertUtils;
import com.bumptech.glide.Glide;
import com.bumptech.glide.load.DataSource;
import com.bumptech.glide.load.engine.GlideException;
import com.bumptech.glide.request.RequestListener;
import com.bumptech.glide.request.RequestOptions;
import com.bumptech.glide.request.target.Target;
import com.easefun.polyv.thirdpart.blankj.utilcode.util.ConvertUtils;
import com.easefun.polyv.cloudclass.chat.send.custom.PolyvCustomEvent;
import com.easefun.polyv.commonui.R;
import com.easefun.polyv.commonui.adapter.PolyvBaseRecyclerViewAdapter;
import com.easefun.polyv.commonui.adapter.itemview.IPolyvCustomMessageBaseItemView;
import com.easefun.polyv.commonui.utils.glide.progress.PolyvMyProgressManager;
import com.easefun.polyv.commonui.utils.glide.progress.PolyvOnProgressListener;
import com.easefun.polyv.commonui.utils.imageloader.IPolyvProgressListener;
import com.easefun.polyv.commonui.utils.imageloader.PolyvImageLoader;
import com.easefun.polyv.foundationsdk.log.PolyvCommonLog;
import java.util.ArrayList;
......@@ -68,26 +62,26 @@ public abstract class ClickableViewHolder<M, Q extends PolyvBaseRecyclerViewAdap
public abstract void processNormalMessage(M item, int position);
//处理自定义消息
public abstract void processCustomMessage(PolyvCustomEvent item, int position);
public abstract void processCustomMessage(PolyvCustomEvent item, int position);
//创建itemview
public abstract <T> IPolyvCustomMessageBaseItemView createItemView(PolyvCustomEvent<T> baseCustomEvent) ;
public abstract <T> IPolyvCustomMessageBaseItemView createItemView(PolyvCustomEvent<T> baseCustomEvent);
// </editor-fold>
//是否需要复用container里的childview
public int findReuseChildIndex(String type){
int childIndex = -1;
public int findReuseChildIndex(String type) {
int childIndex = -1;
int count = contentContainer.getChildCount();
for (int i = 0; i < count; i++) {
View child = contentContainer.getChildAt(i);
if(type.equals(child.getTag())){
PolyvCommonLog.d(TAG,"findReuseChildIndex");
if(child.getVisibility() != View.VISIBLE){
if (type.equals(child.getTag())) {
PolyvCommonLog.d(TAG, "findReuseChildIndex");
if (child.getVisibility() != View.VISIBLE) {
child.setVisibility(View.VISIBLE);
}
childIndex = i;
}else {
if(child.getVisibility() != View.GONE){
} else {
if (child.getVisibility() != View.GONE) {
child.setVisibility(View.GONE);
}
}
......@@ -123,44 +117,53 @@ public abstract class ClickableViewHolder<M, Q extends PolyvBaseRecyclerViewAdap
// <editor-fold defaultstate="collapsed" desc="图片处理方法">
protected void loadNetImg(String chatImg, final int position, final ProgressBar imgLoading, final ImageView imageView) {
PolyvMyProgressManager.removeListener(chatImg, position);
final PolyvOnProgressListener onProgressListener = new PolyvOnProgressListener() {
@Override
public void onStart(String url) {//后台回来会重新开始
if ((int) imgLoading.getTag() != position)
return;
if (imgLoading.getProgress() == 0 && imgLoading.getVisibility() != View.VISIBLE) {
imgLoading.setVisibility(View.VISIBLE);
imageView.setImageDrawable(null);
}
}
@Override
public void onProgress(String url, boolean isComplete, int percentage, long bytesRead, long totalBytes) {
if ((int) imgLoading.getTag() != position)
return;
if (isComplete) {
imgLoading.setVisibility(View.GONE);
imgLoading.setProgress(100);
} else if (imageView.getDrawable() == null) {//onFailed之后可能触发onProgress
imgLoading.setVisibility(View.VISIBLE);
imgLoading.setProgress(percentage);
}
}
protected void loadNetImg(final String chatImg, final int position, final ProgressBar imgLoading, final ImageView imageView) {
PolyvImageLoader.getInstance()
.loadImage(parentView.getContext(),
chatImg,
position,
R.drawable.polyv_image_load_err,
new IPolyvProgressListener() {
@Override
public void onStart(String url) {
if ((int) imgLoading.getTag() != position)
return;
if (imgLoading.getProgress() == 0 && imgLoading.getVisibility() != View.VISIBLE) {
imgLoading.setVisibility(View.VISIBLE);
imageView.setImageDrawable(null);
}
}
@Override
public void onProgress(String url, boolean isComplete, int percentage, long bytesRead, long totalBytes) {
if ((int) imgLoading.getTag() != position)
return;
if (isComplete) {
imgLoading.setVisibility(View.GONE);
imgLoading.setProgress(100);
} else if (imageView.getDrawable() == null) {//onFailed之后可能触发onProgress
imgLoading.setVisibility(View.VISIBLE);
imgLoading.setProgress(percentage);
}
}
@Override
public void onResourceReady(Drawable drawable) {
removeImgUrl(chatImg, position);
imageView.setImageDrawable(drawable);
}
@Override
public void onFailed(@Nullable Exception e, Object model) {
if ((int) imgLoading.getTag() != position)
return;
imgLoading.setVisibility(View.GONE);
imgLoading.setProgress(0);
}
});
@Override
public void onFailed(@Nullable GlideException e, Object model, Target<Drawable> target, boolean isFirstResource) {
if ((int) imgLoading.getTag() != position)
return;
imgLoading.setVisibility(View.GONE);
imgLoading.setProgress(0);
}
};
PolyvMyProgressManager.addListener(chatImg, position, onProgressListener);
putImgUrl(chatImg, position);
loadChatImg(chatImg, onProgressListener, imageView, position);
}
protected void putImgUrl(String imgUrl, int position) {
......@@ -202,27 +205,5 @@ public abstract class ClickableViewHolder<M, Q extends PolyvBaseRecyclerViewAdap
}
}
}
private void loadChatImg(final String chatImg, final PolyvOnProgressListener onProgressListener, final ImageView view, final int position) {
Glide.with(parentView.getContext())
.load(chatImg)
.apply(new RequestOptions().error(com.easefun.polyv.commonui.R.drawable.polyv_image_load_err))//dontAnimate,不显示gif
.listener(new RequestListener<Drawable>() {
@Override
public boolean onLoadFailed(@Nullable GlideException e, Object model, Target<Drawable> target, boolean isFirstResource) {
onProgressListener.onFailed(e, model, target, isFirstResource);
return false;
}
@Override
public boolean onResourceReady(Drawable resource, Object model, Target<Drawable> target, DataSource dataSource, boolean isFirstResource) {
PolyvMyProgressManager.removeListener(chatImg, position);
removeImgUrl(chatImg, position);
onProgressListener.onProgress(chatImg, true, 100, 0, 0);
return false;
}
})
.into(view);
}
// </editor-fold>
}
......@@ -16,9 +16,7 @@ import android.view.View;
import com.easefun.polyv.foundationsdk.permission.PolyvPermissionListener;
import com.easefun.polyv.foundationsdk.permission.PolyvPermissionManager;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import io.reactivex.disposables.CompositeDisposable;
......@@ -30,44 +28,26 @@ public class PolyvBaseActivity extends AppCompatActivity implements PolyvPermiss
private final static int APP_STATUS_KILLED = 0; // 表示应用是被杀死后在启动的
private final static int APP_STATUS_RUNNING = 1; // 表示应用时正常的启动流程
private static int APP_STATUS = APP_STATUS_KILLED; // 记录App的启动状态
protected boolean isCreateSuccess, isKick;
//静态变量记录学员是否被踢,如果被踢后,需要结束应用后才能再次进来观看直播,这个逻辑可以更改
private static Map<String, Boolean> kickMap = new HashMap<>();
protected boolean isCreateSuccess;
// </editor-fold>
// <editor-fold defaultstate="collapsed" desc="处理聊天室用户被踢的相关方法">
public boolean isInitialize() {
return isCreateSuccess && !isKick;
}
public static void setKickValue(String channelId, boolean isKick) {
kickMap.put(channelId, isKick);
}
public static boolean checkKick(String channelId) {
return kickMap.containsKey(channelId) && kickMap.get(channelId);
}
public static boolean checkKickTips(final Activity activity, String channelId, String... message) {
if (checkKick(channelId)) {
new AlertDialog.Builder(activity)
.setTitle("温馨提示")
.setMessage(message != null && message.length > 0 ? message[0] : "您未被授权观看本直播!")
.setPositiveButton("确定", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
activity.finish();
}
})
.setCancelable(false)
.show();
return true;
}
return false;
}
public boolean checkKickTips(String channelId, String... message) {
return isKick = checkKickTips(this, channelId, message);
return isCreateSuccess;
}
public static void showKickTips(final Activity activity, String... message) {
new AlertDialog.Builder(activity)
.setTitle("温馨提示")
.setMessage(message != null && message.length > 0 ? message[0] : "您未被授权观看本直播!")
.setPositiveButton("确定", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
activity.finish();
}
})
.setCancelable(false)
.show();
}
// </editor-fold>
......@@ -122,7 +102,6 @@ public class PolyvBaseActivity extends AppCompatActivity implements PolyvPermiss
}
super.onCreate(savedInstanceState);
isCreateSuccess = false;
isKick = false;
boolean launchActivityItBaseActivity = false;
try {
launchActivityItBaseActivity = getLaunchActivityName() != null && PolyvBaseActivity.class.isAssignableFrom(Class.forName(getLaunchActivityName()));//父/等
......
package com.easefun.polyv.commonui.player.widget;
import android.content.Context;
import android.os.Handler;
import android.os.Looper;
import android.os.Message;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.util.AttributeSet;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.FrameLayout;
import android.widget.ProgressBar;
import android.widget.TextView;
import com.easefun.polyv.businesssdk.api.common.player.IPolyvBaseVideoView;
import com.easefun.polyv.businesssdk.vodplayer.PolyvPlayType;
import com.easefun.polyv.cloudclass.playback.video.PolyvPlaybackVideoView;
import com.easefun.polyv.cloudclass.video.PolyvCloudClassVideoView;
import com.easefun.polyv.commonui.R;
import java.util.Locale;
import tv.danmaku.ijk.media.player.IjkMediaPlayer;
public class PolyvLoadingLayout extends FrameLayout {
private ProgressBar loadingProgress;
private TextView loadingSpeed;
private IPolyvBaseVideoView videoView;
private Handler handler = new Handler(Looper.getMainLooper()) {
@Override
public void handleMessage(Message msg) {
if (msg.what == 1) {
if (videoView instanceof PolyvCloudClassVideoView ||
(videoView instanceof PolyvPlaybackVideoView && ((PolyvPlaybackVideoView) videoView).getPlayType() == PolyvPlayType.ONLINE_PLAY)) {
IjkMediaPlayer mp = videoView.getIjkMediaPlayer();
if (mp != null) {
long tcpSpeed = mp.getTcpSpeed();
loadingSpeed.setVisibility(View.VISIBLE);
loadingSpeed.setText(formatedSpeed(tcpSpeed, 1000));
handler.sendEmptyMessageDelayed(1, 500);
}
}
}
}
};
private static String formatedSpeed(long bytes, long elapsed_milli) {
if (elapsed_milli <= 0) {
return "0 B/S";
}
if (bytes <= 0) {
return "0 B/S";
}
float bytes_per_sec = ((float) bytes) * 1000.f / elapsed_milli;
if (bytes_per_sec >= 1000 * 1000) {
return String.format(Locale.US, "%.2f MB/S", ((float) bytes_per_sec) / 1000 / 1000);
} else if (bytes_per_sec >= 1000) {
return String.format(Locale.US, "%.2f KB/S", ((float) bytes_per_sec) / 1000);
} else {
return String.format(Locale.US, "%d B/S", (long) bytes_per_sec);
}
}
public PolyvLoadingLayout(@NonNull Context context) {
this(context, null);
}
public PolyvLoadingLayout(@NonNull Context context, @Nullable AttributeSet attrs) {
this(context, attrs, 0);
}
public PolyvLoadingLayout(@NonNull Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
super(context, attrs, defStyleAttr);
LayoutInflater.from(context).inflate(R.layout.polyv_loading_layout, this);
initView();
}
private void initView() {
loadingProgress = (ProgressBar) findViewById(R.id.loading_progress);
loadingSpeed = (TextView) findViewById(R.id.loading_speed);
}
public void bindVideoView(IPolyvBaseVideoView videoView) {
this.videoView = videoView;
}
public void destroy() {
handler.removeCallbacksAndMessages(null);
}
@Override
public void setVisibility(int visibility) {
super.setVisibility(visibility);
acceptVisibilityChange(visibility);
}
@Override
protected void onDetachedFromWindow() {
super.onDetachedFromWindow();
handler.removeCallbacksAndMessages(null);
}
@Override
protected void onAttachedToWindow() {
super.onAttachedToWindow();
acceptVisibilityChange(getVisibility());
}
private void acceptVisibilityChange(int visibility) {
handler.removeCallbacksAndMessages(null);
if (visibility == View.VISIBLE) {
handler.sendEmptyMessage(1);
} else {
loadingSpeed.setVisibility(View.GONE);
}
}
}
......@@ -15,7 +15,7 @@ import android.widget.RelativeLayout;
import android.widget.SeekBar;
import android.widget.TextView;
import com.blankj.utilcode.util.ScreenUtils;
import com.easefun.polyv.thirdpart.blankj.utilcode.util.ScreenUtils;
import com.easefun.polyv.businesssdk.service.PolyvNoLeakHandler;
import com.easefun.polyv.businesssdk.vodplayer.PolyvVodVideoView;
import com.easefun.polyv.commonui.PolyvCommonMediacontroller;
......
......@@ -9,7 +9,7 @@ import android.view.View;
import android.widget.TextView;
import android.widget.Toast;
import com.blankj.utilcode.util.ConvertUtils;
import com.easefun.polyv.thirdpart.blankj.utilcode.util.ConvertUtils;
import com.easefun.polyv.commonui.R;
import java.util.ArrayList;
......
package com.easefun.polyv.commonui.utils.glide.progress;
import android.content.Context;
public class PolyvDpUtils {
public static float getDensity(Context context) {
return context.getResources().getDisplayMetrics().density;
}
public static float getFontDensity(Context context) {
return context.getResources().getDisplayMetrics().scaledDensity;
}
public static int dp2px(Context context, float dp) {
return (int) (getDensity(context) * dp + 0.5f);
}
public static int px2dp(Context context, float px) {
return (int) (px / getDensity(context) + 0.5f);
}
public static int sp2px(Context context, float sp) {
return (int) (getFontDensity(context) * sp + 0.5f);
}
public static int px2sp(Context context, float px) {
return (int) (px / getFontDensity(context) + 0.5f);
}
}
package com.easefun.polyv.commonui.utils.glide.progress;
import android.text.TextUtils;
import java.io.IOException;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
import okhttp3.Interceptor;
import okhttp3.OkHttpClient;
import okhttp3.Request;
import okhttp3.Response;
public class PolyvProgressManager {
private static Map<String, PolyvOnProgressListener> listenersMap =
Collections.synchronizedMap(new HashMap<String, PolyvOnProgressListener>());
private static final PolyvProgressResponseBody.InternalProgressListener LISTENER =
new PolyvProgressResponseBody.InternalProgressListener() {
@Override
public void onProgress(String url, long bytesRead, long totalBytes) {
PolyvOnProgressListener onProgressListener = getProgressListener(url);
if (onProgressListener != null) {
int percentage = (int) ((bytesRead * 1f / totalBytes) * 100f);
boolean isComplete = percentage >= 100;
if (!isComplete) {//交给glide回调
onProgressListener.onProgress(url, isComplete, percentage, bytesRead, totalBytes);
}
// if (isComplete) {
// removeListener(url);
// }
}
}
};
private static OkHttpClient okHttpClient;
private PolyvProgressManager() {
}
public static OkHttpClient getOkHttpClient() {
if (okHttpClient == null) {
okHttpClient = new OkHttpClient.Builder()
.addNetworkInterceptor(new Interceptor() {
@Override
public Response intercept(Chain chain) throws IOException {
Request request = chain.request();
final String url = request.url().toString();
final PolyvOnProgressListener onProgressListener = getProgressListener(url);
if (onProgressListener != null) {
PolyvProgressResponseBody.mainThreadHandler.post(new Runnable() {
@Override
public void run() {
onProgressListener.onStart(url);
}
});
}
Response response = chain.proceed(request);
return response.newBuilder()
.body(new PolyvProgressResponseBody(url, LISTENER,
response.body()))
.build();
}
})
.build();
}
return okHttpClient;
}
public static void addListener(String url, PolyvOnProgressListener listener) {
if (!TextUtils.isEmpty(url) && listener != null) {
listenersMap.put(url, listener);
// listener.onProgress(url, false, 1, 0, 0);
}
}
public static void removeListener(String url) {
if (!TextUtils.isEmpty(url)) {
listenersMap.remove(url);
}
}
public static PolyvOnProgressListener getProgressListener(String url) {
if (TextUtils.isEmpty(url) || listenersMap == null || listenersMap.size() == 0) {
return null;
}
PolyvOnProgressListener listenerWeakReference = listenersMap.get(url);
if (listenerWeakReference != null) {
return listenerWeakReference;
}
return null;
}
}
package com.easefun.polyv.commonui.utils.imageloader;
import android.content.Context;
import android.support.annotation.DrawableRes;
import android.support.annotation.WorkerThread;
import android.widget.ImageView;
import java.io.File;
import java.util.concurrent.ExecutionException;
/**
* date: 2019/9/4 0004
*
* @author hwj
* description 图片加载引擎
*/
public interface IImageLoadEngine {
void loadImage(Context context, String url, ImageView imageView);
@WorkerThread
File saveImageAsFile(Context context, String url) throws ExecutionException, InterruptedException;
void loadImage(Context context, String url, int position, @DrawableRes int errorRes, IPolyvProgressListener listener);
void loadImageNoDiskCache(Context context, String url, @DrawableRes int placeHolder, @DrawableRes int error, ImageView imageView);
}
package com.easefun.polyv.commonui.utils.imageloader;
import android.graphics.drawable.Drawable;
import android.support.annotation.Nullable;
/**
* date: 2019/9/4 0004
*
* @author hwj
* description 图片加载监听
*/
public interface IPolyvProgressListener {
/**
* 加载图片
*/
void onProgress(String url, boolean isComplete, int percentage, long bytesRead, long totalBytes);
void onFailed(@Nullable Exception e, Object model);
void onStart(String url);
void onResourceReady(Drawable drawable);
}
package com.easefun.polyv.commonui.utils.imageloader;
import android.content.Context;
import android.support.annotation.DrawableRes;
import android.support.annotation.WorkerThread;
import android.widget.ImageView;
import com.easefun.polyv.commonui.utils.imageloader.glide.GlideImageLoadEngine;
import java.io.File;
import java.util.concurrent.ExecutionException;
/**
* date: 2019/9/4 0004
*
* @author hwj
* <p>
* 图片加载器。默认使用Glide作为图片加载引擎{@link GlideImageLoadEngine},
* 开发者如果用了其他的图片加载框架,
* 可以通过实现{@link IImageLoadEngine}接口,
* 并在下方代码块中实例化,来快速替换图片加载库。
*/
public class PolyvImageLoader {
// <editor-fold defaultstate="collapsed" desc="单例">
private static PolyvImageLoader INSTANCE;
private PolyvImageLoader() {/**/}
public static PolyvImageLoader getInstance() {
if (INSTANCE == null) {
synchronized (PolyvImageLoader.class) {
if (INSTANCE == null) {
INSTANCE = new PolyvImageLoader();
}
}
}
return INSTANCE;
}
// </editor-fold>
private IImageLoadEngine loadEngine;
{
loadEngine = new GlideImageLoadEngine();
}
/**
* 加载图片
*/
public void loadImage(Context context, String url, ImageView imageView) {
loadEngine.loadImage(context, url, imageView);
}
/**
* 加载图片:带有进度监听。
*/
public void loadImage(Context context, final String url, final int position, @DrawableRes int errorRes, final IPolyvProgressListener listener) {
loadEngine.loadImage(context, url, position, errorRes, listener);
}
/**
* 加载图片,不进行本地磁盘缓存
*/
public void loadImageNoDiskCache(Context context, String url, @DrawableRes int placeHolder, @DrawableRes int error, ImageView imageView) {
loadEngine.loadImageNoDiskCache(context, url, placeHolder, error, imageView);
}
/**
* 将图片保存成文件
*/
@WorkerThread
public File saveImageAsFile(Context context, String url) throws ExecutionException, InterruptedException {
return loadEngine.saveImageAsFile(context, url);
}
}
package com.easefun.polyv.commonui.utils.imageloader.glide;
import android.content.Context;
import android.graphics.Bitmap;
import com.bumptech.glide.Glide;
import com.bumptech.glide.load.Transformation;
import com.bumptech.glide.load.engine.Resource;
import com.bumptech.glide.load.engine.bitmap_recycle.BitmapPool;
import com.bumptech.glide.load.resource.bitmap.BitmapResource;
import com.easefun.polyv.cloudclass.chat.send.img.PolyvSendChatImageHelper;
import java.io.File;
import java.security.MessageDigest;
/**
* 压缩
*/
public class CompressTransformation implements Transformation<Bitmap> {
private static final int VERSION = 1;
private static final String ID = "CompressTransformation." + VERSION;
private static final byte[] ID_BYTES = ID.getBytes(CHARSET);
private BitmapPool mBitmapPool;
private String mUrl;
CompressTransformation(Context context, String url) {
this(url, Glide.get(context).getBitmapPool());
}
private CompressTransformation(String url, BitmapPool pool) {
mBitmapPool = pool;
mUrl = url;
}
@Override
public Resource<Bitmap> transform(Context context, Resource<Bitmap> resource, int outWidth, int outHeight) {
if (new File(mUrl).isFile()) {
try {
Bitmap bitmap = PolyvSendChatImageHelper.compressImage(mUrl);
if (bitmap != null) {
return BitmapResource.obtain(bitmap, mBitmapPool);
}
} catch (Exception e) {
}
}
return resource;
}
@Override
public boolean equals(Object obj) {
return obj instanceof CompressTransformation;
}
@Override
public int hashCode() {
return ID.hashCode();
}
@Override
public void updateDiskCacheKey(MessageDigest messageDigest) {
messageDigest.update(ID_BYTES);
}
}
\ No newline at end of file
package com.easefun.polyv.commonui.utils.imageloader.glide;
import android.content.Context;
import android.graphics.drawable.Drawable;
import android.support.annotation.DrawableRes;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.annotation.WorkerThread;
import android.widget.ImageView;
import com.bumptech.glide.Glide;
import com.bumptech.glide.load.DataSource;
import com.bumptech.glide.load.engine.DiskCacheStrategy;
import com.bumptech.glide.load.engine.GlideException;
import com.bumptech.glide.load.resource.gif.GifDrawable;
import com.bumptech.glide.request.RequestListener;
import com.bumptech.glide.request.RequestOptions;
import com.bumptech.glide.request.target.SimpleTarget;
import com.bumptech.glide.request.target.Target;
import com.bumptech.glide.request.transition.Transition;
import com.easefun.polyv.commonui.utils.imageloader.glide.progress.PolyvMyProgressManager;
import com.easefun.polyv.commonui.utils.imageloader.glide.progress.PolyvOnProgressListener;
import com.easefun.polyv.commonui.utils.imageloader.IImageLoadEngine;
import com.easefun.polyv.commonui.utils.imageloader.IPolyvProgressListener;
import java.io.File;
import java.util.concurrent.ExecutionException;
/**
* date: 2019/9/4 0004
*
* @author hwj
* description 用Glide做为图片加载引擎
*/
public class GlideImageLoadEngine implements IImageLoadEngine {
@Override
public void loadImage(Context context, String url, ImageView imageView) {
Glide.with(context)
.load(url)
.into(imageView);
}
@Override
@WorkerThread
public File saveImageAsFile(Context context, String url) throws ExecutionException, InterruptedException {
return Glide.with(context)
.asFile()
.load(url)
.submit()
.get();
}
@Override
public void loadImage(Context context, final String url, final int position, @DrawableRes int errorRes, final IPolyvProgressListener listener) {
PolyvMyProgressManager.removeListener(url, position);
PolyvMyProgressManager.addListener(url, position, new PolyvOnProgressListener() {
@Override
public void onProgress(String url, boolean isComplete, int percentage, long bytesRead, long totalBytes) {
listener.onProgress(url, isComplete, percentage, bytesRead, totalBytes);
}
@Override
public void onStart(String url) {
listener.onStart(url);
}
});
Glide.with(context)
.load(url)
.apply(new RequestOptions()
.error(errorRes)
.transform(new CompressTransformation(context, url))
)
.listener(new RequestListener<Drawable>() {
@Override
public boolean onLoadFailed(@Nullable GlideException e, Object model, Target<Drawable> target, boolean isFirstResource) {
listener.onFailed(e, model);
return false;
}
@Override
public boolean onResourceReady(Drawable resource, Object model, Target<Drawable> target, DataSource dataSource, boolean isFirstResource) {
PolyvMyProgressManager.removeListener(url, position);
listener.onProgress(url, true, 100, 0, 0);
return false;
}
})
.into(new SimpleTarget<Drawable>() {
@Override
public void onResourceReady(@NonNull Drawable resource, @Nullable Transition<? super Drawable> transition) {
listener.onResourceReady(resource);
if (resource instanceof GifDrawable) {
((GifDrawable) resource).start();//显示gif
}
}
@Override
public void onDestroy() {
PolyvMyProgressManager.removeListener(url, position);
}
});
}
@Override
public void loadImageNoDiskCache(Context context, String url, @DrawableRes int placeHolder, @DrawableRes int error, ImageView imageView) {
Glide.with(context)
.load(url)
.apply(new RequestOptions()
.placeholder(placeHolder)
.error(error)
.diskCacheStrategy(DiskCacheStrategy.NONE))
.into(imageView);
}
}
package com.easefun.polyv.commonui.utils.glide.progress;
import android.graphics.drawable.Drawable;
import android.support.annotation.Nullable;
import com.bumptech.glide.load.engine.GlideException;
import com.bumptech.glide.request.target.Target;
package com.easefun.polyv.commonui.utils.imageloader.glide.progress;
public interface PolyvOnProgressListener {
void onProgress(String url, boolean isComplete, int percentage, long bytesRead, long totalBytes);
void onFailed(@Nullable GlideException e, Object model, Target<Drawable> target, boolean isFirstResource);
void onStart(String url);
}
\ No newline at end of file
package com.easefun.polyv.commonui.utils.glide.progress;
package com.easefun.polyv.commonui.utils.imageloader.glide.progress;
import android.content.Context;
import android.support.annotation.NonNull;
......
package com.easefun.polyv.commonui.utils.glide.progress;
package com.easefun.polyv.commonui.utils.imageloader.glide.progress;
import android.os.Handler;
import android.os.Looper;
......
......@@ -22,10 +22,10 @@ import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.ScrollView;
import com.blankj.utilcode.util.ActivityUtils;
import com.blankj.utilcode.util.KeyboardUtils;
import com.blankj.utilcode.util.LogUtils;
import com.blankj.utilcode.util.ScreenUtils;
import com.easefun.polyv.thirdpart.blankj.utilcode.util.ActivityUtils;
import com.easefun.polyv.thirdpart.blankj.utilcode.util.KeyboardUtils;
import com.easefun.polyv.thirdpart.blankj.utilcode.util.LogUtils;
import com.easefun.polyv.thirdpart.blankj.utilcode.util.ScreenUtils;
import com.easefun.polyv.cloudclass.PolyvSocketEvent;
import com.easefun.polyv.cloudclass.model.PolyvSocketMessageVO;
import com.easefun.polyv.cloudclass.model.answer.PolyvQuestionResultVO;
......
package com.easefun.polyv.commonui.utils.glide.progress;
package com.easefun.polyv.commonui.widget;
import android.animation.ValueAnimator;
import android.content.Context;
......@@ -587,4 +587,31 @@ public class PolyvCircleProgressView extends ProgressBar {
initPaint();
super.invalidate();
}
public static class PolyvDpUtils {
static float getDensity(Context context) {
return context.getResources().getDisplayMetrics().density;
}
static float getFontDensity(Context context) {
return context.getResources().getDisplayMetrics().scaledDensity;
}
static int dp2px(Context context, float dp) {
return (int) (getDensity(context) * dp + 0.5f);
}
static int px2dp(Context context, float px) {
return (int) (px / getDensity(context) + 0.5f);
}
static int sp2px(Context context, float sp) {
return (int) (getFontDensity(context) * sp + 0.5f);
}
static int px2sp(Context context, float px) {
return (int) (px / getFontDensity(context) + 0.5f);
}
}
}
......@@ -18,22 +18,15 @@ package com.easefun.polyv.commonui.widget;
import android.content.Context;
import android.content.res.TypedArray;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.graphics.PorterDuff;
import android.graphics.PorterDuffXfermode;
import android.graphics.RadialGradient;
import android.graphics.Rect;
import android.graphics.Shader;
import android.graphics.Typeface;
import android.support.v4.content.res.ResourcesCompat;
import android.support.v4.graphics.ColorUtils;
import android.util.AttributeSet;
import android.view.View;
import com.blankj.utilcode.util.Utils;
import com.easefun.polyv.commonui.R;
import com.easefun.polyv.foundationsdk.log.PolyvCommonLog;
public class PolyvMediaCheckView extends View {
......
......@@ -7,7 +7,7 @@ import android.graphics.RectF;
import android.support.v7.widget.AppCompatImageView;
import android.util.AttributeSet;
import com.blankj.utilcode.util.ConvertUtils;
import com.easefun.polyv.thirdpart.blankj.utilcode.util.ConvertUtils;
public class PolyvRoundImageView extends AppCompatImageView {
......
......@@ -15,8 +15,6 @@ import android.view.ScaleGestureDetector;
import android.view.View;
import android.view.ViewConfiguration;
import com.bumptech.glide.load.resource.gif.GifDrawable;
public class PolyvScaleImageView extends AppCompatImageView {
private ScaleGestureDetector scaleGestureDetector;//缩放
private GestureDetector gestureDetector;//双击
......@@ -192,9 +190,6 @@ public class PolyvScaleImageView extends AppCompatImageView {
resetScaleX(drawable);
reset();
setVisibility(View.VISIBLE);
if (drawable instanceof GifDrawable) {
((GifDrawable) drawable).start();//显示gif
}
}
});
}
......
......@@ -11,7 +11,7 @@ import android.widget.FrameLayout;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import com.blankj.utilcode.util.ScreenUtils;
import com.easefun.polyv.thirdpart.blankj.utilcode.util.ScreenUtils;
import com.easefun.polyv.foundationsdk.log.PolyvCommonLog;
/**
......
<vector android:height="24dp" android:viewportHeight="88"
android:viewportWidth="812" android:width="24dp"
xmlns:aapt="http://schemas.android.com/aapt" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillType="evenOdd"
android:pathData="M0,0h812v88h-812z"
android:strokeColor="#00000000" android:strokeWidth="1">
<aapt:attr name="android:fillColor">
<gradient android:endX="406" android:endY="88"
android:startX="406" android:startY="0" android:type="linear">
<item android:color="#00000000" android:offset="0"/>
<item android:color="#4C000000" android:offset="1"/>
</gradient>
</aapt:attr>
</path>
</vector>
<?xml version="1.0" encoding="utf-8"?><!-- 矩形内部填充-线性垂直渐变 -->
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle"
android:useLevel="true">
<size
android:width="406dp"
android:height="88dp" />
<!-- 调整angle实现水平渐变,垂直渐变或者对角渐变 -->
<gradient
android:angle="-45"
android:centerX="0.5"
android:centerY="0.5"
android:endColor="#4C000000"
android:startColor="#00000000"
android:type="linear" />
</shape>
\ No newline at end of file
<vector android:height="24dp" android:viewportHeight="88"
android:viewportWidth="812" android:width="24dp"
xmlns:aapt="http://schemas.android.com/aapt" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillType="evenOdd"
android:pathData="M0,0h812v88h-812z"
android:strokeColor="#00000000" android:strokeWidth="1">
<aapt:attr name="android:fillColor">
<gradient android:endX="406" android:endY="88"
android:startX="406" android:startY="0" android:type="linear">
<item android:color="#4C000000" android:offset="0"/>
<item android:color="#00000000" android:offset="1"/>
</gradient>
</aapt:attr>
</path>
</vector>
<?xml version="1.0" encoding="utf-8"?><!-- 矩形内部填充-线性垂直渐变 -->
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle"
android:useLevel="true">
<size
android:width="406dp"
android:height="88dp" />
<!-- 调整angle实现水平渐变,垂直渐变或者对角渐变 -->
<gradient
android:angle="90"
android:centerX="0.5"
android:centerY="0.5"
android:endColor="#4C000000"
android:startColor="#00000000"
android:type="linear" />
</shape>
\ No newline at end of file
......@@ -40,7 +40,7 @@
android:layout_centerVertical="true"
android:layout_marginLeft="6dp"
android:layout_marginRight="6dp"
android:layout_toLeftOf="@id/right_layout"
android:layout_toLeftOf="@+id/right_layout"
android:layout_toRightOf="@id/ll_switch"
android:background="@drawable/polyv_et_chat_corner"
android:hint="在这里可以跟老师互动哦"
......
......@@ -12,7 +12,7 @@
android:layout_height="match_parent"
android:layout_centerVertical="true"
android:layout_marginRight="6dp"
android:layout_toLeftOf="@id/iv_emoji"
android:layout_toLeftOf="@+id/iv_emoji"
android:layout_toRightOf="@id/iv_switch"
android:background="@drawable/polyv_et_chat_corner"
android:hint="我也来聊几句..."
......
......@@ -30,7 +30,7 @@
android:scaleType="centerCrop"
android:visibility="gone" />
<com.easefun.polyv.commonui.utils.glide.progress.PolyvCircleProgressView
<com.easefun.polyv.commonui.widget.PolyvCircleProgressView
android:id="@+id/cpv_img_loading"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
......
......@@ -26,7 +26,7 @@
android:scaleType="centerCrop"
android:visibility="gone" />
<com.easefun.polyv.commonui.utils.glide.progress.PolyvCircleProgressView
<com.easefun.polyv.commonui.widget.PolyvCircleProgressView
android:id="@+id/cpv_img_loading"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
......
......@@ -10,7 +10,7 @@
android:layout_height="match_parent"
android:layout_gravity="center" />
<com.easefun.polyv.commonui.utils.glide.progress.PolyvCircleProgressView
<com.easefun.polyv.commonui.widget.PolyvCircleProgressView
android:id="@+id/cpv_img_loading"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
......
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:orientation="vertical">
<!-- 视频在加载过程中显示的进度条 -->
<ProgressBar
android:id="@+id/loading_progress"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<TextView
android:id="@+id/loading_speed"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="6dp"
android:textColor="#ffffff"
android:textSize="12sp"
android:visibility="gone"
tools:text="12.22 KB/S" />
</LinearLayout>
\ No newline at end of file
......@@ -43,6 +43,7 @@
android:src="@drawable/polyv_default_teacher" />
<TextView
android:maxLines="1"
android:layout_weight="1"
android:id="@+id/teacher_name_vertical"
android:layout_width="wrap_content"
......@@ -52,7 +53,7 @@
android:layout_marginBottom="@dimen/dm_5"
android:ellipsize="end"
android:maxLength="10"
android:text="教师名字"
android:text="教师名字教师名字教师名字教师名字教师名字教师名字教师名字"
android:textColor="@color/white"
android:textSize="14sp" />
......@@ -65,7 +66,6 @@
android:gravity="center"
android:maxLines="1"
android:ellipsize="end"
android:layout_weight="1"
android:id="@+id/online_number"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
......
......@@ -16,3 +16,7 @@
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true
MYAPP_RELEASE_STORE_FILE=debug.keystore
MYAPP_RELEASE_KEY_ALIAS=androiddebugkey
MYAPP_RELEASE_STORE_PASSWORD=android
MYAPP_RELEASE_KEY_PASSWORD=android
......@@ -2,10 +2,6 @@ package com.easefun.polyv.cloudclassdemo;
import android.support.multidex.MultiDexApplication;
import com.easefun.polyv.businesssdk.vodplayer.PolyvVodSDKClient;
import com.easefun.polyv.cloudclass.config.PolyvLiveSDKClient;
import com.easefun.polyv.foundationsdk.log.PolyvCommonLog;
/**
* @author df
* @create 2018/8/7
......@@ -13,25 +9,9 @@ import com.easefun.polyv.foundationsdk.log.PolyvCommonLog;
*/
public class PolyvCloudClassApp extends MultiDexApplication {
private static final String TAG = "PolyvCloudClassApp";
//加密秘钥和加密向量,在点播后台->设置->API接口中获取,用于解密SDK加密串
//值修改请参考https://github.com/easefun/polyv-android-sdk-demo/wiki/10.%E5%85%B3%E4%BA%8E-SDK%E5%8A%A0%E5%AF%86%E4%B8%B2-%E4%B8%8E-%E7%94%A8%E6%88%B7%E9%85%8D%E7%BD%AE%E4%BF%A1%E6%81%AF%E5%8A%A0%E5%AF%86%E4%BC%A0%E8%BE%93
/** 加密秘钥 */
private String aeskey = "VXtlHmwfS2oYm0CZ";
/** 加密向量 */
private String iv = "2u9gDPKdX6GyQJKU";
/** SDK加密串,可以在点播后台获取 */
private String config = "";
@Override
public void onCreate() {
super.onCreate();
// Normal app init code...
// PolyvCommonLog.setDebug(true);
// PolyvLiveSDKClient liveSDKClient = PolyvLiveSDKClient.getInstance();
// liveSDKClient.initContext(this);
//
// PolyvVodSDKClient client = PolyvVodSDKClient.getInstance();
// //使用SDK加密串来配置
// client.setConfig(config, aeskey, iv);
}
}
......@@ -14,7 +14,7 @@ import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.TextView;
import com.blankj.utilcode.util.ToastUtils;
import com.easefun.polyv.thirdpart.blankj.utilcode.util.ToastUtils;
import com.easefun.polyv.businesssdk.PolyvChatDomainManager;
import com.easefun.polyv.businesssdk.model.chat.PolyvChatDomain;
import com.easefun.polyv.businesssdk.model.video.PolyvPlayBackVO;
......@@ -172,15 +172,15 @@ public class PolyvCloudClassLoginActivity extends PolyvBaseActivity implements V
// <editor-fold defaultstate="collapsed" desc="设置测试数据">
private void setTestData() {
appId.setText("f0opwds7fy");
appSecert.setText("64c1fc7edc2e493b9ae47e74f612df3e");
userId.setText("9f033b6d5b");
channelId.setText("369150");
playbackChannelId.setText("");
playbackUserId.setText("");
playbackVideoId.setText("");
playbackAppId.setText("");
appId.setText("f9syxhkrbn");
appSecert.setText("3a942aa2d1c94371971cfbbc01ac3632");
userId.setText("14da40e138");
channelId.setText("333328");
playbackChannelId.setText("297136");
playbackUserId.setText("cacb60fd09");
playbackVideoId.setText("14da40e138e3ff0b65e947abb65314f5_1");
playbackAppId.setText("fbzmfro6ot");
}
// </editor-fold>
......@@ -289,7 +289,7 @@ public class PolyvCloudClassLoginActivity extends PolyvBaseActivity implements V
return playbackUserId.getText().toString().trim();
}
private void checkToken(String userId, String appSecret, String channel, String vid, String appId) {
private void checkToken(final String userId, String appSecret, String channel, final String vid, final String appId) {
//请求token接口
getTokenDisposable = PolyvLoginManager.checkLoginToken(userId, appSecret, appId,
channel, vid,
......@@ -324,7 +324,7 @@ public class PolyvCloudClassLoginActivity extends PolyvBaseActivity implements V
});
}
private void requestPlayBackStatus(String userId, String vid) {
private void requestPlayBackStatus(final String userId, String vid) {
if(TextUtils.isEmpty(vid)){
return;
}
......@@ -370,7 +370,7 @@ public class PolyvCloudClassLoginActivity extends PolyvBaseActivity implements V
}
}
private void requestLiveStatus(String userId) {
private void requestLiveStatus(final String userId) {
verifyDispose = PolyvResponseExcutor.excuteUndefinData(PolyvApiManager.getPolyvLiveStatusApi().geLiveStatusJson(channelId.getText().toString())
, new PolyvrResponseCallback<PolyvLiveStatusVO>() {
@Override
......
......@@ -28,10 +28,10 @@ import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.TextView;
import com.blankj.utilcode.util.ConvertUtils;
import com.blankj.utilcode.util.LogUtils;
import com.blankj.utilcode.util.ScreenUtils;
import com.blankj.utilcode.util.Utils;
import com.easefun.polyv.thirdpart.blankj.utilcode.util.ConvertUtils;
import com.easefun.polyv.thirdpart.blankj.utilcode.util.LogUtils;
import com.easefun.polyv.thirdpart.blankj.utilcode.util.ScreenUtils;
import com.easefun.polyv.thirdpart.blankj.utilcode.util.Utils;
import com.easefun.polyv.businesssdk.model.video.PolyvBaseVideoParams;
import com.easefun.polyv.businesssdk.model.video.PolyvCloudClassVideoParams;
import com.easefun.polyv.businesssdk.model.video.PolyvPlaybackVideoParams;
......@@ -63,12 +63,13 @@ import com.easefun.polyv.cloudclassdemo.watch.player.live.PolyvCloudClassVideoHe
import com.easefun.polyv.cloudclassdemo.watch.player.live.PolyvCloudClassVideoItem;
import com.easefun.polyv.cloudclassdemo.watch.player.live.widget.PolyvChatPullLayout;
import com.easefun.polyv.cloudclassdemo.watch.player.live.widget.PolyvTeacherInfoLayout;
import com.easefun.polyv.cloudclassdemo.watch.player.live.widget.IPolyvLandscapeDanmuSender;