browser-player
browser-player copied to clipboard
Doesn't work with elements not in the DOM and Web API
This currently only works with audio
/video
elements in the DOM.
Ideas:
- hijack interfaces like
Audio().play()
so we can skip DOM events altogether - find magic API that tells me if anything's playing
Something like this:
HTMLMediaElement.prototype._play = HTMLMediaElement.prototype.play
HTMLMediaElement.prototype.play = function () {
console.log('playing');
this._play();
} // youtube
Audio.prototype._play = Audio.prototype.play
Audio.prototype.play = function () {
console.log('playing');
this._play();
} // 8tracks
…would add support for:
- SoundCloud
- 8tracks
- Rdio