Moved to timeouts and semaphore

Signed-off-by: Juan Martin Runge <jmrunge@gmail.com>
Reduced sync interval

Signed-off-by: Juan Martin Runge <jmrunge@gmail.com>
Fixed sendStatus to use correctly getExpectedMedia

Signed-off-by: Juan Martin Runge <jmrunge@gmail.com>
Fixed syncMelted to use the real error var

Signed-off-by: Juan Martin Runge <jmrunge@gmail.com>
Removed out of date TODO

Signed-off-by: Juan Martin Runge <jmrunge@gmail.com>
Emit Error and OutOfSync signals

Signed-off-by: Juan Martin Runge <jmrunge@gmail.com>
Added @Lacrymology's merge of my branch

Merge branch 'jmrunge/heartbeats' of https://github.com/inaes-tic/mbc-mosto into jmrunge/heartbeats
Merge branch 'Lacrymology/mosto-backbone' into jmrunge/heartbeats
Moved goto to promises

Signed-off-by: Juan Martin Runge <jmrunge@gmail.com>
Fixed syncMelted to use getServerStatus promise

Signed-off-by: Juan Martin Runge <jmrunge@gmail.com>
Changed fixMelted to use and return goto promise

Signed-off-by: Juan Martin Runge <jmrunge@gmail.com>
Moved syncMelted to promises

Signed-off-by: Juan Martin Runge <jmrunge@gmail.com>
Fixed wrong use of promise in getServerStatus

Signed-off-by: Juan Martin Runge <jmrunge@gmail.com>
Modified use of promises in syncMelted by advice of @Lacrymology

Signed-off-by: Juan Martin Runge <jmrunge@gmail.com>
Removed Q dependency

Signed-off-by: Juan Martin Runge <jmrunge@gmail.com>
Added heartbeat to check if we have enough scheduled medias

Signed-off-by: Juan Martin Runge <jmrunge@gmail.com>
Assume length of clip is always in frames

Signed-off-by: Juan Martin Runge <jmrunge@gmail.com>
Fixed typo

Signed-off-by: Juan Martin Runge <jmrunge@gmail.com>
bugfix

Signed-off-by: Tomas Neme <lacrymology@gmail.com>
makes media.length a moment.duration

Signed-off-by: Tomas Neme <lacrymology@gmail.com>