I was trying to get the current viewers watching the video over the duration of the video. I was hoping someone had a technique that I could use to accomplish this.
For example: Getting live viewers of video_id 242561765 at video_index 0:00:00, 0:00:10, and so on…
The API does not provide that historical information. You would need to keep track of the value yourself while the content is live.
If you have the extension running while the video & chat is being played back, then you can write a script using the browsers “mutation observer api” to watch for any changes made to the chat being played back and extract the username and message.
Which only gives you a count of people chatting at that second. Not the number of viewers
Correct, the method I have specified won’t obtain an accurate count of viewers if that was the intent. However, if the intent was to obtain the list of chatters and their messages on a VOD this would be the method to do so. The question was unclear if zimola wished to acquire the total views at any given point on the VOD or just the users and their messages. I went with the latter, hoping I answered the question accurately.
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.