Desktop Audio Capture Not working for chrome app

£可爱£侵袭症+ 提交于 2019-12-01 11:19:44

问题


According to https://code.google.com/p/chromium/issues/detail?id=223639 chromium has issues with audio Loopback. and it never works in chrome app. Can anyone share some links and explanation to why is this not working?Or if it is possible? I tried below code but lot of disturbance in desktop audio.

video: {
  mandatory: {                
      chromeMediaSource:'screen',
      chromeMediaSourceId: id
  }
},
audio: {
  mandatory: {
    chromeMediaSource: 'system',
    chromeMediaSourceId: id, 
  }
}

Multiple streams are captured and attached to a single peer connection?

Thanks!


回答1:


AFAIK only desktopCapture API are supporting audio+tab.

chromeMediaSource value must be desktop.

video: {
  mandatory: {                
      chromeMediaSource:'desktop',
      chromeMediaSourceId: 'sourceIdCapturedUsingChromeExtension'
  }
},
audio: {
  mandatory: {
    chromeMediaSource: 'desktop',
    chromeMediaSourceId: 'sourceIdCapturedUsingChromeExtension'
  }
}

Try following demo on Chrome-Canary:

  • https://rtcmulticonnection.herokuapp.com/demos/Audio+ScreenSharing.html

However make sure to enable chrome://flags#tab-for-desktop-share flag.



来源:https://stackoverflow.com/questions/35444604/desktop-audio-capture-not-working-for-chrome-app

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!