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

Custom hook for MediaPlayer and VideoJSPlayer handling #647

Closed Dananji closed 1 month ago

Dananji commented 2 months ago

Related issue: #630

Includes custom hook implementations for player related state updates.

For some of the functionality in the custom hooks, unit tests are added. Most of the code in these hooks are covered by the unit tests in respective components' test-cases. Test coverage in the new module @Services/ramp-hooks.js added in this work (#630) is around 70%. The parts that are not covered in tests are either impossible/hard to write tests with just the custom hook functionality.