Revert "add logging of player point of presence"

This reverts commit fb142f7699.
This commit is contained in:
Sean Yesmunt 2020-09-09 14:40:32 -04:00
parent fb142f7699
commit 4067e1ffd8
3 changed files with 24 additions and 35 deletions

View file

@ -38,14 +38,7 @@ type Analytics = {
videoStartEvent: (string, number) => void,
videoBufferEvent: (
StreamClaim,
{
timeAtBuffer: number,
bufferDuration: number,
bitRate: number,
duration: number,
userIdHash: string,
playerPoweredBy: string,
}
{ timeAtBuffer: number, bufferDuration: number, bitRate: number, duration: number, userIdHash: string }
) => void,
emailProvidedEvent: () => void,
emailVerifiedEvent: () => void,
@ -192,32 +185,32 @@ const analytics: Analytics = {
sendPromMetric('time_to_start', duration);
sendMatomoEvent('Media', 'TimeToStart', claimId, duration);
},
videoBufferEvent: (claim, data) => {
// @if TARGET='web'
sendPromMetric('buffer');
// @endif
sendMatomoEvent('Media', 'BufferTimestamp', claim.claim_id, data.timeAtBuffer);
if (LBRY_WEB_BUFFER_API) {
fetch(LBRY_WEB_BUFFER_API, {
method: 'post',
headers: {
Accept: 'application/json',
'Content-Type': 'application/json',
fetch(LBRY_WEB_BUFFER_API, {
method: 'post',
headers: {
Accept: 'application/json',
'Content-Type': 'application/json',
},
body: JSON.stringify({
device: 'web',
type: 'buffering',
client: data.userIdHash,
data: {
url: claim.canonical_url,
position: data.timeAtBuffer,
duration: data.bufferDuration,
stream_duration: data.duration,
stream_bitrate: data.bitRate,
},
body: JSON.stringify({
device: 'web',
type: 'buffering',
client: data.userIdHash,
data: {
url: claim.canonical_url,
position: data.timeAtBuffer,
duration: data.bufferDuration,
player: data.playerPoweredBy,
stream_duration: data.duration,
stream_bitrate: data.bitRate,
},
}),
});
}
}),
});
},
tagFollowEvent: (tag, following) => {
sendMatomoEvent('Tag', following ? 'Tag-Follow' : 'Tag-Unfollow', tag);

View file

@ -87,10 +87,7 @@ function VideoViewer(props: Props) {
}, [uri, previousUri]);
function doTrackingBuffered(e: Event, data: any) {
fetch(source, { method: 'HEAD' }).then(response => {
data.playerPoweredBy = response.headers.get('x-powered-by');
doAnalyticsBuffer(uri, data);
});
doAnalyticsBuffer(uri, data);
}
function doTrackingFirstPlay(e: Event, data: any) {

View file

@ -491,7 +491,6 @@ export function doAnalyticsBuffer(uri, bufferData) {
bitRate,
userIdHash,
duration: fileDurationInSeconds,
playerPoweredBy: bufferData.playerPoweredBy,
});
};
}