Skip to content

Commit

Permalink
refactor: remove ott ping analytics (#633)
Browse files Browse the repository at this point in the history
* chore: remove ott ping analytics
* chore: bring back playerLicenseKey
  • Loading branch information
mustran authored Nov 8, 2024
1 parent 8388404 commit 81d3f9c
Show file tree
Hide file tree
Showing 12 changed files with 2 additions and 750 deletions.
191 changes: 0 additions & 191 deletions docs/features/video-analytics.md

This file was deleted.

18 changes: 0 additions & 18 deletions packages/common/types/jwpltx.d.ts

This file was deleted.

82 changes: 0 additions & 82 deletions packages/hooks-react/src/useOttAnalytics.ts

This file was deleted.

7 changes: 1 addition & 6 deletions packages/ui-react/src/components/Player/Player.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import { deepCopy } from '@jwp/ott-common/src/utils/collection';
import { testId } from '@jwp/ott-common/src/utils/common';
import { logInfo } from '@jwp/ott-common/src/logger';
import useEventCallback from '@jwp/ott-hooks-react/src/useEventCallback';
import useOttAnalytics from '@jwp/ott-hooks-react/src/useOttAnalytics';
import { useMediaSources } from '@jwp/ott-hooks-react/src/useMediaSources';
import env from '@jwp/ott-common/src/env';

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

const setPlayer = useOttAnalytics(item, feedId);

const { settings } = useConfigStore((s) => s);

const playerId = settings.playerId;
Expand Down Expand Up @@ -222,10 +219,8 @@ const Player: React.FC<Props> = ({
if (playerLicenseKey) {
playerOptions.key = playerLicenseKey;
}

playerRef.current.setup(playerOptions);

setPlayer(playerRef.current);
attachEvents();
};

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

useEffect(() => {
return () => {
Expand Down
Loading

0 comments on commit 81d3f9c

Please sign in to comment.