How do I synchronise the progress of a video using socketio?
Unanswered
Spanish Mastiff posted this in #help-forum
Spanish MastiffOP
I am using socketio and nextjs v13.4.1 along with react player. I have custom controls implemented.
I have a room component which has reactPlayer and controls in it.
Code: https://pastebin.com/q2Y8Y9vw
server.js:
https://pastebin.com/5YvSkkwM
When my input (type=range) changes, I want to the player to seek to that time for all the people in that room. However, it seems that the video just starts from scratch when I do that. Is it because of component re render as the state changes? There is no issue in play, pause and update-url events.
How can I fix this?
I have a room component which has reactPlayer and controls in it.
Code: https://pastebin.com/q2Y8Y9vw
server.js:
https://pastebin.com/5YvSkkwM
When my input (type=range) changes, I want to the player to seek to that time for all the people in that room. However, it seems that the video just starts from scratch when I do that. Is it because of component re render as the state changes? There is no issue in play, pause and update-url events.
How can I fix this?