S
S
Sergey Shumilin2016-08-23 10:54:51
Programming
Sergey Shumilin, 2016-08-23 10:54:51

How to stop audio playback when removing headphones?

Colleagues, programmers!
How can I programmatically disable audio playback when headphones are removed from the head, for example, in yandex.music or on sites with audio books or a regular player? Those. do not turn off the volume, namely stop playback.
Those. I take off the headphones from my head (the phone rang, or I need to move away or some other urgent action). You take your headphones off your head and leave. When he returned, the book went ahead. And so, no, I put it on - playback started from the place where it stopped at the moment the headphones were removed.
We proceed from the fact that I know how to fix the removal and putting on of the headphones and can I generate any event in the PC?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
Александр, 2016-08-23
@Sergei2405

послать нажатие клавиши паузы?(пробел, пауза медиаклавиатуры)

Александр Пожарский, 2016-08-23
@alex4321

"We proceed from the fact that I know how to fix the removal and putting on of the headphones and can I generate any event in the PC?"
Obviously, to make a software that creates a local web server / uses web sockets (in general, it doesn’t matter - the main thing is that it can be reached from the browser) and a browser extension that checks its state and controls playback.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question