Closed luwes closed 1 month ago
this is a race condition of this test where on heavy websites only after about 80 to 100ms the media.volume
property jumps back to its original value.
/**
* Test for volume support
*
* @param mediaEl - The media element to test
*/
export const hasVolumeSupportAsync = async (
mediaEl: HTMLVideoElement = getTestMediaEl()
): Promise<boolean> => {
if (!mediaEl) return false;
const prevVolume = mediaEl.volume;
mediaEl.volume = prevVolume / 2 + 0.1;
await delay(0);
return mediaEl.volume !== prevVolume;
};```
this should be added as an attribute if changing volume via software is not available. on most mobile devices.
open https://player-style-e61wlc1tb-mux.vercel.app/themes/halloween on iOS see volume range candle not hiding!