UPDATE: In response to Luke’s feedback, I’ve written out my proposal in a little bit more detail here (Ok, a lot more detail). Would love more feedback on the proposal, rather than the process. If people think it wise, I’ll start a new post and just do a do-over.
I’ve been working diligently on a wrapper for the HTML5 Media API for several months, and am ready to release it to this fine group for them to rip it to shreds and tell me what I can do better.
It can be found here.
Let me state at the top:
-
It uses native code…yes, I know, I know.
-
Using native code means I can’t publish to Elm-Packages. Tell me about it.
-
This potentially makes more work for Evan. Yes, it does. I’m sorry, Evan. Not my intention, I’m just passionate about this API and am hoping to push the ball forward in making it easier in Elm (about which I’m also passionate).
-
Just use ports…This is fine for one off media apps like a podcast player or even a youtube clone, but one of, if not THE most used scenario for the media API is a reusable player. My goal is that this package will someday be used by myself and others to make best-in-class audio and video players that are easy to configure, reusable views. To that end, I’ve created an example here
I understand the safety concerns for not allowing native modules and agree with them. I also strongly agree with not just wrapping an existing JavaScript library in Elm, but rather rewriting in Elm. To that end, my hope, if I’m not laughed out of the room with this package, is to also add a good Elm API to the Media Source Extensions API so that we can have our own implementations of HLS and MPEG-DASH without relying on JavaScript.
However, this package only uses modules to wrap native Media API calls. This is the only way to do it, other than ports.
I’m not sure what the submission process will be like, but this would be the exact kind of thing one might submit to elm-explorations someday. I hope that it can become, or at least inspire, a package that can help us use HTML5 Media in elm apps, hopefully sooner rather than later.
Thanks all, and don’t be afraid to really be brutal in your critiques. I have lots of Japanese Whiskey on hand, and I want this to be as good as it possibly can be. Just please, no criticisms of my hair cut.
Thanks for your time and input.