alamminsalo / orion

Cross platform Twitch.tv client
GNU General Public License v3.0
314 stars 60 forks source link

VOD chat replay #113

Closed rakslice closed 7 years ago

rakslice commented 7 years ago

When playing a VOD, replay chat that happened during the original broadcast instead of joining the live chat channel.

This is a hack, in that it uses the undocumented chat replay API that Twitch web UI uses, and it scrapes the VOD's chat replay start time from an error message (it seems that the chat-replay chunk requests need to be aligned to 30s intervals based on that start time to not miss messages, and the chat replay start value doesn't correspond to the VOD start time and doesn't seem to be available elsewhere). Messages are deduplicated by id in a 150-300 second window in case the responses overlap, although since I switched to the start-aligned 30s intervals I don't see duplicates in practice.

FYI this branch contains the mpv_time_offset_workaround branch.

ahjolinna commented 7 years ago

@rakslice : this patch failed to build for me :D other 3 did works just fine

[   59s] patching file src/qml/MpvBackend.qml
[   59s] Reversed (or previously applied) patch detected!  Assume -R? [n] 
[   59s] Apply anyway? [n] 
[   59s] Skipping patch.
[   59s] 4 out of 4 hunks ignored -- saving rejects to file src/qml/MpvBackend.qml.rej
[   59s] patching file src/model/ircchat.cpp
[   59s] patching file src/model/ircchat.h
[   59s] error: Bad exit status from /var/tmp/rpm-tmp.V9wIjY (%prep)