Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
190 views
in Technique[技术] by (71.8m points)

android - How play web audio with bluetooth devices

I programmmed a website which uses text to speech engine to generate audio files.

Then these mp3 files are started using Web Audio API.

Everything works fine when hearing aufio from speakers on a computer or on a smart phone.

However, as soon as I connect my bluetooth helmet to the smart phone, the audio is not played.

Is it a famous issue that Web Audio API doesn't work with bluetooth devices, or does the issue come from my code?

Do I need to change the context's destination ? How can I set it to buetooth? (ex : https://www.html5rocks.com/en/tutorials/webaudio/intro/)

source.connect(context.destination); // connect the source to the context's destination (the speakers)

This question has already been posted on stackoverflow, but I can't find an answer.

Please help me.

question from:https://stackoverflow.com/questions/65660744/how-play-web-audio-with-bluetooth-devices

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Hi use the web bluetooth library for more reference read this here


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...