samvera-labs / ramp

Interactive, IIIF powered audio/video media player React components library. Styleguidist Docs: https://samvera-labs.github.io/ramp/
https://ramp.avalonmediasystem.org/
30 stars 5 forks source link

Create inaccessible message interval only in a single custom hook #690

Closed Dananji closed 1 month ago

Dananji commented 1 month ago

Related issue: #673

Only invoke createDisplayTimeInterval() method within useShowInaccessibleMessage custom hook. When this was called within initCanvas() in useSetupPlayer hook, it creates multiple intervals disabling the remaining time updates in the timer on display. Use canvasIndex instead of canvasIndexRef in the dispatch to update manifest-state when timer ends. It was observed that, in Safari and Chrome using canvasIndexRef causes to skip an item when auto-advancing (most probably due to timing of these updates are getting overlapped) in avalon's playlists where there are inaccessible items. However this was not seen in these browsers in the demo site.