How to set phone speaker as default audio output in webview (Ionic)

假装没事ソ 提交于 2020-01-07 05:25:17

问题


I have implemented twilio VOIP in ionic framework. When i trigger call at that time phone speaker will serve as default audio output source instead of phone default speaker.

I have try using getUserMedia() but i haven't fount correct way.

I want something cool like audio.setSpeaker(phoneSpeaker)


回答1:


I have found cordova plugin that toggle speakers.

these plugin will found here https://github.com/alongubkin/audiotoggle

cordova plugin add audiotoggle



来源:https://stackoverflow.com/questions/43338310/how-to-set-phone-speaker-as-default-audio-output-in-webview-ionic

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