What I want to achieve is create a custom binding for Knockout.js which enables to bind to model and play defined audio file using HTML5 audio tag when that observable changes. so for example it would look something like
<p data-bind="audio: {value: someobservable, sound:'pathto/sound.mp3'}"><?p>
as far as I understand this must bu custom knockout binding which has init and update methods and on init it checks if any audio tag is presented in DOM and create one in case there is no audio tag and play sound value in case value property changes. as far as I understand I must internally subscribe to value binding but could not get exact idea how to implement that. could anyone help me out there?