Issues with video playback - HTMLMediaElement.currentTime value being assigned is not a finite floating point value
Describe the bug
Playing a video can sometimes crash the Presentation player. After the crash, it becomes unresponsive until a full page reload (Ctrl+R on Firefox). Using videoRef().seek(0.01) seems to mitigate the issue somewhat, however it still occurs at times. Making the video loop={true} seemingly makes the issue more common.
To Reproduce Open the attached reproduction project, enter the presentation mode. Essentially the minimum here would be to have a Video playing/looping in the presentation mode, however the bug is somewhat unpredictable and in the attached file it seems to occur the majority of times.
If the bug does not occur, reload the page and try again - it occurs about 50% of the time.
Expected behavior Probably should not crash.
Console errors
Package versions:
- core: 3.18.0-alpha.0
- two: 3.18.0-alpha.0
- ui: 3.18.0-alpha.0
- vitePlugin: 3.18.0-alpha.0
(same happens with all the packages on 3.17.2)
Additional context Reproduced on:
- Windows 11 (Firefox 144.0.2)
- Arch Linux (Firefox 144.0.2)
- Arch Linux (Chromium 142.0.7444.59)
Tested with different videos (both .mp4/h264 and .webm/vp8), all encoded using ffmpeg.
Source: motion-canvas/motion-canvas