shoptime live, vod, media 시청및종료시 정보수집
This commit is contained in:
@@ -26,6 +26,7 @@ import {
|
||||
import {
|
||||
sendLogGNB,
|
||||
sendLogLive,
|
||||
sendLogTotalRecommend,
|
||||
sendLogVOD,
|
||||
} from '../../actions/logActions';
|
||||
import {
|
||||
@@ -233,6 +234,7 @@ const PlayerPanel = ({
|
||||
const panels = USE_SELECTOR("panels", (state) => state.panels.panels);
|
||||
const chatData = USE_SELECTOR("chatData", (state) => state.play.chatData);
|
||||
|
||||
|
||||
const popupVisible = USE_SELECTOR(
|
||||
"popupVisible",
|
||||
(state) => state.common.popup.popupVisible
|
||||
@@ -1010,6 +1012,8 @@ const PlayerPanel = ({
|
||||
panelInfo.modal,
|
||||
panelInfo.isUpdatedByClick,
|
||||
panelInfo.isIndicatorByClick,
|
||||
|
||||
|
||||
panelInfo.shptmBanrTpNm,
|
||||
]);
|
||||
|
||||
@@ -1978,6 +1982,58 @@ const PlayerPanel = ({
|
||||
}
|
||||
}, [panelInfo.thumbnail, broadcast]);
|
||||
|
||||
const isPlayer = useMemo(() => {
|
||||
if (!panelInfo.modal) {
|
||||
return 'full player';
|
||||
}
|
||||
else {
|
||||
switch (panels[0].name) {
|
||||
case 'categorypanel':
|
||||
return 'category';
|
||||
case 'mypagepanel':
|
||||
return 'my page';
|
||||
case 'searchpanel':
|
||||
return 'search';
|
||||
case 'hotpickpanel':
|
||||
return 'hot picks';
|
||||
case 'featuredbrandspanel':
|
||||
return 'featured brands';
|
||||
case 'trendingnowpanel':
|
||||
return 'trending now';
|
||||
case 'playerpanel':
|
||||
return 'home';
|
||||
}
|
||||
}
|
||||
}, [panelInfo.modal, panels]);
|
||||
|
||||
useEffect(() => {
|
||||
const brandArray = showDetailInfo?.[0]?.productInfos?.map(item => item.brndNm) || [];
|
||||
const categoryArray = showDetailInfo?.[0]?.productInfos?.map(item => item.catNm) || [];
|
||||
const params = {
|
||||
visible: 'true',
|
||||
showType: panelInfo.shptmBanrTpNm,
|
||||
player: isPlayer,
|
||||
contentId: showDetailInfo?.[0]?.showId || '',
|
||||
contentTitle: showDetailInfo?.[0]?.showNm || '',
|
||||
partner: showDetailInfo?.[0]?.patncNm || '',
|
||||
brand: brandArray.join('|') || null,
|
||||
category: categoryArray.join('|') || null,
|
||||
contextName: Config.LOG_CONTEXT_NAME.SHOW,
|
||||
messageId: Config.LOG_MESSAGE_ID.SHOWVIEW
|
||||
};
|
||||
|
||||
dispatch(sendLogTotalRecommend(params));
|
||||
|
||||
return () => {
|
||||
const unmountParams = {
|
||||
...params,
|
||||
visible: 'false'
|
||||
};
|
||||
dispatch(sendLogTotalRecommend(unmountParams));
|
||||
};
|
||||
|
||||
}, [panelInfo?.shptmBanrTpNm, showDetailInfo, isPlayer]);
|
||||
|
||||
return (
|
||||
<TPanel
|
||||
isTabActivated={false}
|
||||
|
||||
Reference in New Issue
Block a user