readtomyshoe icon indicating copy to clipboard operation
readtomyshoe copied to clipboard

Warning due to "fake play"

Open rozbb opened this issue 3 years ago • 0 comments

Browser: All browsers

Description: Whenever playing an article from the queue, an warning shows up in the console, saying something like

HTTP “Content-Type” of “application/x-unknown-content-type” is not supported. Load of media resource blob:<base_url>/75fe7bcf-6205-4786-9c1a-9725da54a14a failed.

This is because the fake_play() function attempts to play an empty blob. The reason for that is because Safari requires an immediate play() action after a button click in order to permit future play()s without user interaction. So the button click handler calls play() immediately on invalid audio before loading the real audio.

Notes: A fix for this might be to play an valid, but empty MP3 file. I've tried this and couldn't get it to work for the life of me.

rozbb avatar Aug 07 '22 06:08 rozbb