Is there any event in JavaScript, I can listen to in browser, through which we can know whether headphones are inserted or removed?
I assume if we are able to iterat
I am using phone-gap plugin for the same
HTML:
JS:
$scope.checkHeadphone = function () { window.plugins.headsetdetection.detect(function (detected) { alert("Headphone " + detected) }) }