B
B
BonBon Slick2021-01-25 22:59:35
Video
BonBon Slick, 2021-01-25 22:59:35

How to competently implement video viewing by the user in only one tab?

If 100 users open 2 tabs each, then the load will be like 200 users. So you can pout.
The goal is to optimize, minimize the load on a weak server.
From the implementation examples, the CurrentWatching entity and take data from it and nothing more.
The idea is taken from spotify where on different devices and windows you can run only 1 track at a time.

How would you implement such functionality? Why is that?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Daniil Vasilyev, 2021-01-26
@BonBonSlick

Well, you can bind CurrentWatchings to the user. And through, for example, web sockets or gRPC, every five seconds while browsing, send that such and such a user looks at such and such a second. And when loading the page, check whether it looks or not. It's more for functionality. And it’s easier and better, probably, to use CDN + cache for video files.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question