TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Ask HN: Tracking video player viewer statistics

1 pointsby arunnandaover 2 years ago
As part of an embeddable video player I&#x27;m starting to build, I need to have some way of keeping track of viewer behavior.<p>The easy way is to integrate something like Mux (YC Winter 2016). The even easier way is to just use an existing player like video js. But I want to start off by building my own solution.<p>I have the basic player working (still some race conditions to be resolved), so now I am starting to look at tracking viewing behavior. I need to know things like timestamp till which a viewer has watched the video, at what timestamps they paused&#x2F;played&#x2F;forwarded it, when they wanted to seek to an earlier time and rewatch a part of it, etc. etc.<p>Say I start a timer when the viewer presses play. Then for each (milli)second I can check the timestamp of the video - this will let me track if some parts of the video were replayed or fast forwarded. Whenever the viewer presses play&#x2F;pause&#x2F;forward, I record the event. I send this info to the server every 1 or 2 or 5 seconds and do the analytics.<p>Since I haven&#x27;t done this sort of thing before, I would love to have some inputs on if this ^ is the right approach.<p>Does it make sense to treat this data as a timeseries data? If not (even if it is), what else is a good way to organize this data?<p>I assume something like Cassandra (which I haven&#x27;t used much) is much better suited for this than Postgres (which I am comfortable with). Is this right?

1 comment

traszover 2 years ago
&gt;As part of an embeddable video player I&#x27;m starting to build, I need to have some way of keeping track of viewer behavior.<p>Wrong.
评论 #32727921 未加载