Fix videos not switching when floating player is up

## Issue
6278 Video doesn't switch when floating player is up

## Notes
Not sure why the double `src` call is needed, but it is.
This commit is contained in:
infinite-persistence 2021-06-19 10:55:44 +08:00 committed by Thomas Zarebczan
parent 3db845b9bf
commit 244f5ecaa4

View file

@ -564,6 +564,12 @@ export default React.memo<Props>(function VideoJs(props: Props) {
// note: the poster prop seems to return null usually.
if (poster) player.poster(poster);
// Update player source
player.src({
src: finalSource,
type: type,
});
// set playsinline for mobile
player.children_[0].setAttribute('playsinline', '');