Skip to content
This repository has been archived by the owner on Nov 1, 2021. It is now read-only.

feat: HtmlVideoElement, HtmlMediaElement, TextTrack, VideoTrack #196

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

illusionalsagacity
Copy link
Contributor

Got a couple of questions here;

Should we append Exn for methods that potentially throw? Or maybe we catch it for convenience and return a result?

Along the same lines, I put in some variants to hold the enums in some (but not all) cases. I kinda like this, as it makes life easier when consuming the bindings. But, willing to remove entirely or cover the other ones. The main problem I ran into was I couldn't type a return value as:

external foo: unit => [@bs.string] [`one | `two | `zero] = "";

So hiding the binding and then wrapping is necessary.

fixes #173

module Impl = (T: {type t;}) => {
type t_htmlMediaElement = T.t;

type mediaProvider; // TODO: one of MediaStream, MediaSource, or Blob
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thinking this might be a Webapi__MediaProvider.t instead of a local phantom type

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

adding bindings to HtmlVideoElement
2 participants