[SHOPTIME-3535] 시청로그 중 오류 케이스 확인 요청

Changed files:
1. logActions.js
2. VideoPlayer.js
3. helperMethods.js
4. PlayerPanel.jsx

Detail note:
1. "sendLogLive", "sendLogVOD" 요청시 "getTimeDifferenceByMilliseconds" 함수 조건 추가
2.  "setIsVideoPaused" 프롭스 설정 및 If문 조건 추가
3. "getTimeDifferenceByMilliseconds" 함수 추가
4. "LIVE", "VOD", "MEDIA" 로그 생성 로직 변경
This commit is contained in:
younghoon100.park
2024-09-30 15:35:28 +09:00
parent 53f81c929e
commit ec2c50f5d7
4 changed files with 438 additions and 352 deletions

View File

@@ -1,7 +1,10 @@
import { URLS } from "../api/apiConfig";
import { TLogEvent } from "../api/TLogEvent";
import { LOG_TP_NO } from "../utils/Config";
import { formatGMTString } from "../utils/helperMethods";
import {
formatGMTString,
getTimeDifferenceByMilliseconds,
} from "../utils/helperMethods";
import { types } from "./actionTypes";
import { setSecondLayerInfo } from "./commonActions";
@@ -24,7 +27,7 @@ export const getUrlByLogTpNo = (logTpNo) => {
case LOG_TP_NO.VOD.ITEM_DETAIL_MEDIA:
return URLS.LOG_VOD;
// IF-LGSP-LOG-003 / Curations View 이력
// IF-LGSP-LOG-003 / Curation View 이력
case LOG_TP_NO.CURATION.HOT_PICKS:
case LOG_TP_NO.CURATION.SHOWROOM:
case LOG_TP_NO.CURATION.ON_SALE:
@@ -225,7 +228,7 @@ export const sendLogLive = (params, callback) => (dispatch, getState) => {
watchEndDt: params?.watchEndDt ?? formatGMTString(new Date()),
};
if (newParams.watchEndDt !== watchStrtDt) {
if (getTimeDifferenceByMilliseconds(watchStrtDt, newParams.watchEndDt)) {
dispatch(postLog(newParams));
if (callback) {
@@ -290,7 +293,7 @@ export const sendLogVOD = (params, callback) => (dispatch, getState) => {
watchEndDt: params?.watchEndDt ?? formatGMTString(new Date()),
};
if (newParams.watchEndDt !== watchStrtDt) {
if (getTimeDifferenceByMilliseconds(watchStrtDt, newParams.watchEndDt)) {
dispatch(postLog(newParams));
if (callback) {