powerslime / sync-watch Goto Github PK
View Code? Open in Web Editor NEWYet another service for sync player between people
Home Page: https://sw.server.powerslime.ru
Yet another service for sync player between people
Home Page: https://sw.server.powerslime.ru
On receiving kodik_player_current_episode
pause player (already done) and emit socket message. Also implement this method in player
.
On receiving changeEpisode
from socket player's changeEpisode
should be triggered.
change_episode
method. Should be sended by postMessage (player._sendPostMessage
method)
{
method: "change_episode",
season: 5,
episode: 3
}
Example: player._sendPostMessage("change_episode", { season: 5, episode: 3 }, false)
. Should be done like seek
method, with possibility to not send socket message.
Method name: changeEpisode
Example: player.methods.changeEpisode({ season, episode })
Users should be able to synchronize their time with another users by seeking the video.
Main problem that kodik
player doesn't have encessary events. I think, it is possible to add by watching set currentTime
if abs(newTime - oldTime) > 1
then we got a seek
event.
When we got it a socket message should be emited to let other users know our currentTime
. It is possible by trigger player.seek(currentTime)
by default it sends message to socket too.
bufferingStart
bufferingEnd
Using this.emit()
in player instance.
It's possible by always trying to send play/pause commands. If player didn't send postMessage Event back -- it's buffering. But... Looks weird... Should be a better way to do this.
It's necessary to pause all other clients when one of them have slow internet connection and movie starts buffering. When buffering is end -- pause
and seek
methods should be called. To re-synchronize all the clients. After that we can start playing movie again.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.