最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

google chrome - Can I playback audio without needing to ask for microphone permissions in browser? - Stack Overflow

programmeradmin1浏览0评论

I am working on a sample app available here

The problem I am running into is when the page loads it asks for microphone permissions (see for a similar situation). This seems a little bit intrusive so I would like to get audio permissions without the microphone for now. Is there a way to toggle that?

I am sure it is in my face but I can't figure out how to just get playback permissions.

Update

I was asked for more detail so the audio is read here

const mediaSource = new MediaSource();
audio.src = URL.createObjectURL(mediaSource);
    mediaSource.addEventListener('sourceopen', async () => {

As you can see from a code perspective it is using a typical MediaSource

与本文相关的文章

发布评论

评论列表(0)

  1. 暂无评论