zhaoyadi 2 anni fa
parent
commit
1473b268e4

+ 5 - 5
kit/schemas/com.tencent.liteav.demo.superplayer.database.PlayerDatabase/1.json

@@ -2,11 +2,11 @@
   "formatVersion": 1,
   "database": {
     "version": 1,
-    "identityHash": "91abebf2295ad0620929378bc9e9a263",
+    "identityHash": "07129d18ed0be4586bc446d69838e147",
     "entities": [
       {
         "tableName": "History",
-        "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `start` INTEGER NOT NULL, `end` INTEGER NOT NULL, `course_id` TEXT NOT NULL, `section_id` TEXT, `date` TEXT, `ct_id` TEXT)",
+        "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `start` INTEGER NOT NULL, `end` INTEGER NOT NULL, `course_id` TEXT NOT NULL, `section_id` TEXT NOT NULL, `date` TEXT NOT NULL, `ct_id` TEXT)",
         "fields": [
           {
             "fieldPath": "id",
@@ -36,13 +36,13 @@
             "fieldPath": "sectionId",
             "columnName": "section_id",
             "affinity": "TEXT",
-            "notNull": false
+            "notNull": true
           },
           {
             "fieldPath": "date",
             "columnName": "date",
             "affinity": "TEXT",
-            "notNull": false
+            "notNull": true
           },
           {
             "fieldPath": "countDown",
@@ -108,7 +108,7 @@
     "views": [],
     "setupQueries": [
       "CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)",
-      "INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, '91abebf2295ad0620929378bc9e9a263')"
+      "INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, '07129d18ed0be4586bc446d69838e147')"
     ]
   }
 }

+ 2 - 1
kit/src/main/java/com/tencent/liteav/demo/superplayer/SuperPlayerView.java

@@ -171,7 +171,6 @@ public class SuperPlayerView extends RelativeLayout implements TimeoutUtil.Liste
         mPlayerViewCallback.onPlayPrepare(playIndex, playModel);
     }
 
-    /* 播放指定的 */
     public void playIndexModel(int index) {
         playModelInList(index);
     }
@@ -181,6 +180,7 @@ public class SuperPlayerView extends RelativeLayout implements TimeoutUtil.Liste
         maybePlayIndexModel(++mPlayIndex);
     }
 
+    /* 播放指定的 */
     private void playModelInList(int index) {
         if (mIsTimeOut) return;
         if ((index >= mSuperPlayerModelList.size())) return;
@@ -262,6 +262,7 @@ public class SuperPlayerView extends RelativeLayout implements TimeoutUtil.Liste
         mIsPlayInit = false;
         mSuperPlayer.stopCast();
         switchPlayMode(SuperPlayerDef.PlayerMode.WINDOW);
+        mIsPlayInit = true;
     }
 
     @Override

+ 84 - 56
kit/src/main/java/com/tencent/liteav/demo/superplayer/player/SuperPlayerImpl.java

@@ -29,6 +29,7 @@ import com.tencent.rtmp.ui.TXCloudVideoView;
 
 import org.fourthline.cling.model.meta.Device;
 import org.fourthline.cling.support.model.PositionInfo;
+import org.fourthline.cling.support.model.TransportState;
 
 import java.io.File;
 import java.util.UUID;
@@ -45,7 +46,6 @@ public class SuperPlayerImpl implements SuperPlayer, ITXVodPlayListener {
     private SuperPlayerDef.PlayerMode mCurrentPlayMode = SuperPlayerDef.PlayerMode.WINDOW;    // 当前播放模式
     private SuperPlayerDef.PlayerState mCurrentPlayState = SuperPlayerDef.PlayerState.INIT;
 
-    private String mCurrentPlayVideoURL;    // 当前播放的URL
     private float mStartPos;                // 视频开始播放时间
 
     private boolean isPrepared = false;
@@ -54,7 +54,6 @@ public class SuperPlayerImpl implements SuperPlayer, ITXVodPlayListener {
     private boolean mTimeout = false;
     private boolean isPauseByTimeout = false;
     private boolean isPauseByCasting = false;
-    private boolean isStartBySeek = false;
 
     private long mCurrent = 0L;
     private long mStartPoint = 0L;
@@ -87,6 +86,9 @@ public class SuperPlayerImpl implements SuperPlayer, ITXVodPlayListener {
         public void onSuccess(String result) {
             positionHandler.start(0);
             updatePlayerState(SuperPlayerDef.PlayerState.INIT);
+            updatePlayerState(SuperPlayerDef.PlayerState.PLAYING);
+
+            DLNACastManager.getInstance().seekTo(mCurrent * 1000);
         }
 
         @Override
@@ -122,8 +124,8 @@ public class SuperPlayerImpl implements SuperPlayer, ITXVodPlayListener {
     private ICastInterface.StopEventListener stopEventListener = new ICastInterface.StopEventListener() {
         @Override
         public void onSuccess(Void result) {
-            positionHandler.stop();
             updatePlayerState(SuperPlayerDef.PlayerState.END);
+            positionHandler.stop();
         }
 
         @Override
@@ -144,6 +146,15 @@ public class SuperPlayerImpl implements SuperPlayer, ITXVodPlayListener {
         }
     };
 
+    private ICastInterface.ISubscriptionListener subscriptionListener = new ICastInterface.ISubscriptionListener() {
+        @Override
+        public void onSubscriptionTransportStateChanged(TransportState event) {
+            if (event == TransportState.STOPPED) {
+                updatePlayerState(SuperPlayerDef.PlayerState.END);
+            }
+        }
+    };
+
     public SuperPlayerImpl(Context context, TXCloudVideoView videoView) {
         mVideoView = videoView;
 
@@ -155,7 +166,6 @@ public class SuperPlayerImpl implements SuperPlayer, ITXVodPlayListener {
         mNeedToPause = value;
     }
 
-
     /**
      * 点播播放器事件回调
      *
@@ -274,6 +284,8 @@ public class SuperPlayerImpl implements SuperPlayer, ITXVodPlayListener {
                 stopEventListener,
                 seekToEventListener
         );
+
+        DLNACastManager.getInstance().registerSubscriptionListener(subscriptionListener);
     }
 
     /**
@@ -293,7 +305,16 @@ public class SuperPlayerImpl implements SuperPlayer, ITXVodPlayListener {
 
         if (!isCasting) {
             mVodPlayer.setPlayerView(mVideoView);
-            playVodURL(videoURL);
+
+            if (mVodPlayer != null) {
+                mVodPlayer.setStartTime(mStartPos);
+                mVodPlayer.setAutoPlay(true);
+                mVodPlayer.setVodListener(this);
+                mVodPlayer.setToken(null);
+                mVodPlayer.startPlay(videoURL);
+
+                mStartPos = 0;
+            }
         } else {
             if (castDevice != null) {
                 DLNACastManager.getInstance().cast(
@@ -305,24 +326,6 @@ public class SuperPlayerImpl implements SuperPlayer, ITXVodPlayListener {
         updatePlayProgress(0, model.duration);
     }
 
-    /**
-     * 播放点播url
-     */
-    private void playVodURL(String url) {
-        if (url == null || "".equals(url)) {
-            return;
-        }
-        mCurrentPlayVideoURL = url;
-
-        if (mVodPlayer != null) {
-            mVodPlayer.setStartTime(mStartPos);
-            mVodPlayer.setAutoPlay(true);
-            mVodPlayer.setVodListener(this);
-            mVodPlayer.setToken(null);
-            mVodPlayer.startPlay(url);
-        }
-    }
-
     /**
      * 更新播放进度
      *
@@ -371,18 +374,34 @@ public class SuperPlayerImpl implements SuperPlayer, ITXVodPlayListener {
 
         switch (playState) {
             case PLAYING:
-                if (isStartBySeek) {
-                    isStartBySeek = false;
+                if (!isCasting) {
+                    mStartPoint = (int) mVodPlayer.getCurrentPlaybackTime();
                 } else {
-                    mStartPoint = mCurrent;
+                    DLNACastManager.getInstance().getPositionInfo(castDevice, new ICastInterface.GetInfoListener<PositionInfo>() {
+                        @Override
+                        public void onGetInfoResult(@Nullable PositionInfo positionInfo, @Nullable String errMsg) {
+                            if (positionInfo != null) {
+                                mStartPoint = parseTime(positionInfo.getRelTime());
+                            }
+                        }
+                    });
                 }
                 break;
             case PAUSE:
             case END:
-                mEndPoint = mCurrent;
-                if (mCurrentModel != null) {
-                    HistoryUtil.INSTANCE.sendHistory(mStartPoint, mEndPoint, mCurrentModel.sectionId);
+                if (!isCasting) {
+                    mEndPoint = (int) mVodPlayer.getCurrentPlaybackTime();
+                } else {
+                    DLNACastManager.getInstance().getPositionInfo(castDevice, new ICastInterface.GetInfoListener<PositionInfo>() {
+                        @Override
+                        public void onGetInfoResult(@Nullable PositionInfo positionInfo, @Nullable String errMsg) {
+                            if (positionInfo != null) {
+                                mEndPoint = parseTime(positionInfo.getRelTime());
+                            }
+                        }
+                    });
                 }
+                saveHistory();
                 break;
         }
     }
@@ -413,11 +432,7 @@ public class SuperPlayerImpl implements SuperPlayer, ITXVodPlayListener {
     public void restart() {
         if (mTimeout) return;
 
-        if (mCurrentPlayVideoURL != null) {
-            playVodURL(mCurrentPlayVideoURL);
-        } else {
-            playWithModel(mCurrentModel);
-        }
+        playWithModel(mCurrentModel);
     }
 
     @Override
@@ -468,16 +483,18 @@ public class SuperPlayerImpl implements SuperPlayer, ITXVodPlayListener {
         this.mTimeout = timeout;
 
         if (timeout) {
-            if (mCurrentPlayState == SuperPlayerDef.PlayerState.PLAYING || mCurrentPlayState == SuperPlayerDef.PlayerState.LOADING) {
-                isPauseByTimeout = true;
-                pause();
+            if (!isCasting) {
+                if (mCurrentPlayState == SuperPlayerDef.PlayerState.PLAYING || mCurrentPlayState == SuperPlayerDef.PlayerState.LOADING) {
+                    isPauseByTimeout = true;
+                    pause();
+                }
+            } else {
+                stopCast();
             }
         } else {
             mStartPoint = mEndPoint;
 
-            if (mCurrentModel != null) {
-                HistoryUtil.INSTANCE.sendHistory(mStartPoint, mEndPoint, mCurrentModel.sectionId);
-            }
+            saveHistory();
 
             if (isPauseByTimeout) {
                 resume();
@@ -512,25 +529,30 @@ public class SuperPlayerImpl implements SuperPlayer, ITXVodPlayListener {
 
     @Override
     public void seek(int position) {
-        if (mCurrentModel != null) {
+        if (!isCasting) {
+            mEndPoint = (int) mVodPlayer.getCurrentPlaybackTime();
+            saveHistory();
+        } else {
             final long start = mStartPoint;
-            final long end = mEndPoint;
 
-            HistoryUtil.INSTANCE.sendHistory(start, end, mCurrentModel.sectionId);
+            DLNACastManager.getInstance().getPositionInfo(castDevice, (positionInfo, errMsg) -> {
+                if (positionInfo != null) {
+                    mEndPoint = parseTime(positionInfo.getRelTime());
+
+                    if (mCurrentModel != null) {
+                        HistoryUtil.INSTANCE.sendHistory(start, mEndPoint, mCurrentModel.sectionId);
+                    }
+                }
+            });
         }
 
         mStartPoint = position;
-        isStartBySeek = true;
 
         if (!isCasting) {
-            if (mVodPlayer != null) {
-                mVodPlayer.seek(position);
-                if (!mVodPlayer.isPlaying()) {
-                    mVodPlayer.resume();
-                }
-            }
+            mVodPlayer.seek(position);
+            mVodPlayer.resume();
         } else {
-            DLNACastManager.getInstance().seekTo(position);
+            DLNACastManager.getInstance().seekTo(position * 1000L);
         }
 
         if (mObserver != null) {
@@ -564,14 +586,14 @@ public class SuperPlayerImpl implements SuperPlayer, ITXVodPlayListener {
     public void stopCast() {
         if (!isCasting) return;
 
+        mStartPos = mCurrent;
+
         DLNACastManager.getInstance().unregisterActionCallbacks();
         DLNACastManager.getInstance().stop();
         castDevice = null;
+        isCasting = false;
 
-        if (isPauseByCasting) {
-            playWithModel(mCurrentModel);
-            mVodPlayer.seek(mCurrent);
-        }
+        playWithModel(mCurrentModel);
     }
 
     @Override
@@ -600,6 +622,13 @@ public class SuperPlayerImpl implements SuperPlayer, ITXVodPlayListener {
         mVodPlayer.setStartTime(startPos);
     }
 
+    private void saveHistory() {
+        Log.d(TAG, "saveHistory: " + mStartPoint + " - " + mEndPoint);
+        if (mCurrentModel != null) {
+            HistoryUtil.INSTANCE.sendHistory(mStartPoint, mEndPoint, mCurrentModel.sectionId);
+        }
+    }
+
     private static long parseTime(String time) {
         String[] split = time.split(":");
         long parsedTime = 0, radix = 1;
@@ -611,7 +640,6 @@ public class SuperPlayerImpl implements SuperPlayer, ITXVodPlayListener {
         return parsedTime;
     }
 
-
     private static class CircleMessageHandler extends Handler {
         private static final int MSG = 101;
 

+ 6 - 0
kit/src/main/kotlin/com/tencent/liteav/demo/superplayer/database/dao/HistoryDao.kt

@@ -31,4 +31,10 @@ public interface HistoryDao {
         countDown: String,
         date: String,
     ): List<History>
+
+    @Query("SELECT DISTINCT section_id FROM History WHERE course_id = :courseId")
+    fun queryAllHistory(courseId: String): List<History>
+
+    @Query("SELECT * FROM History WHERE course_id = :courseId AND section_id = :sectionId")
+    fun queryAllSectionHistory(courseId: String, sectionId: String): List<History>
 }

+ 2 - 2
kit/src/main/kotlin/com/tencent/liteav/demo/superplayer/database/entity/History.kt

@@ -23,10 +23,10 @@ data class History(
     val courseId: String,
 
     @ColumnInfo(name = "section_id")
-    val sectionId: String?,
+    val sectionId: String,
 
     @ColumnInfo(name = "date")
-    val date: String?,
+    val date: String,
 
     @ColumnInfo(name = "ct_id")
     val countDown: String? = null,

+ 10 - 0
kit/src/main/kotlin/com/tencent/liteav/demo/superplayer/database/repo/PlayerRepository.kt

@@ -55,4 +55,14 @@ public class PlayerRepository(
         val date = dateFormat.format(Date())
         return historyDao.queryTodayDurationHistory(courseId, countDown, date)
     }
+
+    // 先查询保存了哪几个小节的记录
+    fun queryAllHistory(courseId: String): List<History> {
+        return historyDao.queryAllHistory(courseId)
+    }
+
+    // 再依次查询每小节对应的记录
+    fun queryAllSectionHistory(courseId: String, sectionId: String): List<History> {
+        return historyDao.queryAllSectionHistory(courseId, sectionId)
+    }
 }

+ 1 - 0
kit/src/main/kotlin/com/tencent/liteav/demo/superplayer/util/HistoryUtil.kt

@@ -16,6 +16,7 @@ object HistoryUtil {
     }
 
     public fun sendHistory(start: Long, end: Long, sectionId: String) {
+        if (end <= start) return
         for (listener in listeners) {
             listener.onHistory(start, end, sectionId)
         }

+ 520 - 576
ui/src/main/assets/data.json

@@ -1,588 +1,532 @@
 {
-  "id": "1540203667959226370",
-  "name": "小鸡彩虹英文版第二季",
-  "imgCover": "https://img.luojigou.vip/Fmsz81vTpT9iVWuws2tVOuDwI9kY",
-  "imgCoverMini": "https://img.luojigou.vip/FnV8CLD1Ci-oF2SAiDERZ6yV7Ez-",
-  "createTime": "2022-06-24 13:22:24",
-  "updateTime": "2022-06-24 13:22:56",
-  "price": 6.9,
-  "markingPrice": 7.9,
-  "categoryId": "1533687853001138178",
-  "courseCount": 13,
-  "aiCourseSpuId": "1540203667934060546",
-  "suitAge": "3-6",
-  "wxNumber": null,
-  "wxQrCode": null,
-  "wxName": null,
-  "wxHeadImg": null,
-  "description": "<p><img src=\"https://img.luojigou.vip/FsgZtHx8XTH3cQbwF-5xZbFdc8YG\" /></p>",
-  "mediaType": 0,
-  "simpleDescription": "国内独家首创的彩色水墨画风;严谨的幼儿内容研发体系,全新理念的世界观架构;绿色、健康、零暴力的内容!",
-  "sort": 998,
-  "showChapter": 0,
-  "courseType": 0,
-  "subCategoryId": "1533687853001138178",
-  "activityTag": null,
-  "courseTags": [],
-  "paidCount": 2,
-  "latestLearnedRecordId": null,
-  "latestLearnedRecord": null,
-  "abilityList": [],
-  "commentCount": 0,
-  "shareCount": 22,
-  "collectCount": 1,
-  "isCollect": 0,
-  "hasPaid": 0,
-  "isComment": 0,
-  "isShare": 0,
-  "imgCoverWidth": null,
-  "imgCoverHeight": null,
-  "shareUrl": "https://zaojiao.net/luojigou_web_shop_html/#/growTogether/group/course?id=1540203667959226370",
-  "shareUrlQRCode": "http://app.zaojiao.net//QRCode/aiCourse/sku?id=1540203667959226370",
-  "groupBuyActivity": null,
-  "groupBuyActivityId": null,
-  "groupBuyActivityUrl": null,
-  "show_cover_img": 0,
-  "spu": {
-    "id": "1540203667934060546",
-    "name": "小鸡彩虹英文版第二季",
-    "imgCover": "https://img.luojigou.vip/Fmsz81vTpT9iVWuws2tVOuDwI9kY",
-    "imgCoverMini": "https://img.luojigou.vip/FnV8CLD1Ci-oF2SAiDERZ6yV7Ez-",
-    "videoUrl": null,
-    "createTime": "2022-06-24 13:22:24",
-    "updateTime": "2022-06-24 13:22:56",
-    "price": 6.9,
-    "markingPrice": 7.9,
-    "categoryId": "1533687853001138178",
-    "suitAge": "3-6",
-    "parentNotice": null,
-    "courseCount": 13,
-    "description": null,
-    "outline": null,
-    "notice": null,
-    "simpleDescription": "国内独家首创的彩色水墨画风;严谨的幼儿内容研发体系,全新理念的世界观架构;绿色、健康、零暴力的内容!",
+  "status": 200,
+  "data": {
+    "id": "1539434275092762625",
+    "name": "细菌病毒特工队",
+    "imgCover": "https://img.luojigou.vip/FhwHdxUPiaNu8_KF3nEB4Reg1dUF",
+    "imgCoverMini": "https://img.luojigou.vip/Fi_4_0SMW-mEb6LW5gxOy9WdeUgR",
+    "createTime": "2022-06-22 10:25:07",
+    "updateTime": "2022-06-22 10:26:39",
+    "price": 45.00,
+    "markingPrice": 99.00,
+    "categoryId": "1533687977056067586",
+    "courseCount": 10,
+    "aiCourseSpuId": "1539434275029848065",
+    "suitAge": "4-12",
+    "wxNumber": null,
+    "wxQrCode": null,
+    "wxName": null,
+    "wxHeadImg": null,
+    "description": "<p><img src=\"https://img.luojigou.vip/Fhj9Nq4mNp4TjylUHqFjrsaMpDlI\" /></p>",
     "mediaType": 0,
-    "status": 1,
-    "isDelete": 0,
-    "sort": 998,
+    "simpleDescription": "给孩子的微生物百科和健康指南!",
+    "sort": 996,
     "showChapter": 0,
-    "isShow": true,
-    "showCoverImg": 0
-  },
-  "totalStarCount": 0,
-  "getStarCount": 0,
-  "chapterList": [
-    {
-      "id": "1540205198192320513",
-      "name": "第1章",
-      "createTime": "2022-06-24 13:28:29",
-      "updateTime": null,
-      "aiCourseSkuId": "1540203667959226370",
-      "sort": 0,
-      "coverImgUrl": null,
-      "itemList":[
-        {
-          "id": "1540205198213292034",
-          "name": "01 大苹果The Large Apple",
-          "videoId": "1540205198259429378",
-          "aiCourseSkuId": "1540203667959226370",
-          "sort": 0,
-          "createTime": "2022-06-24 13:28:29",
-          "updateTime": "2022-08-09 12:50:03",
-          "readCount": 622,
-          "aiCourseItemChapterId": "1540205198192320513",
-          "type": 0,
-          "payType": 1,
-          "freeTime": 0,
-          "audioId": null,
-          "imgCover": "https://img.luojigou.vip/FnV8CLD1Ci-oF2SAiDERZ6yV7Ez-?imageView2/0/q/50|imageslim",
-          "richText": null,
-          "splitList": null,
-          "hasReport": 1,
-          "clockInUserCount": "0",
-          "enable": 1,
-          "hasReply": 0,
-          "totalStarCount": 0,
-          "starList": [],
-          "readCountStr": "622",
-          "video": {
-            "id": "1540205198259429378",
-            "videoUrl": "http://video.training.luojigou.vip/lm6giVlUMxuYKuVaBRTxRr6SNiO__low.mp4",
-            "parentId": "1540205198213292034",
-            "createTime": "2022-06-24 13:28:29",
-            "updateTime": "2022-06-24 14:15:52",
-            "width": 1920,
-            "height": 1080,
-            "thumbnailUrl": "http://video.training.luojigou.vip/lm6giVlUMxuYKuVaBRTxRr6SNiO__low.mp4?vframe/jpg/offset/1",
-            "duration": "291.280000"
-          },
-          "hasClockIn": 0,
-          "getStarCount": 0
-        },
-        {
-          "id": "1540205198318149634",
-          "name": "02 堆云朵Building a Cloudman",
-          "videoId": "1540205198364286977",
-          "aiCourseSkuId": "1540203667959226370",
-          "sort": 1,
-          "createTime": "2022-06-24 13:28:29",
-          "updateTime": "2022-08-06 12:55:46",
-          "readCount": 57,
-          "aiCourseItemChapterId": "1540205198192320513",
-          "type": 0,
-          "payType": 0,
-          "freeTime": 0,
-          "audioId": null,
-          "imgCover": "https://img.luojigou.vip/FnV8CLD1Ci-oF2SAiDERZ6yV7Ez-?imageView2/0/q/50|imageslim",
-          "richText": null,
-          "splitList": null,
-          "hasReport": 1,
-          "clockInUserCount": "0",
-          "enable": 1,
-          "hasReply": 0,
-          "totalStarCount": 0,
-          "starList": [],
-          "readCountStr": "57",
-          "video": {
-            "id": "1540205198364286977",
-            "videoUrl": "http://video.training.luojigou.vip/lgkv47QjbYuMaH8CCPR-uPAvlGQG_low.mp4",
-            "parentId": "1540205198318149634",
-            "createTime": "2022-06-24 13:28:29",
-            "updateTime": "2022-06-24 14:15:52",
-            "width": 1920,
-            "height": 1080,
-            "thumbnailUrl": "http://video.training.luojigou.vip/lgkv47QjbYuMaH8CCPR-uPAvlGQG_low.mp4?vframe/jpg/offset/1",
-            "duration": "292.080000"
-          },
-          "hasClockIn": 0,
-          "getStarCount": 0
-        },
-        {
-          "id": "1540205198423007233",
-          "name": "03 小青的烦恼Berry’s Worries",
-          "videoId": "1540205198464950273",
-          "aiCourseSkuId": "1540203667959226370",
-          "sort": 2,
-          "createTime": "2022-06-24 13:28:29",
-          "updateTime": "2022-08-02 17:29:18",
-          "readCount": 32,
-          "aiCourseItemChapterId": "1540205198192320513",
-          "type": 0,
-          "payType": 0,
-          "freeTime": 0,
-          "audioId": null,
-          "imgCover": "https://img.luojigou.vip/FnV8CLD1Ci-oF2SAiDERZ6yV7Ez-?imageView2/0/q/50|imageslim",
-          "richText": null,
-          "splitList": null,
-          "hasReport": 1,
-          "clockInUserCount": "0",
-          "enable": 1,
-          "hasReply": 0,
-          "totalStarCount": 0,
-          "starList": [],
-          "readCountStr": "32",
-          "video": {
-            "id": "1540205198464950273",
-            "videoUrl": "http://video.training.luojigou.vip/lrf7sm2fUhLLL1rgCu2vykWG2H9j_low.mp4",
-            "parentId": "1540205198423007233",
-            "createTime": "2022-06-24 13:28:29",
-            "updateTime": "2022-06-24 14:15:52",
-            "width": 1920,
-            "height": 1080,
-            "thumbnailUrl": "http://video.training.luojigou.vip/lrf7sm2fUhLLL1rgCu2vykWG2H9j_low.mp4?vframe/jpg/offset/1",
-            "duration": "290.080000"
+    "courseType": 0,
+    "subCategoryId": "1533687977056067586",
+    "activityTag": null,
+    "courseTags": [],
+    "paidCount": 2,
+    "latestLearnedRecordId": null,
+    "latestLearnedRecord": null,
+    "abilityList": [],
+    "commentCount": 0,
+    "shareCount": 4,
+    "collectCount": 1,
+    "isCollect": 0,
+    "hasPaid": 1,
+    "isComment": 0,
+    "isShare": 0,
+    "imgCoverWidth": null,
+    "imgCoverHeight": null,
+    "shareUrl": "https://zaojiao.net/luojigou_web_shop_html/#/growTogether/group/course?id=1539434275092762625",
+    "shareUrlQRCode": "http://app.zaojiao.net//QRCode/aiCourse/sku?id=1539434275092762625",
+    "groupBuyActivity": null,
+    "groupBuyActivityId": null,
+    "groupBuyActivityUrl": null,
+    "show_cover_img": 0,
+    "spu": {
+      "id": "1539434275029848065",
+      "name": "细菌病毒特工队",
+      "imgCover": "https://img.luojigou.vip/FhwHdxUPiaNu8_KF3nEB4Reg1dUF",
+      "imgCoverMini": "https://img.luojigou.vip/Fi_4_0SMW-mEb6LW5gxOy9WdeUgR",
+      "videoUrl": null,
+      "createTime": "2022-06-22 10:25:07",
+      "updateTime": "2022-06-22 10:26:39",
+      "price": 45.00,
+      "markingPrice": 99.00,
+      "categoryId": "1533687977056067586",
+      "suitAge": "4-12",
+      "parentNotice": null,
+      "courseCount": 10,
+      "description": null,
+      "outline": null,
+      "notice": null,
+      "simpleDescription": "给孩子的微生物百科和健康指南!",
+      "mediaType": 0,
+      "status": 1,
+      "isDelete": 0,
+      "sort": 996,
+      "showChapter": 0,
+      "isShow": true,
+      "showCoverImg": 0
+    },
+    "totalStarCount": 0,
+    "getStarCount": 0,
+    "chapterList": [
+      {
+        "id": "1539436832552849410",
+        "name": "第1章",
+        "createTime": "2022-06-22 10:35:16",
+        "updateTime": null,
+        "aiCourseSkuId": "1539434275092762625",
+        "sort": 0,
+        "coverImgUrl": null,
+        "itemList": [
+          {
+            "id": "1539436832578015233",
+            "name": "1、为什么饭前便后要洗手?——大肠杆菌",
+            "videoId": "1566663169164734466",
+            "aiCourseSkuId": "1539434275092762625",
+            "sort": 0,
+            "createTime": "2022-06-22 10:35:16",
+            "updateTime": "2022-09-06 18:03:39",
+            "readCount": 64,
+            "aiCourseItemChapterId": "1539436832552849410",
+            "type": 0,
+            "payType": 1,
+            "freeTime": 0,
+            "audioId": null,
+            "imgCover": "https://img.luojigou.vip/FhwHdxUPiaNu8_KF3nEB4Reg1dUF?imageView2/0/q/50|imageslim",
+            "richText": null,
+            "splitList": null,
+            "hasReport": 1,
+            "clockInUserCount": "0",
+            "enable": 1,
+            "hasReply": 0,
+            "totalStarCount": 0,
+            "getRecord": {
+              "validDuration": 9,
+              "intervals": "[\n  [\n    0,\n    9\n  ]\n]",
+              "lastTime": 6,
+              "aiCourseItemId": null
+            },
+            "starList": [],
+            "readCountStr": "64",
+            "video": {
+              "id": "1566663169164734466",
+              "videoUrl": "http://video.training.luojigou.vip/lgEfvC6bXVyaVY1NfkpPbn3cDFtk_low.mp4",
+              "parentId": "1539436832578015233",
+              "createTime": "2022-09-05 13:43:01",
+              "updateTime": "2022-09-05 13:43:44",
+              "width": 1920,
+              "height": 1080,
+              "thumbnailUrl": "http://video.training.luojigou.vip/lgEfvC6bXVyaVY1NfkpPbn3cDFtk_low.mp4?vframe/jpg/offset/1",
+              "duration": "442.200000"
+            },
+            "hasClockIn": 0,
+            "getStarCount": 0
           },
-          "hasClockIn": 0,
-          "getStarCount": 0
-        },
-        {
-          "id": "1540205198523670529",
-          "name": "04 放风筝Flying a Kite",
-          "videoId": "1540205198565613570",
-          "aiCourseSkuId": "1540203667959226370",
-          "sort": 3,
-          "createTime": "2022-06-24 13:28:29",
-          "updateTime": "2022-08-09 12:43:05",
-          "readCount": 16,
-          "aiCourseItemChapterId": "1540205198192320513",
-          "type": 0,
-          "payType": 0,
-          "freeTime": 0,
-          "audioId": null,
-          "imgCover": "https://img.luojigou.vip/FnV8CLD1Ci-oF2SAiDERZ6yV7Ez-?imageView2/0/q/50|imageslim",
-          "richText": null,
-          "splitList": null,
-          "hasReport": 1,
-          "clockInUserCount": "0",
-          "enable": 1,
-          "hasReply": 0,
-          "totalStarCount": 0,
-          "starList": [],
-          "readCountStr": "16",
-          "video": {
-            "id": "1540205198565613570",
-            "videoUrl": "http://video.training.luojigou.vip/lmgfP9zPh_Fi8y_shUI9TuZ9pGA9_low.mp4",
-            "parentId": "1540205198523670529",
-            "createTime": "2022-06-24 13:28:29",
-            "updateTime": "2022-06-24 14:15:50",
-            "width": 1920,
-            "height": 1080,
-            "thumbnailUrl": "http://video.training.luojigou.vip/lmgfP9zPh_Fi8y_shUI9TuZ9pGA9_low.mp4?vframe/jpg/offset/1",
-            "duration": "287.240000"
+          {
+            "id": "1539436832708038658",
+            "name": "2、流行性感冒为什么那么严重?——流感病毒",
+            "videoId": "1566663170158784514",
+            "aiCourseSkuId": "1539434275092762625",
+            "sort": 1,
+            "createTime": "2022-06-22 10:35:16",
+            "updateTime": "2022-09-06 18:03:39",
+            "readCount": 32,
+            "aiCourseItemChapterId": "1539436832552849410",
+            "type": 0,
+            "payType": 0,
+            "freeTime": 0,
+            "audioId": null,
+            "imgCover": "https://img.luojigou.vip/FhwHdxUPiaNu8_KF3nEB4Reg1dUF?imageView2/0/q/50|imageslim",
+            "richText": null,
+            "splitList": null,
+            "hasReport": 1,
+            "clockInUserCount": "0",
+            "enable": 1,
+            "hasReply": 0,
+            "totalStarCount": 0,
+            "getRecord": {
+              "validDuration": 217,
+              "intervals": "[\n  [\n    0,\n    217\n  ]\n]",
+              "lastTime": 3,
+              "aiCourseItemId": null
+            },
+            "starList": [],
+            "readCountStr": "32",
+            "video": {
+              "id": "1566663170158784514",
+              "videoUrl": "http://video.training.luojigou.vip/lutTkyzxqVd6ZaGRPuamz9zIo7FT_low.mp4",
+              "parentId": "1539436832708038658",
+              "createTime": "2022-09-05 13:43:01",
+              "updateTime": "2022-09-05 13:43:43",
+              "width": 1920,
+              "height": 1080,
+              "thumbnailUrl": "http://video.training.luojigou.vip/lutTkyzxqVd6ZaGRPuamz9zIo7FT_low.mp4?vframe/jpg/offset/1",
+              "duration": "450.960000"
+            },
+            "hasClockIn": 0,
+            "getStarCount": 0
           },
-          "hasClockIn": 0,
-          "getStarCount": 0
-        },
-        {
-          "id": "1540205198624333825",
-          "name": "05 小绿的愿望Kiwi’s Wish",
-          "videoId": "1540205198670471170",
-          "aiCourseSkuId": "1540203667959226370",
-          "sort": 4,
-          "createTime": "2022-06-24 13:28:29",
-          "updateTime": "2022-08-09 13:13:41",
-          "readCount": 6,
-          "aiCourseItemChapterId": "1540205198192320513",
-          "type": 0,
-          "payType": 0,
-          "freeTime": 0,
-          "audioId": null,
-          "imgCover": "https://img.luojigou.vip/FnV8CLD1Ci-oF2SAiDERZ6yV7Ez-?imageView2/0/q/50|imageslim",
-          "richText": null,
-          "splitList": null,
-          "hasReport": 1,
-          "clockInUserCount": "0",
-          "enable": 1,
-          "hasReply": 0,
-          "totalStarCount": 0,
-          "starList": [],
-          "readCountStr": "6",
-          "video": {
-            "id": "1540205198670471170",
-            "videoUrl": "http://video.training.luojigou.vip/lhIrLQh-hM1-l5omFIOBNhbG8muQ_low.mp4",
-            "parentId": "1540205198624333825",
-            "createTime": "2022-06-24 13:28:29",
-            "updateTime": "2022-06-24 14:15:51",
-            "width": 1920,
-            "height": 1080,
-            "thumbnailUrl": "http://video.training.luojigou.vip/lhIrLQh-hM1-l5omFIOBNhbG8muQ_low.mp4?vframe/jpg/offset/1",
-            "duration": "291.880000"
+          {
+            "id": "1539436832821284865",
+            "name": "3、长毛的馒头还能吃吗?——黄曲霉",
+            "videoId": "1566663172432097282",
+            "aiCourseSkuId": "1539434275092762625",
+            "sort": 2,
+            "createTime": "2022-06-22 10:35:16",
+            "updateTime": "2022-09-06 18:03:39",
+            "readCount": 36,
+            "aiCourseItemChapterId": "1539436832552849410",
+            "type": 0,
+            "payType": 0,
+            "freeTime": 0,
+            "audioId": null,
+            "imgCover": "https://img.luojigou.vip/FhwHdxUPiaNu8_KF3nEB4Reg1dUF?imageView2/0/q/50|imageslim",
+            "richText": null,
+            "splitList": null,
+            "hasReport": 1,
+            "clockInUserCount": "0",
+            "enable": 1,
+            "hasReply": 0,
+            "totalStarCount": 0,
+            "getRecord": {
+              "validDuration": 43,
+              "intervals": "[\n  [\n    0,\n    3\n  ],\n  [\n    73,\n    76\n  ],\n  [\n    94,\n    96\n  ],\n  [\n    108,\n    122\n  ],\n  [\n    150,\n    151\n  ],\n  [\n    233,\n    243\n  ],\n  [\n    265,\n    266\n  ],\n  [\n    291,\n    292\n  ],\n  [\n    318,\n    322\n  ],\n  [\n    332,\n    336\n  ]\n]",
+              "lastTime": 3,
+              "aiCourseItemId": null
+            },
+            "starList": [],
+            "readCountStr": "36",
+            "video": {
+              "id": "1566663172432097282",
+              "videoUrl": "http://video.training.luojigou.vip/lo2nPZU-uzFut8rLLV-89frF0ID1_low.mp4",
+              "parentId": "1539436832821284865",
+              "createTime": "2022-09-05 13:43:02",
+              "updateTime": "2022-09-05 13:43:44",
+              "width": 1920,
+              "height": 1080,
+              "thumbnailUrl": "http://video.training.luojigou.vip/lo2nPZU-uzFut8rLLV-89frF0ID1_low.mp4?vframe/jpg/offset/1",
+              "duration": "439.440000"
+            },
+            "hasClockIn": 0,
+            "getStarCount": 0
           },
-          "hasClockIn": 0,
-          "getStarCount": 0
-        },
-        {
-          "id": "1540205198724997121",
-          "name": "06 花裙子Berry’s Flower Skirt",
-          "videoId": "1540205198771134465",
-          "aiCourseSkuId": "1540203667959226370",
-          "sort": 5,
-          "createTime": "2022-06-24 13:28:29",
-          "updateTime": "2022-07-27 11:07:49",
-          "readCount": 2,
-          "aiCourseItemChapterId": "1540205198192320513",
-          "type": 0,
-          "payType": 0,
-          "freeTime": 0,
-          "audioId": null,
-          "imgCover": "https://img.luojigou.vip/FnV8CLD1Ci-oF2SAiDERZ6yV7Ez-?imageView2/0/q/50|imageslim",
-          "richText": null,
-          "splitList": null,
-          "hasReport": 1,
-          "clockInUserCount": "0",
-          "enable": 1,
-          "hasReply": 0,
-          "totalStarCount": 0,
-          "starList": [],
-          "readCountStr": "2",
-          "video": {
-            "id": "1540205198771134465",
-            "videoUrl": "http://video.training.luojigou.vip/ljLcQ-ep4V2yivI_84uMFvtMff79_low.mp4",
-            "parentId": "1540205198724997121",
-            "createTime": "2022-06-24 13:28:29",
-            "updateTime": "2022-06-24 14:15:52",
-            "width": 1920,
-            "height": 1080,
-            "thumbnailUrl": "http://video.training.luojigou.vip/ljLcQ-ep4V2yivI_84uMFvtMff79_low.mp4?vframe/jpg/offset/1",
-            "duration": "299.960000"
+          {
+            "id": "1539436832930336769",
+            "name": "4、被狗咬伤了会怎么样?——狂犬病毒",
+            "videoId": "1566663173489061890",
+            "aiCourseSkuId": "1539434275092762625",
+            "sort": 3,
+            "createTime": "2022-06-22 10:35:16",
+            "updateTime": "2022-09-06 18:03:40",
+            "readCount": 26,
+            "aiCourseItemChapterId": "1539436832552849410",
+            "type": 0,
+            "payType": 0,
+            "freeTime": 0,
+            "audioId": null,
+            "imgCover": "https://img.luojigou.vip/FhwHdxUPiaNu8_KF3nEB4Reg1dUF?imageView2/0/q/50|imageslim",
+            "richText": null,
+            "splitList": null,
+            "hasReport": 1,
+            "clockInUserCount": "0",
+            "enable": 1,
+            "hasReply": 0,
+            "totalStarCount": 0,
+            "getRecord": {
+              "validDuration": 8,
+              "intervals": "[\n  [\n    0,\n    8\n  ]\n]",
+              "lastTime": 4,
+              "aiCourseItemId": null
+            },
+            "starList": [],
+            "readCountStr": "26",
+            "video": {
+              "id": "1566663173489061890",
+              "videoUrl": "http://video.training.luojigou.vip/lqNYVChVvvISTwkadnUxRu5b_YTx_low.mp4",
+              "parentId": "1539436832930336769",
+              "createTime": "2022-09-05 13:43:02",
+              "updateTime": "2022-09-05 13:43:44",
+              "width": 1920,
+              "height": 1080,
+              "thumbnailUrl": "http://video.training.luojigou.vip/lqNYVChVvvISTwkadnUxRu5b_YTx_low.mp4?vframe/jpg/offset/1",
+              "duration": "459.040000"
+            },
+            "hasClockIn": 0,
+            "getStarCount": 0
           },
-          "hasClockIn": 0,
-          "getStarCount": 0
-        },
-        {
-          "id": "1540205198829854722",
-          "name": "07 小蓝的发掘调查Indigo’s Big Discovery",
-          "videoId": "1540205198871797762",
-          "aiCourseSkuId": "1540203667959226370",
-          "sort": 6,
-          "createTime": "2022-06-24 13:28:29",
-          "updateTime": "2022-07-27 11:07:52",
-          "readCount": 2,
-          "aiCourseItemChapterId": "1540205198192320513",
-          "type": 0,
-          "payType": 0,
-          "freeTime": 0,
-          "audioId": null,
-          "imgCover": "https://img.luojigou.vip/FnV8CLD1Ci-oF2SAiDERZ6yV7Ez-?imageView2/0/q/50|imageslim",
-          "richText": null,
-          "splitList": null,
-          "hasReport": 1,
-          "clockInUserCount": "0",
-          "enable": 1,
-          "hasReply": 0,
-          "totalStarCount": 0,
-          "starList": [],
-          "readCountStr": "2",
-          "video": {
-            "id": "1540205198871797762",
-            "videoUrl": "http://video.training.luojigou.vip/lpYVg1k1-cGqE9eNGgMcbgwzJOa6_low.mp4",
-            "parentId": "1540205198829854722",
-            "createTime": "2022-06-24 13:28:29",
-            "updateTime": "2022-06-24 14:15:50",
-            "width": 1920,
-            "height": 1080,
-            "thumbnailUrl": "http://video.training.luojigou.vip/lpYVg1k1-cGqE9eNGgMcbgwzJOa6_low.mp4?vframe/jpg/offset/1",
-            "duration": "291.480000"
+          {
+            "id": "1539436833039388673",
+            "name": "5、面包有它才好吃!——酵母菌",
+            "videoId": "1566663174474723329",
+            "aiCourseSkuId": "1539434275092762625",
+            "sort": 4,
+            "createTime": "2022-06-22 10:35:17",
+            "updateTime": "2022-09-06 18:03:40",
+            "readCount": 26,
+            "aiCourseItemChapterId": "1539436832552849410",
+            "type": 0,
+            "payType": 0,
+            "freeTime": 0,
+            "audioId": null,
+            "imgCover": "https://img.luojigou.vip/FhwHdxUPiaNu8_KF3nEB4Reg1dUF?imageView2/0/q/50|imageslim",
+            "richText": null,
+            "splitList": null,
+            "hasReport": 1,
+            "clockInUserCount": "0",
+            "enable": 1,
+            "hasReply": 0,
+            "totalStarCount": 0,
+            "getRecord": {
+              "validDuration": 0,
+              "intervals": "[\n\n]",
+              "lastTime": 0,
+              "aiCourseItemId": null
+            },
+            "starList": [],
+            "readCountStr": "26",
+            "video": {
+              "id": "1566663174474723329",
+              "videoUrl": "http://video.training.luojigou.vip/ljTcMdxJY5Jgrwb2Fq9pLggOA85D_low.mp4",
+              "parentId": "1539436833039388673",
+              "createTime": "2022-09-05 13:43:02",
+              "updateTime": "2022-09-05 13:43:44",
+              "width": 1920,
+              "height": 1080,
+              "thumbnailUrl": "http://video.training.luojigou.vip/ljTcMdxJY5Jgrwb2Fq9pLggOA85D_low.mp4?vframe/jpg/offset/1",
+              "duration": "431.920000"
+            },
+            "hasClockIn": 0,
+            "getStarCount": 0
           },
-          "hasClockIn": 0,
-          "getStarCount": 0
-        },
-        {
-          "id": "1540205198930518018",
-          "name": "08 传说中的那个The Legendary Food",
-          "videoId": "1540205198976655361",
-          "aiCourseSkuId": "1540203667959226370",
-          "sort": 7,
-          "createTime": "2022-06-24 13:28:29",
-          "updateTime": "2022-07-27 11:07:55",
-          "readCount": 2,
-          "aiCourseItemChapterId": "1540205198192320513",
-          "type": 0,
-          "payType": 0,
-          "freeTime": 0,
-          "audioId": null,
-          "imgCover": "https://img.luojigou.vip/FnV8CLD1Ci-oF2SAiDERZ6yV7Ez-?imageView2/0/q/50|imageslim",
-          "richText": null,
-          "splitList": null,
-          "hasReport": 1,
-          "clockInUserCount": "0",
-          "enable": 1,
-          "hasReply": 0,
-          "totalStarCount": 0,
-          "starList": [],
-          "readCountStr": "2",
-          "video": {
-            "id": "1540205198976655361",
-            "videoUrl": "http://video.training.luojigou.vip/lp70IUefTAFIslanq_5bJ_vcuHZd_low.mp4",
-            "parentId": "1540205198930518018",
-            "createTime": "2022-06-24 13:28:29",
-            "updateTime": "2022-06-24 14:15:50",
-            "width": 1920,
-            "height": 1080,
-            "thumbnailUrl": "http://video.training.luojigou.vip/lp70IUefTAFIslanq_5bJ_vcuHZd_low.mp4?vframe/jpg/offset/1",
-            "duration": "291.680000"
+          {
+            "id": "1539436833207160834",
+            "name": "6、牛奶的好朋友!——乳酸菌",
+            "videoId": "1566663175435218946",
+            "aiCourseSkuId": "1539434275092762625",
+            "sort": 5,
+            "createTime": "2022-06-22 10:35:17",
+            "updateTime": "2022-09-06 18:03:40",
+            "readCount": 26,
+            "aiCourseItemChapterId": "1539436832552849410",
+            "type": 0,
+            "payType": 0,
+            "freeTime": 0,
+            "audioId": null,
+            "imgCover": "https://img.luojigou.vip/FhwHdxUPiaNu8_KF3nEB4Reg1dUF?imageView2/0/q/50|imageslim",
+            "richText": null,
+            "splitList": null,
+            "hasReport": 1,
+            "clockInUserCount": "0",
+            "enable": 1,
+            "hasReply": 0,
+            "totalStarCount": 0,
+            "getRecord": {
+              "validDuration": 40,
+              "intervals": "[\n  [\n    0,\n    40\n  ]\n]",
+              "lastTime": 40,
+              "aiCourseItemId": null
+            },
+            "starList": [],
+            "readCountStr": "26",
+            "video": {
+              "id": "1566663175435218946",
+              "videoUrl": "http://video.training.luojigou.vip/lj6qZAqWrRCO-raj15IOIwA3dBIs_low.mp4",
+              "parentId": "1539436833207160834",
+              "createTime": "2022-09-05 13:43:02",
+              "updateTime": "2022-09-05 13:43:44",
+              "width": 1920,
+              "height": 1080,
+              "thumbnailUrl": "http://video.training.luojigou.vip/lj6qZAqWrRCO-raj15IOIwA3dBIs_low.mp4?vframe/jpg/offset/1",
+              "duration": "490.440000"
+            },
+            "hasClockIn": 0,
+            "getStarCount": 0
           },
-          "hasClockIn": 0,
-          "getStarCount": 0
-        },
-        {
-          "id": "1540205199031181313",
-          "name": "09 小青的画Cherry the Model",
-          "videoId": "1540205199073124354",
-          "aiCourseSkuId": "1540203667959226370",
-          "sort": 8,
-          "createTime": "2022-06-24 13:28:29",
-          "updateTime": "2022-06-24 13:28:29",
-          "readCount": 0,
-          "aiCourseItemChapterId": "1540205198192320513",
-          "type": 0,
-          "payType": 0,
-          "freeTime": 0,
-          "audioId": null,
-          "imgCover": "https://img.luojigou.vip/FnV8CLD1Ci-oF2SAiDERZ6yV7Ez-?imageView2/0/q/50|imageslim",
-          "richText": null,
-          "splitList": null,
-          "hasReport": 1,
-          "clockInUserCount": "0",
-          "enable": 1,
-          "hasReply": 0,
-          "totalStarCount": 0,
-          "starList": [],
-          "readCountStr": "0",
-          "video": {
-            "id": "1540205199073124354",
-            "videoUrl":  "http://video.training.luojigou.vip/lr28B5Byl9PEFGylOH_n_Al44SDF_low.mp4",
-            "parentId": "1540205199031181313",
-            "createTime": "2022-06-24 13:28:29",
-            "updateTime": "2022-06-24 14:15:51",
-            "width": 1920,
-            "height": 1080,
-            "thumbnailUrl": "http://video.training.luojigou.vip/lr28B5Byl9PEFGylOH_n_Al44SDF_low.mp4?vframe/jpg/offset/1",
-            "duration": "298.440000"
+          {
+            "id": "1539436833370738689",
+            "name": "7、醋是怎么来的?——醋酸菌",
+            "videoId": "1566663176404103170",
+            "aiCourseSkuId": "1539434275092762625",
+            "sort": 6,
+            "createTime": "2022-06-22 10:35:17",
+            "updateTime": "2022-09-06 18:03:40",
+            "readCount": 26,
+            "aiCourseItemChapterId": "1539436832552849410",
+            "type": 0,
+            "payType": 0,
+            "freeTime": 0,
+            "audioId": null,
+            "imgCover": "https://img.luojigou.vip/FhwHdxUPiaNu8_KF3nEB4Reg1dUF?imageView2/0/q/50|imageslim",
+            "richText": null,
+            "splitList": null,
+            "hasReport": 1,
+            "clockInUserCount": "0",
+            "enable": 1,
+            "hasReply": 0,
+            "totalStarCount": 0,
+            "getRecord": {
+              "validDuration": 0,
+              "intervals": "[\n\n]",
+              "lastTime": 0,
+              "aiCourseItemId": null
+            },
+            "starList": [],
+            "readCountStr": "26",
+            "video": {
+              "id": "1566663176404103170",
+              "videoUrl": "http://video.training.luojigou.vip/ltZR9CKRaJR-m3gHnjYVcTJ6RkD-_low.mp4",
+              "parentId": "1539436833370738689",
+              "createTime": "2022-09-05 13:43:03",
+              "updateTime": "2022-09-05 13:43:43",
+              "width": 1920,
+              "height": 1080,
+              "thumbnailUrl": "http://video.training.luojigou.vip/ltZR9CKRaJR-m3gHnjYVcTJ6RkD-_low.mp4?vframe/jpg/offset/1",
+              "duration": "493.440000"
+            },
+            "hasClockIn": 0,
+            "getStarCount": 0
           },
-          "hasClockIn": 0,
-          "getStarCount": 0
-        },
-        {
-          "id": "1540205199131844609",
-          "name": "10 超级机器人Super Robot",
-          "videoId": "1540205199173787649",
-          "aiCourseSkuId": "1540203667959226370",
-          "sort": 9,
-          "createTime": "2022-06-24 13:28:29",
-          "updateTime": "2022-07-26 19:31:15",
-          "readCount": 1,
-          "aiCourseItemChapterId": "1540205198192320513",
-          "type": 0,
-          "payType": 0,
-          "freeTime": 0,
-          "audioId": null,
-          "imgCover": "https://img.luojigou.vip/FnV8CLD1Ci-oF2SAiDERZ6yV7Ez-?imageView2/0/q/50|imageslim",
-          "richText": null,
-          "splitList": null,
-          "hasReport": 1,
-          "clockInUserCount": "0",
-          "enable": 1,
-          "hasReply": 0,
-          "totalStarCount": 0,
-          "starList": [],
-          "readCountStr": "1",
-          "video": {
-            "id": "1540205199173787649",
-            "videoUrl": "http://video.training.luojigou.vip/lgz9HWomQyGqiRQyC54XtszNqoDE_low.mp4",
-            "parentId": "1540205199131844609",
-            "createTime": "2022-06-24 13:28:29",
-            "updateTime": "2022-06-24 14:15:52",
-            "width": 1920,
-            "height": 1080,
-            "thumbnailUrl": "http://video.training.luojigou.vip/lgz9HWomQyGqiRQyC54XtszNqoDE_low.mp4?vframe/jpg/offset/1",
-            "duration": "286.040000"
+          {
+            "id": "1539436833504956417",
+            "name": "8、污染物的分解者——草履虫",
+            "videoId": "1566663177343627265",
+            "aiCourseSkuId": "1539434275092762625",
+            "sort": 7,
+            "createTime": "2022-06-22 10:35:17",
+            "updateTime": "2022-09-06 18:03:40",
+            "readCount": 26,
+            "aiCourseItemChapterId": "1539436832552849410",
+            "type": 0,
+            "payType": 0,
+            "freeTime": 0,
+            "audioId": null,
+            "imgCover": "https://img.luojigou.vip/FhwHdxUPiaNu8_KF3nEB4Reg1dUF?imageView2/0/q/50|imageslim",
+            "richText": null,
+            "splitList": null,
+            "hasReport": 1,
+            "clockInUserCount": "0",
+            "enable": 1,
+            "hasReply": 0,
+            "totalStarCount": 0,
+            "getRecord": {
+              "validDuration": 4,
+              "intervals": "[\n  [\n    0,\n    2\n  ],\n  [\n    253,\n    255\n  ]\n]",
+              "lastTime": 1,
+              "aiCourseItemId": null
+            },
+            "starList": [],
+            "readCountStr": "26",
+            "video": {
+              "id": "1566663177343627265",
+              "videoUrl": "http://video.training.luojigou.vip/lp-7DHTRH66F9NZimrohOtcpJTdT_low.mp4",
+              "parentId": "1539436833504956417",
+              "createTime": "2022-09-05 13:43:03",
+              "updateTime": "2022-09-05 13:43:45",
+              "width": 1920,
+              "height": 1080,
+              "thumbnailUrl": "http://video.training.luojigou.vip/lp-7DHTRH66F9NZimrohOtcpJTdT_low.mp4?vframe/jpg/offset/1",
+              "duration": "483.840000"
+            },
+            "hasClockIn": 0,
+            "getStarCount": 0
           },
-          "hasClockIn": 0,
-          "getStarCount": 0
-        },
-        {
-          "id": "1540205199232507905",
-          "name": "11 茶博士Indigo the Tea Specialist",
-          "videoId": "1540205199274450945",
-          "aiCourseSkuId": "1540203667959226370",
-          "sort": 10,
-          "createTime": "2022-06-24 13:28:29",
-          "updateTime": "2022-06-24 13:28:29",
-          "readCount": 0,
-          "aiCourseItemChapterId": "1540205198192320513",
-          "type": 0,
-          "payType": 0,
-          "freeTime": 0,
-          "audioId": null,
-          "imgCover": "https://img.luojigou.vip/FnV8CLD1Ci-oF2SAiDERZ6yV7Ez-?imageView2/0/q/50|imageslim",
-          "richText": null,
-          "splitList": null,
-          "hasReport": 1,
-          "clockInUserCount": "0",
-          "enable": 1,
-          "hasReply": 0,
-          "totalStarCount": 0,
-          "starList": [],
-          "readCountStr": "0",
-          "video": {
-            "id": "1540205199274450945",
-            "videoUrl": "http://video.training.luojigou.vip/lmlTyVXGYYcCR0wqkHavArlomjOu_low.mp4",
-            "parentId": "1540205199232507905",
-            "createTime": "2022-06-24 13:28:29",
-            "updateTime": "2022-06-24 14:15:52",
-            "width": 1920,
-            "height": 1080,
-            "thumbnailUrl": "http://video.training.luojigou.vip/lmlTyVXGYYcCR0wqkHavArlomjOu_low.mp4?vframe/jpg/offset/1",
-            "duration": "294.440000"
+          {
+            "id": "1539436833647562754",
+            "name": "9、亦正亦邪的蘑菇——食用菌",
+            "videoId": "1566663178312511490",
+            "aiCourseSkuId": "1539434275092762625",
+            "sort": 8,
+            "createTime": "2022-06-22 10:35:17",
+            "updateTime": "2022-09-06 18:03:41",
+            "readCount": 26,
+            "aiCourseItemChapterId": "1539436832552849410",
+            "type": 0,
+            "payType": 0,
+            "freeTime": 0,
+            "audioId": null,
+            "imgCover": "https://img.luojigou.vip/FhwHdxUPiaNu8_KF3nEB4Reg1dUF?imageView2/0/q/50|imageslim",
+            "richText": null,
+            "splitList": null,
+            "hasReport": 1,
+            "clockInUserCount": "0",
+            "enable": 1,
+            "hasReply": 0,
+            "totalStarCount": 0,
+            "getRecord": {
+              "validDuration": 0,
+              "intervals": "[\n\n]",
+              "lastTime": 0,
+              "aiCourseItemId": null
+            },
+            "starList": [],
+            "readCountStr": "26",
+            "video": {
+              "id": "1566663178312511490",
+              "videoUrl": "http://video.training.luojigou.vip/lsYwmmKO0zZ8075WrP4WEwQo3J9o_low.mp4",
+              "parentId": "1539436833647562754",
+              "createTime": "2022-09-05 13:43:03",
+              "updateTime": "2022-09-05 13:43:44",
+              "width": 1920,
+              "height": 1080,
+              "thumbnailUrl": "http://video.training.luojigou.vip/lsYwmmKO0zZ8075WrP4WEwQo3J9o_low.mp4?vframe/jpg/offset/1",
+              "duration": "607.680000"
+            },
+            "hasClockIn": 0,
+            "getStarCount": 0
           },
-          "hasClockIn": 0,
-          "getStarCount": 0
-        },
-        {
-          "id": "1540205199333171201",
-          "name": "12 小青的杂货铺Berry the Vendor",
-          "videoId": "1540205199375114242",
-          "aiCourseSkuId": "1540203667959226370",
-          "sort": 11,
-          "createTime": "2022-06-24 13:28:29",
-          "updateTime": "2022-07-27 11:08:22",
-          "readCount": 3,
-          "aiCourseItemChapterId": "1540205198192320513",
-          "type": 0,
-          "payType": 0,
-          "freeTime": 0,
-          "audioId": null,
-          "imgCover": "https://img.luojigou.vip/FnV8CLD1Ci-oF2SAiDERZ6yV7Ez-?imageView2/0/q/50|imageslim",
-          "richText": null,
-          "splitList": null,
-          "hasReport": 1,
-          "clockInUserCount": "0",
-          "enable": 1,
-          "hasReply": 0,
-          "totalStarCount": 0,
-          "starList": [],
-          "readCountStr": "3",
-          "video": {
-            "id": "1540205199375114242",
-            "videoUrl": "http://video.training.luojigou.vip/lkocOh0FKD1IheDFdhTheGs9zyJo_low.mp4",
-            "parentId": "1540205199333171201",
-            "createTime": "2022-06-24 13:28:29",
-            "updateTime": "2022-06-24 14:15:51",
-            "width": 1920,
-            "height": 1080,
-            "thumbnailUrl": "http://video.training.luojigou.vip/lkocOh0FKD1IheDFdhTheGs9zyJo_low.mp4?vframe/jpg/offset/1",
-            "duration": "291.080000"
-          },
-          "hasClockIn": 0,
-          "getStarCount": 0
-        },
-        {
-          "id": "1540205199433834497",
-          "name": "13 大蛋糕The Big Cake",
-          "videoId": "1540205199475777537",
-          "aiCourseSkuId": "1540203667959226370",
-          "sort": 12,
-          "createTime": "2022-06-24 13:28:29",
-          "updateTime": "2022-06-24 13:28:29",
-          "readCount": 0,
-          "aiCourseItemChapterId": "1540205198192320513",
-          "type": 0,
-          "payType": 0,
-          "freeTime": 0,
-          "audioId": null,
-          "imgCover": "https://img.luojigou.vip/FnV8CLD1Ci-oF2SAiDERZ6yV7Ez-?imageView2/0/q/50|imageslim",
-          "richText": null,
-          "splitList": null,
-          "hasReport": 1,
-          "clockInUserCount": "0",
-          "enable": 1,
-          "hasReply": 0,
-          "totalStarCount": 0,
-          "starList": [],
-          "readCountStr": "0",
-          "video": {
-            "id": "1540205199475777537",
-            "videoUrl": "http://video.training.luojigou.vip/lvw30_qJPHQOLC5-mAW1gO4_CpJ9_low.mp4",
-            "parentId": "1540205199433834497",
-            "createTime": "2022-06-24 13:28:29",
-            "updateTime": "2022-06-24 14:15:52",
-            "width": 1920,
-            "height": 1080,
-            "thumbnailUrl": "http://video.training.luojigou.vip/lvw30_qJPHQOLC5-mAW1gO4_CpJ9_low.mp4?vframe/jpg/offset/1",
-            "duration": "291.680000"
-          },
-          "hasClockIn": 0,
-          "getStarCount": 0
-        }
-      ]
-    }
-
-  ],
-  "videoUrl": null
-}
-
-
-
-
-
+          {
+            "id": "1539436833760808962",
+            "name": "10、能做美食,也能致病——毛霉",
+            "videoId": "1566663179440779265",
+            "aiCourseSkuId": "1539434275092762625",
+            "sort": 9,
+            "createTime": "2022-06-22 10:35:17",
+            "updateTime": "2022-09-06 18:03:41",
+            "readCount": 26,
+            "aiCourseItemChapterId": "1539436832552849410",
+            "type": 0,
+            "payType": 0,
+            "freeTime": 0,
+            "audioId": null,
+            "imgCover": "https://img.luojigou.vip/FhwHdxUPiaNu8_KF3nEB4Reg1dUF?imageView2/0/q/50|imageslim",
+            "richText": null,
+            "splitList": null,
+            "hasReport": 1,
+            "clockInUserCount": "0",
+            "enable": 1,
+            "hasReply": 0,
+            "totalStarCount": 0,
+            "getRecord": {
+              "validDuration": 1,
+              "intervals": "[\n  [\n    0,\n    1\n  ],\n  [\n    330,\n    330\n  ]\n]",
+              "lastTime": 330,
+              "aiCourseItemId": null
+            },
+            "starList": [],
+            "readCountStr": "26",
+            "video": {
+              "id": "1566663179440779265",
+              "videoUrl": "http://video.training.luojigou.vip/lrhVfXMB_lykSoFBtdt6Ct5Iq-oi_low.mp4",
+              "parentId": "1539436833760808962",
+              "createTime": "2022-09-05 13:43:03",
+              "updateTime": "2022-09-05 13:43:45",
+              "width": 1920,
+              "height": 1080,
+              "thumbnailUrl": "http://video.training.luojigou.vip/lrhVfXMB_lykSoFBtdt6Ct5Iq-oi_low.mp4?vframe/jpg/offset/1",
+              "duration": "479.440000"
+            },
+            "hasClockIn": 0,
+            "getStarCount": 0
+          }
+        ]
+      }
+    ],
+    "videoUrl": null
+  },
+  "msg": "成功"
+}

+ 3 - 6
ui/src/main/kotlin/com/tencent/liteav/demo/player/PlayerActivity.kt

@@ -9,10 +9,7 @@ import android.widget.Toast
 import androidx.activity.viewModels
 import androidx.appcompat.app.AppCompatActivity
 import androidx.recyclerview.widget.LinearLayoutManager
-import androidx.work.Constraints
-import androidx.work.NetworkType
-import androidx.work.OneTimeWorkRequest
-import androidx.work.WorkManager
+import androidx.work.*
 import com.android.cast.dlna.dmc.DLNACastManager
 import com.tencent.liteav.demo.player.ViewInsets.ViewportMetrics
 import com.tencent.liteav.demo.player.databinding.ActivityPlayerBinding
@@ -212,8 +209,8 @@ class PlayerActivity : AppCompatActivity(),
     override fun onTimeout(timeout: Boolean) {
         if (!timeout) {
             if (mSuperPlayerView.playingVideoModel == null) {
-                playVideoModel(10)
-                mSuperPlayerView.setStartTime(20.0)
+                playVideoModel(0)
+                mSuperPlayerView.setStartTime(0.0)
             }
         }
     }

+ 0 - 1
ui/src/main/kotlin/com/tencent/liteav/demo/player/viewmodel/UploadWorker.kt

@@ -13,7 +13,6 @@ class UploadWorker(
         val database = applicationContext as PlayerDatabaseProvider
         val repository = database.getPlayerRepository()
 
-
         return Result.success()
     }
 

+ 3 - 1
ui/src/main/res/layout/item_cast.xml

@@ -15,9 +15,11 @@
         android:layout_width="0dp"
         android:layout_height="wrap_content"
         android:layout_weight="1"
+        android:height="20dp"
         android:ellipsize="end"
         android:maxLines="1"
-        android:textColor="#FF333333" />
+        android:textColor="#FF333333"
+        android:textSize="14sp" />
 
     <ImageView
         android:layout_width="14dp"