hot fix for file view metrics on web
This commit is contained in:
parent
7c4578edfe
commit
ab3502bacc
1 changed files with 6 additions and 0 deletions
|
@ -2,6 +2,7 @@
|
|||
import type { Claim } from 'types/claim';
|
||||
import React, { Suspense } from 'react';
|
||||
import { stopContextMenu } from 'util/context-menu';
|
||||
import analytics from 'analytics';
|
||||
import(/* webpackChunkName: "videojs" */
|
||||
/* webpackPreload: true */
|
||||
'video.js/dist/video-js.css');
|
||||
|
@ -22,6 +23,11 @@ class AudioVideoViewer extends React.PureComponent<Props> {
|
|||
|
||||
componentDidMount() {
|
||||
const { contentType, poster, claim } = this.props;
|
||||
const { name, claim_id: claimId, txid, nout } = claim;
|
||||
|
||||
// Quick fix to get file view events on lbry.tv
|
||||
// Will need to be changed to include time to start
|
||||
analytics.apiLogView(`${name}#${claimId}`, `${txid}:${nout}`, claimId);
|
||||
|
||||
const path = `https://api.piratebay.com/content/claims/${claim.name}/${
|
||||
claim.claim_id
|
||||
|
|
Loading…
Reference in a new issue