Skip to content

Commit 81d3f9c

Browse files
authored
refactor: remove ott ping analytics (#633)
* chore: remove ott ping analytics * chore: bring back playerLicenseKey
1 parent 8388404 commit 81d3f9c

File tree

12 files changed

+2
-750
lines changed

12 files changed

+2
-750
lines changed

docs/features/video-analytics.md

-191
This file was deleted.

packages/common/types/jwpltx.d.ts

-18
This file was deleted.

packages/hooks-react/src/useOttAnalytics.ts

-82
This file was deleted.

packages/ui-react/src/components/Player/Player.tsx

+1-6
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import { deepCopy } from '@jwp/ott-common/src/utils/collection';
66
import { testId } from '@jwp/ott-common/src/utils/common';
77
import { logInfo } from '@jwp/ott-common/src/logger';
88
import useEventCallback from '@jwp/ott-hooks-react/src/useEventCallback';
9-
import useOttAnalytics from '@jwp/ott-hooks-react/src/useOttAnalytics';
109
import { useMediaSources } from '@jwp/ott-hooks-react/src/useMediaSources';
1110
import env from '@jwp/ott-common/src/env';
1211

@@ -64,8 +63,6 @@ const Player: React.FC<Props> = ({
6463
const startTimeRef = useRef(startTime);
6564
const sources = useMediaSources({ item, baseUrl: env.APP_API_BASE_URL });
6665

67-
const setPlayer = useOttAnalytics(item, feedId);
68-
6966
const { settings } = useConfigStore((s) => s);
7067

7168
const playerId = settings.playerId;
@@ -222,10 +219,8 @@ const Player: React.FC<Props> = ({
222219
if (playerLicenseKey) {
223220
playerOptions.key = playerLicenseKey;
224221
}
225-
226222
playerRef.current.setup(playerOptions);
227223

228-
setPlayer(playerRef.current);
229224
attachEvents();
230225
};
231226

@@ -236,7 +231,7 @@ const Player: React.FC<Props> = ({
236231
if (libLoaded) {
237232
initializePlayer();
238233
}
239-
}, [libLoaded, item, detachEvents, attachEvents, playerId, setPlayer, autostart, adsData, playerLicenseKey, sources, feedId]);
234+
}, [libLoaded, item, detachEvents, attachEvents, playerId, autostart, adsData, playerLicenseKey, sources, feedId]);
240235

241236
useEffect(() => {
242237
return () => {

0 commit comments

Comments
 (0)