Open leo6104 opened 1 year ago
@muxinc/elements can be helpful for implementing all events / properties / methods.
https://github.com/muxinc/elements
They provide great compatibility with HTMLMediaElement with clean code.
If you allow me to modify its interface to be like HTMLMediaElement, i can take my efforts on here and can make PR for this.
This is interesting, but if it requires some big changes, I would need to understand if and why it's really worth it.
We can of course add play()
as an alias of start()
, but I would like to avoid any breaking changes (such as removing start()
or making controls disabled by default).
I'm probably not so much in favor of complete support for the whole HTMLMediaElement
API, since we cannot really implement it properly anyway, at least with Magenta.js as a backend – for example, we cannot get timeupdate
working nicely I think.
Currently, it declare
start()
for playing the midi file.In HTMLMediaElement, its interface for playing audio is
play()
.It would be great to follow same interface as HTMLMediaElement Instance Methods. https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/play
Instance property
Instance Property (special for
midi-player
)Instance Methods
start()
toplay()
Events
start
toplay
Special Events for
midi-player