Browse Source

完善视频播放器内核库

yangchong 3 years ago
parent
commit
30d2ae4545

+ 19 - 19
Demo/build.gradle

@@ -68,29 +68,29 @@ dependencies {
     implementation 'com.github.ctiao:DanmakuFlameMaster:0.9.25'
     implementation 'com.github.ctiao:ndkbitmap-armv7a:0.9.21'
 
-    implementation 'com.github.yangchong211.YCVideoPlayer:VideoPlayer:1.1.0'
-    implementation 'com.github.yangchong211.YCVideoPlayer:VideoKernel:1.1.0'
-    implementation 'com.github.yangchong211.YCVideoPlayer:VideoView:1.1.0'
-    implementation 'com.github.yangchong211.YCVideoPlayer:MusicPlayer:1.1.0'
-    implementation 'com.github.yangchong211.YCVideoPlayer:VideoM3u8:1.1.0'
-    implementation 'com.github.yangchong211.YCVideoPlayer:VideoSqlLite:1.1.0'
-    implementation 'com.github.yangchong211.YCVideoPlayer:AudioPlayer:1.1.0'
-    implementation 'com.github.yangchong211.YCVideoPlayer:VideoTool:1.1.0'
-    implementation 'com.github.yangchong211.YCVideoPlayer:VideoCache:1.1.0'
+//    implementation 'com.github.yangchong211.YCVideoPlayer:VideoPlayer:1.1.0'
+//    implementation 'com.github.yangchong211.YCVideoPlayer:VideoKernel:1.1.0'
+//    implementation 'com.github.yangchong211.YCVideoPlayer:VideoView:1.1.0'
+//    implementation 'com.github.yangchong211.YCVideoPlayer:MusicPlayer:1.1.0'
+//    implementation 'com.github.yangchong211.YCVideoPlayer:VideoM3u8:1.1.0'
+//    implementation 'com.github.yangchong211.YCVideoPlayer:VideoSqlLite:1.1.0'
+//    implementation 'com.github.yangchong211.YCVideoPlayer:AudioPlayer:1.1.0'
+//    implementation 'com.github.yangchong211.YCVideoPlayer:VideoTool:1.1.0'
+//    implementation 'com.github.yangchong211.YCVideoPlayer:VideoCache:1.1.0'
 
-//    implementation project(path: ':VideoCache')
-//    implementation project(path: ':VideoPlayer')
-//    implementation project(path: ':VideoKernel')
-//    implementation project(path: ':VideoView')
-//    implementation project(path: ':MusicPlayer')
-//    implementation project(path: ':VideoM3u8')
-//    implementation project(path: ':VideoSqlLite')
-//    implementation project(path: ':AudioPlayer')
-//    implementation project(path: ':VideoTool')
+    implementation project(path: ':VideoCache')
+    implementation project(path: ':VideoPlayer')
+    implementation project(path: ':VideoKernel')
+    implementation project(path: ':VideoView')
+    implementation project(path: ':MusicPlayer')
+    implementation project(path: ':VideoM3u8')
+    implementation project(path: ':VideoSqlLite')
+    implementation project(path: ':AudioPlayer')
+    implementation project(path: ':VideoTool')
 
     //自己封装的库,都有对应的案例项目【欢迎star】:https://github.com/yangchong211
     implementation 'cn.yc:YCStatusBarLib:1.5.0'
-    implementation 'com.yc:PagerLib:1.0.4'
+    implementation 'com.github.yangchong211:YCScrollPager:1.0.5'
     implementation 'cn.yc:YCStateLib:1.2.2'
 
 }

+ 1 - 3
Demo/src/main/java/com/yc/ycvideoplayer/music/MusicPlayerActivity.java

@@ -125,9 +125,7 @@ public class MusicPlayerActivity extends AppCompatActivity implements View.OnCli
                 if (BaseAppHelper.get().getMusicService().isDefault()) {
                     if (BaseAppHelper.get().getMusicList().size() > 0) {
                         int mPlayPosition;
-                        if (BaseAppHelper.get().getMusicService().getPlayingMusic() != null &&
-                                BaseAppHelper.get().getMusicService().getPlayingMusic().getType()
-                                        == AudioBean.Type.LOCAL) {
+                        if (BaseAppHelper.get().getMusicService().getPlayingMusic() != null ) {
                             mPlayPosition = BaseAppHelper.get().getMusicService().getPlayingPosition();
                         } else {
                             mPlayPosition = 0;

+ 5 - 4
Demo/src/main/java/com/yc/ycvideoplayer/music/PlayMusicFragment.java

@@ -21,7 +21,7 @@ import androidx.annotation.Nullable;
 import androidx.fragment.app.Fragment;
 import androidx.fragment.app.FragmentActivity;
 
-import com.yc.music.config.MusicConstant;
+import com.yc.music.config.MusicConstants;
 import com.yc.music.config.PlayModeEnum;
 import com.yc.music.inter.OnPlayerEventListener;
 import com.yc.music.model.AudioBean;
@@ -303,6 +303,7 @@ public class PlayMusicFragment extends Fragment implements View.OnClickListener,
         } else if (i == R.id.iv_other) {
 
         } else {
+
         }
     }
 
@@ -325,7 +326,7 @@ public class PlayMusicFragment extends Fragment implements View.OnClickListener,
     }
 
     private void switchPlayMode() {
-        int playMode = VideoSpUtils.getInstance(MusicConstant.SP_NAME).getInt(MusicConstant.PLAY_MODE, 0);
+        int playMode = VideoSpUtils.getInstance(MusicConstants.SP_NAME).getInt(MusicConstants.PLAY_MODE, 0);
         PlayModeEnum mode = PlayModeEnum.valueOf(playMode);
         switch (mode) {
             case LOOP:
@@ -340,13 +341,13 @@ public class PlayMusicFragment extends Fragment implements View.OnClickListener,
             default:
                 break;
         }
-        VideoSpUtils.getInstance(MusicConstant.SP_NAME).put(MusicConstant.PLAY_MODE, mode.value());
+        VideoSpUtils.getInstance(MusicConstants.SP_NAME).put(MusicConstants.PLAY_MODE, mode.value());
         initPlayMode();
     }
 
 
     private void initPlayMode() {
-        int playMode = VideoSpUtils.getInstance(MusicConstant.SP_NAME).getInt(MusicConstant.PLAY_MODE, 0);
+        int playMode = VideoSpUtils.getInstance(MusicConstants.SP_NAME).getInt(MusicConstants.PLAY_MODE, 0);
         ivMode.setImageLevel(playMode);
     }
 

+ 9 - 87
Demo/src/main/res/layout/activity_music_player.xml

@@ -27,96 +27,18 @@
     </androidx.appcompat.widget.Toolbar>
 
 
-    <ScrollView
+    <FrameLayout
         android:layout_width="match_parent"
-        android:layout_height="0dp"
-        android:layout_weight="1">
-        <LinearLayout
+        android:layout_height="match_parent">
+        <androidx.recyclerview.widget.RecyclerView
+            android:id="@+id/recyclerView"
             android:layout_width="match_parent"
+            android:layout_height="match_parent"/>
+        <include layout="@layout/include_play_bar"
+            android:layout_gravity="bottom"
             android:layout_height="wrap_content"
-            android:orientation="vertical"
-            android:padding="10dp">
-            <TextView
-                android:id="@+id/tv_1"
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:layout_marginTop="10dp"
-                android:padding="10dp"
-                android:background="@color/colorAccent"
-                android:text="1.最原生的播放器"/>
-            <TextView
-                android:id="@+id/tv_2"
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:layout_marginTop="10dp"
-                android:padding="10dp"
-                android:background="@color/colorAccent"
-                android:text="2.ijk原生播放器"/>
-            <TextView
-                android:id="@+id/tv_3"
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:layout_marginTop="10dp"
-                android:padding="10dp"
-                android:background="@color/colorAccent"
-                android:text="3.exo原生播放器"/>
+            android:layout_width="match_parent"/>
+    </FrameLayout>
 
 
-            <LinearLayout
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:orientation="horizontal">
-
-                <TextView
-                    android:id="@+id/tv_start"
-                    android:layout_width="0dp"
-                    android:layout_height="wrap_content"
-                    android:layout_marginTop="10dp"
-                    android:layout_marginRight="10dp"
-                    android:gravity="center"
-                    android:layout_weight="1"
-                    android:background="@color/colorAccent"
-                    android:padding="10dp"
-                    android:text="播放" />
-
-                <TextView
-                    android:id="@+id/tv_stop"
-                    android:layout_width="0dp"
-                    android:layout_height="wrap_content"
-                    android:layout_marginTop="10dp"
-                    android:layout_marginRight="10dp"
-                    android:layout_weight="1"
-                    android:gravity="center"
-                    android:background="@color/colorAccent"
-                    android:padding="10dp"
-                    android:text="暂停" />
-
-                <TextView
-                    android:id="@+id/tv_next"
-                    android:layout_width="0dp"
-                    android:layout_height="wrap_content"
-                    android:layout_marginTop="10dp"
-                    android:layout_marginRight="10dp"
-                    android:layout_weight="1"
-                    android:gravity="center"
-                    android:background="@color/colorAccent"
-                    android:padding="10dp"
-                    android:text="下一首" />
-
-                <TextView
-                    android:id="@+id/tv_pre"
-                    android:layout_width="wrap_content"
-                    android:layout_height="wrap_content"
-                    android:layout_marginTop="10dp"
-                    android:background="@color/colorAccent"
-                    android:gravity="center"
-                    android:padding="10dp"
-                    android:text="上一首" />
-            </LinearLayout>
-
-        </LinearLayout>
-    </ScrollView>
-
-    <include layout="@layout/include_play_bar"/>
-
 </LinearLayout>

+ 1 - 1
MusicPlayer/src/main/java/com/yc/music/config/MusicConstant.java → MusicPlayer/src/main/java/com/yc/music/config/MusicConstants.java

@@ -1,6 +1,6 @@
 package com.yc.music.config;
 
-public class MusicConstant {
+public class MusicConstants {
 
     public static final String SP_NAME = "yc";
     public static final String EXTRA_NOTIFICATION = "extra_notification";

+ 7 - 7
MusicPlayer/src/main/java/com/yc/music/impl/PlayAudioImpl.java

@@ -5,7 +5,7 @@ import android.content.Intent;
 import android.content.IntentFilter;
 import android.media.AudioManager;
 import android.media.MediaPlayer;
-import com.yc.music.config.MusicConstant;
+import com.yc.music.config.MusicConstants;
 import com.yc.music.config.MusicPlayAction;
 import com.yc.music.config.PlayModeEnum;
 import com.yc.music.inter.InterPlayAudio;
@@ -112,7 +112,7 @@ public class PlayAudioImpl implements InterPlayAudio {
         VideoLogUtils.e("PlayService"+"----id----"+ id);
         //保存当前播放的musicId,下次进来可以记录状态
         long musicId = Long.parseLong(id);
-        VideoSpUtils.getInstance(MusicConstant.SP_NAME).put(MusicConstant.MUSIC_ID,musicId);
+        VideoSpUtils.getInstance(MusicConstants.SP_NAME).put(MusicConstants.MUSIC_ID,musicId);
         play(music);
     }
 
@@ -262,7 +262,7 @@ public class PlayAudioImpl implements InterPlayAudio {
         if (audioMusics.isEmpty()) {
             return;
         }
-        int playMode = VideoSpUtils.getInstance(MusicConstant.SP_NAME).getInt(MusicConstant.PLAY_MODE, 0);
+        int playMode = VideoSpUtils.getInstance(MusicConstants.SP_NAME).getInt(MusicConstants.PLAY_MODE, 0);
         int size = audioMusics.size();
         PlayModeEnum mode = PlayModeEnum.valueOf(playMode);
         switch (mode) {
@@ -297,7 +297,7 @@ public class PlayAudioImpl implements InterPlayAudio {
         if (audioMusics.isEmpty()) {
             return;
         }
-        int playMode = VideoSpUtils.getInstance(MusicConstant.SP_NAME).getInt(MusicConstant.PLAY_MODE, 0);
+        int playMode = VideoSpUtils.getInstance(MusicConstants.SP_NAME).getInt(MusicConstants.PLAY_MODE, 0);
         int size = audioMusics.size();
         PlayModeEnum mode = PlayModeEnum.valueOf(playMode);
         switch (mode) {
@@ -559,7 +559,7 @@ public class PlayAudioImpl implements InterPlayAudio {
         //来电/耳机
         filter.addAction(AudioManager.ACTION_AUDIO_BECOMING_NOISY);
         //锁屏
-        filter.addAction(MusicConstant.LOCK_SCREEN_ACTION);
+        filter.addAction(MusicConstants.LOCK_SCREEN_ACTION);
         //当屏幕灭了
         filter.addAction(Intent.ACTION_SCREEN_OFF);
         //当屏幕亮了
@@ -573,7 +573,7 @@ public class PlayAudioImpl implements InterPlayAudio {
      */
     public void updatePlayingPosition() {
         int position = 0;
-        long id = VideoSpUtils.getInstance(MusicConstant.SP_NAME).getLong(MusicConstant.MUSIC_ID,-1);
+        long id = VideoSpUtils.getInstance(MusicConstants.SP_NAME).getLong(MusicConstants.MUSIC_ID,-1);
         if(audioMusics.isEmpty()){
             return;
         }
@@ -587,7 +587,7 @@ public class PlayAudioImpl implements InterPlayAudio {
         }
         mPlayingPosition = position;
         long musicId = Long.parseLong(audioMusics.get(mPlayingPosition).getId());
-        VideoSpUtils.getInstance(MusicConstant.SP_NAME).put(MusicConstant.MUSIC_ID,musicId);
+        VideoSpUtils.getInstance(MusicConstants.SP_NAME).put(MusicConstants.MUSIC_ID,musicId);
     }
 
 

+ 16 - 0
MusicPlayer/src/main/java/com/yc/music/inter/OnScreenChangeListener.java

@@ -0,0 +1,16 @@
+package com.yc.music.inter;
+
+/**
+ * <pre>
+ *     @author yangchong
+ *     email  : yangchong211@163.com
+ *     time  : 2017/5/6
+ *     desc  : 屏幕亮和灭监听listener
+ *     revise:
+ * </pre>
+ */
+public interface OnScreenChangeListener {
+
+    void screenChange(boolean isOff);
+
+}

+ 0 - 33
MusicPlayer/src/main/java/com/yc/music/model/AudioBean.java

@@ -13,8 +13,6 @@ import java.io.Serializable;
  */
 public class AudioBean implements Serializable {
 
-    // 歌曲类型:本地/网络
-    private Type type;
     // [本地歌曲]歌曲id
     private String id;
     // 音乐标题
@@ -31,23 +29,7 @@ public class AudioBean implements Serializable {
     private long duration;
     // 音乐路径
     private String path;
-    // 文件名
-    private String fileName;
-    // 文件大小
-    private long fileSize;
 
-    public enum Type {
-        LOCAL,
-        ONLINE
-    }
-
-    public Type getType() {
-        return type;
-    }
-
-    public void setType(Type type) {
-        this.type = type;
-    }
 
     public String getId() {
         return id;
@@ -113,21 +95,6 @@ public class AudioBean implements Serializable {
         this.path = path;
     }
 
-    public String getFileName() {
-        return fileName;
-    }
-
-    public void setFileName(String fileName) {
-        this.fileName = fileName;
-    }
-
-    public long getFileSize() {
-        return fileSize;
-    }
-
-    public void setFileSize(long fileSize) {
-        this.fileSize = fileSize;
-    }
 
     /**
      * 思考为什么要重写这两个方法

+ 3 - 3
MusicPlayer/src/main/java/com/yc/music/receiver/AudioBroadcastReceiver.java

@@ -4,7 +4,7 @@ import android.content.BroadcastReceiver;
 import android.content.Context;
 import android.content.Intent;
 
-import com.yc.music.config.MusicConstant;
+import com.yc.music.config.MusicConstants;
 import com.yc.music.service.PlayAudioService;
 import com.yc.videotool.VideoLogUtils;
 
@@ -21,8 +21,8 @@ public class AudioBroadcastReceiver extends BroadcastReceiver {
         if(action!=null && action.length()>0){
             switch (action){
                 //锁屏时处理的逻辑
-                case MusicConstant.LOCK_SCREEN_ACTION:
-                    PlayAudioService.startCommand(context, MusicConstant.LOCK_SCREEN_ACTION);
+                case MusicConstants.LOCK_SCREEN_ACTION:
+                    PlayAudioService.startCommand(context, MusicConstants.LOCK_SCREEN_ACTION);
                     VideoLogUtils.e("AudioBroadcastReceiver"+"---LOCK_SCREEN");
                     break;
                 //当屏幕灭了

+ 13 - 63
MusicPlayer/src/main/java/com/yc/music/service/PlayAudioService.java

@@ -8,12 +8,13 @@ import android.os.Message;
 
 import androidx.annotation.NonNull;
 
-import com.yc.music.config.MusicConstant;
+import com.yc.music.config.MusicConstants;
 import com.yc.music.config.MusicPlayAction;
 import com.yc.music.delegate.PlayAudioDelegate;
 import com.yc.music.impl.PlayAudioImpl;
 import com.yc.music.inter.InterPlayAudio;
 import com.yc.music.inter.OnPlayerEventListener;
+import com.yc.music.inter.OnScreenChangeListener;
 import com.yc.music.model.AudioBean;
 import com.yc.music.tool.BaseAppHelper;
 import com.yc.music.tool.QuitTimerHelper;
@@ -31,15 +32,12 @@ import com.yc.videotool.VideoLogUtils;
  */
 public class PlayAudioService extends AbsAudioService {
 
-    /**
-     * 是否锁屏了,默认是false
-     */
-    private boolean mIsLocked = false;
     private InterPlayAudio mDelegate;
     /**
      * 播放进度监听器
      */
     private OnPlayerEventListener mListener;
+    private OnScreenChangeListener mOnScreenChangeListener;
     /**
      * 更新播放进度的显示,时间的显示
      */
@@ -132,17 +130,22 @@ public class PlayAudioService extends AbsAudioService {
                     playPause();
                     break;
                 //添加锁屏界面
-                case MusicConstant.LOCK_SCREEN_ACTION:
-                    VideoLogUtils.e("PlayService"+"---LOCK_SCREEN"+mIsLocked);
+                case MusicConstants.LOCK_SCREEN_ACTION:
+                    VideoLogUtils.e("PlayService"+"---LOCK_SCREEN");
                     break;
                 //当屏幕灭了,添加锁屏页面
                 case Intent.ACTION_SCREEN_OFF:
-                    startLockAudioActivity();
                     VideoLogUtils.e("PlayService"+"---当屏幕灭了");
+                    if (mOnScreenChangeListener!=null){
+                        mOnScreenChangeListener.screenChange(true);
+                    }
                     break;
                 //当屏幕亮了
                 case Intent.ACTION_SCREEN_ON:
                     VideoLogUtils.e("PlayService"+"---当屏幕亮了");
+                    if (mOnScreenChangeListener!=null){
+                        mOnScreenChangeListener.screenChange(false);
+                    }
                     break;
                 default:
                     break;
@@ -289,44 +292,6 @@ public class PlayAudioService extends AbsAudioService {
         stopSelf();
     }
 
-//
-//    /**
-//     * 扫描音乐
-//     */
-//    @SuppressLint("StaticFieldLeak")
-//    public void updateMusicList(final EventCallback<Void> callback) {
-//        new AsyncTask<Void, Void, List<AudioBean>>() {
-//            @Override
-//            protected List<AudioBean> doInBackground(Void... params) {
-//                return FileMusicScanManager.getInstance().scanMusic(PlayService.this);
-//            }
-//
-//            @Override
-//            protected void onPostExecute(List<AudioBean> musicList) {
-//                //首先先清空
-//                //然后添加所有扫描到的音乐
-//                BaseAppHelper.get().setMusicList(musicList);
-//
-//                //如果获取音乐数据集合不为空
-//                if (!BaseAppHelper.get().getMusicList().isEmpty()) {
-//                    //音频的集合
-//                    audioMusics = BaseAppHelper.get().getMusicList();
-//                    //刷新正在播放的本地歌曲的序号
-//                    updatePlayingPosition();
-//                    //获取正在播放的音乐
-//                    if(mPlayingPosition>=0){
-//                        mPlayingMusic = BaseAppHelper.get().getMusicList().get(mPlayingPosition);
-//                    }
-//                }
-//                if (callback != null) {
-//                    callback.onEvent(null);
-//                }
-//            }
-//        }.execute();
-//    }
-
-
-
     /**
      * 获取播放进度监听器对象
      * @return                  OnPlayerEventListener对象
@@ -344,22 +309,7 @@ public class PlayAudioService extends AbsAudioService {
         mDelegate.setOnPlayEventListener(mListener);
     }
 
-
-    /**-------------------------------------添加锁屏界面----------------------------------------*/
-
-
-    /**
-     * 打开锁屏页面,这块伤透了脑筋
-     * 不管是播放状态是哪一个,只要屏幕灭了到亮了,就展现这个锁屏页面
-     * 有些APP限制了状态,比如只有播放时才走这个逻辑
-     */
-    private void startLockAudioActivity() {
-//        if(!mIsLocked && isPlaying()){
-//            Intent lockScreen = new Intent(this, LockAudioActivity.class);
-//            lockScreen.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
-//            startActivity(lockScreen);
-//            BaseConfig.INSTANCE.setLocked(true);
-//        }
+    public void setOnScreenChangeListener(OnScreenChangeListener onScreenChangeListener) {
+        this.mOnScreenChangeListener = onScreenChangeListener;
     }
-
 }

+ 3 - 1
README.md

@@ -137,14 +137,16 @@
     |**com.github.yangchong211.YCVideoPlayer:VideoKernel:1.1.0** | 视频播放器内核(ijk,exo,media,其他) |
     |**com.github.yangchong211.YCVideoPlayer:VideoView:1.1.0** | 视频播放悬浮窗,全局悬浮,单个activity悬浮 |
     |**com.github.yangchong211.YCVideoPlayer:MusicPlayer:1.1.0** | 音频播放器库 |
-    |**com.github.yangchong211.YCVideoPlayer:VideoM3u8:1.1.0** | m3u8库 |
+    |**com.github.yangchong211.YCVideoPlayer:VideoM3u8:1.1.0** | m3u8库(参考其他案例) |
     |**com.github.yangchong211.YCVideoPlayer:VideoSqlLite:1.1.0** | 视频播放位置记录,二级缓存库 |
     |**com.github.yangchong211.YCVideoPlayer:AudioPlayer:1.1.0** | 语音文字类播放器 |
     |**com.github.yangchong211.YCVideoPlayer:VideoCache:1.1.0** | 边播边缓存库 |
+    - 备注:其中 MusicPlayer 音频播放器,是将之前的项目功能摘出来,具体demo可以参考我另一个项目,[音频播放器](https://github.com/yangchong211/YCAudioPlayer)。
 - 开发中或抽取中,待上传库
     |**com.github.yangchong211.YCVideoPlayer:VideoScreen:1.1.0** | 视频截图和GIF截图 |
     |**com.github.yangchong211.YCVideoPlayer:VideoRecorder:1.1.0** | 视频录频 |
     |**com.github.yangchong211.YCVideoPlayer:VideoMonitor:1.1.0** | 视频监控库 |
+- 关于案例中仿抖音滑动视频
 
 
 

+ 0 - 0
ReadMeWiki/00.方案实践/01.视频播放器封装思路.md → ReadMeWiki/00.方案实践/01.通用音视频播放器实践.md


+ 4 - 10
ReadMeWiki/00.方案实践/03.播放器UI抽取封装.md

@@ -1,14 +1,8 @@
-# 06.视频播放器UI抽取封装
+# 视频播放器UI抽取封装
 #### 目录介绍
-- 01.视频播放器UI封装需求
-- 02.播放器UI架构图
-- 03.如何分离播放和UI分离
-- 04.VideoPlayer如何实现
-- 05.VideoController实现
-- 06.播放Player和UI通信
-- 07.如何添加自定义播放视图
-- 08.关于播放器视图层级
-- 09.视频播放器重力感应监听
+
+
+
 
 
 

+ 3 - 3
VideoPlayer/src/main/java/com/yc/video/ui/pip/FloatVideoManager.java

@@ -37,9 +37,9 @@ public class FloatVideoManager {
     //画中画
     public static final String PIP = "pip";
     private static FloatVideoManager instance;
-    private VideoPlayer mVideoPlayer;
-    private FloatVideoView mFloatView;
-    private CustomFloatController mFloatController;
+    private final VideoPlayer mVideoPlayer;
+    private final FloatVideoView mFloatView;
+    private final CustomFloatController mFloatController;
     private boolean mIsShowing;
     private int mPlayingPosition = -1;
     private Class mActClass;