Surface real-time view and unique viewer counts in your video player
Online video is becoming increasingly collaborative, co-operative, and community-oriented. Real-time view and unique viewer counts are vital for connecting viewers to video experiences and ensuring those experiences are delightful and consistent. Mux Data's Real-Time Engagement Counts API allows developers to access real-time data on views and unique viewers. This guide demonstrates how to create a simple React application to surface these metrics, using the Mux Video package for easy embedding and configuration with Mux Video and Mux Data. The app keeps track of viewers and displays them in the UI using React's State Hook. Finally, it sets up a JSON Web Token (JWT) to make recurring API calls and update the view and viewer counts.
Company
Mux
Date published
Nov. 4, 2021
Author(s)
Ashley Huynh
Word count
2155
Hacker News points
None found.
Language
English