From 73b0a47f4f8f1ba095d119e8ae2225ec5e7d8160 Mon Sep 17 00:00:00 2001 From: harry Date: Fri, 13 Mar 2020 19:26:18 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=86=E9=A2=91=E6=92=AD=E6=94=BE=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E6=96=B0=E5=A2=9E=E5=8F=82=E6=95=B0=E5=89=8D=E7=AB=AF?= =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 3 +++ .../react/src/modules/courses/Video/video-play/index.jsx | 7 +++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 349c0cdc1..544539736 100644 --- a/.gitignore +++ b/.gitignore @@ -7,6 +7,7 @@ # Ignore bundler config. /.bundle /bundle +/node_modules # Ignore lock config file *.lock @@ -46,6 +47,8 @@ /public/h5build /public/npm-debug.log +/dist + # avatars /public/images/avatars diff --git a/public/react/src/modules/courses/Video/video-play/index.jsx b/public/react/src/modules/courses/Video/video-play/index.jsx index 84b465014..cfc5ad343 100644 --- a/public/react/src/modules/courses/Video/video-play/index.jsx +++ b/public/react/src/modules/courses/Video/video-play/index.jsx @@ -43,7 +43,7 @@ export default ({ src, videoId, logWatchHistory, courseId = null }) => { let isSeeking = false let pos = []//播放时间点集 - const log = useCallback((callback) => { + const log = useCallback((callback, isEnd = false) => { let params = {} if (logId) { params['log_id'] = logId @@ -59,6 +59,9 @@ export default ({ src, videoId, logWatchHistory, courseId = null }) => { params['duration'] = totalDuration params['device'] = device } + if (isEnd) { + params['ed'] = "1" + } async function getLogId() { isLoging = true let id = await logWatchHistory(params) @@ -119,7 +122,7 @@ export default ({ src, videoId, logWatchHistory, courseId = null }) => { isLoging = false isSeeking = false pos = [] - }) + }, true) } function onTimeupdate() {