Fix lint (removal of videoFetchDuration)
This commit is contained in:
parent
617ab25f6e
commit
47539edcab
2 changed files with 0 additions and 9 deletions
|
@ -37,7 +37,6 @@ type Analytics = {
|
|||
tagFollowEvent: (string, boolean, ?string) => void,
|
||||
playerLoadedEvent: (?boolean) => void,
|
||||
playerStartedEvent: (?boolean) => void,
|
||||
videoFetchDuration: (string, number) => void,
|
||||
videoStartEvent: (string, number) => void,
|
||||
videoBufferEvent: (
|
||||
StreamClaim,
|
||||
|
|
|
@ -11,7 +11,6 @@ import './plugins/videojs-mobile-ui/plugin';
|
|||
import hlsQualitySelector from './plugins/videojs-hls-quality-selector/plugin';
|
||||
import qualityLevels from 'videojs-contrib-quality-levels';
|
||||
import isUserTyping from 'util/detect-typing';
|
||||
import analytics from 'analytics';
|
||||
|
||||
const isDev = process.env.NODE_ENV !== 'production';
|
||||
|
||||
|
@ -545,15 +544,8 @@ export default React.memo<Props>(function VideoJs(props: Props) {
|
|||
|
||||
// Update video player and reload when source URL changes
|
||||
useEffect(() => {
|
||||
const fetchStartedAt = performance.now();
|
||||
// For some reason the video player is responsible for detecting content type this way
|
||||
fetch(source, { method: 'HEAD', cache: 'no-store' }).then((response) => {
|
||||
const deltaFetch = performance.now() - fetchStartedAt;
|
||||
// console.log(`Prefetch took: ${deltaFetch.toFixed(3)}ms`);
|
||||
|
||||
// Send fetch duration analytic event (in ms)
|
||||
analytics.videoFetchDuration(source, deltaFetch);
|
||||
|
||||
const player = playerRef.current;
|
||||
|
||||
if (!player) {
|
||||
|
|
Loading…
Add table
Reference in a new issue