Yoooi0 / MultiFunPlayer

flexible application to synchronize various devices with media playback
https://yoooi0.github.io/MultiFunPlayer/
MIT License
122 stars 22 forks source link

OFS seek/position changes should always be respected #131

Closed Yoooi0 closed 11 months ago

Yoooi0 commented 1 year ago

The websocket connection seems to be functioning for the most part. It’s only when I seek in OFS that the timeline doesn’t seem to get updated in MFP. Looking at the logs, MFP does seem to register the events coming through, but doesn’t act on them unless the seek time is large enough.

Setting forceseek to true in the MediaPositionChangedMessage created by the OFSMediaSource seemed to accomplish what I was hoping for. I’m not sure if this is a hack that might affect some other calls down the line, but it’s working how I expected now.

Users are expected to frequently seek in OFS and MFP needs to copy the state 1:1 for good script preview.

Solutions: Force seek all position messages from OFS, but it forces all state lock and an ui update so it shouldn't be done each frame Change seek detection algorithm Ask OFS to differentiate user seek and position update events