vidstack / player

UI components and hooks for building video/audio players on the web. Robust, customizable, and accessible. Modern alternative to JW Player and Video.js.
https://vidstack.io
MIT License
2.15k stars 126 forks source link

Subtitles don't show if the Video Player "expands" in Width after loading #1264

Closed PJUllrich closed 2 months ago

PJUllrich commented 5 months ago

Current Behavior:

This is a weird one but if the container of the player is small, the video player will "expand" that width once it's fully loaded. If that happens, the subtitles don't show (maybe because the initial player was too small to show them?).

It's easiest to explain it with a demo:

https://github.com/vidstack/player/assets/10426523/877f5229-af7f-43f3-9d7e-e1c0c7b1ecab

In this demo, I first have a container which is wider than the video. The video loads in full-width and shows the subtitles correctly.

I then make the container "smaller" but don't specify a width. It's just relative to the initial width of the player I guess. Once the player loads the video, it "expands" the width, I don't know exactly to which size though or why. But if that happens, the subtitles don't show anymore.

Expected Behavior:

Either the video should have the proper width to begin with, or the subtitles should show even after the player resizes.

Steps To Reproduce:

Reproduction Link: How to create a repro?

Environment:

vidstack 1.11.19

Anything Else?

mihar-22 commented 2 months ago

Really sorry for the delayed response @PJUllrich! I've been busy at home and just catching up on work. I've tried to reproduce this for a good 20 mins but no luck. If you can provide some instructions on the styles applied to the modal and player I might have a better chance debugging it. A repro would be preferrable. I'll reopen if the issue persists and instructions or repro is provided. Thanks!!

ℹ️ Please upgrade to latest and try again as the issue might have been resolved through some other fixes.

PJUllrich commented 2 months ago

That's alright @mihar-22 :) Thanks for looking into this. I couldn't replicate it with the latest version anymore, so I think this is done-done. Thank you!