Disable iOS Safari lock screen scrubber for media

后端 未结 3 461
时光取名叫无心
时光取名叫无心 2021-01-18 10:31

Safari on iOS puts a scrubber on its lock screen for simple HTMLAudioElements. For example:

const a = new Audio();
a.src = \'https://example.com/audio.m4a\'         


        
3条回答
  •  囚心锁ツ
    2021-01-18 11:10

    From my understanding you can't block/hide the scrubbing commands unless you can tag the audio as a live stream. That being said, you can use js to refuse scrubbing server-side. Reference the answer here. Although that answer speaks of video, it also works with audio.

提交回复
热议问题