R
R
romasimonov2022-04-07 23:48:41
Headphones
romasimonov, 2022-04-07 23:48:41

Is it possible to determine on the site that a person is wearing headphones?

Good afternoon!

There is an idea - to play sound on the site. I would like to understand whether it is possible to determine that a headset or headphones is connected to the visitor's laptop / desktop. And play sound only to those visitors who are wearing headphones?

As far as I understand, speakers can also be connected to the mini-jack connector. Can I track the type of device (headphones or speakers)? And also to track that the headphones are connected via bluetooth?

I understand that the question is amateurish, but I will be grateful to those who understand the development of sites.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
V
Vasily Bannikov, 2022-04-07
@romasimonov


And also to track that the headphones are connected via bluetooth?

In theory, you can somehow get information about connected bt-devices if the user gives such access to your site.
But determining the type of connected audio device in jack is unrealistic.
For example, personally, I constantly re-plug headphones and speakers.
The audio card cannot physically determine what is inserted into it, because the jack is purely analog.
Only in the settings, the user can manually indicate what he uses, but this does not particularly affect anything.

T
ThunderCat, 2022-04-08
@ThunderCat

The most adequate option - stupidly ask "can you play the sound?". I am sure that 99.9% of users will not be happy with the left uninvited sounds on the site, no matter what they are displayed there ...

S
Sergei Nazarenko, 2022-04-08
@nazares

https://developer.mozilla.org/en/docs/Web/API/Web_...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question