Skip to content

Comment on Show HN: Winamp and other media players, rebuilt for the web with Web Components

Comments

I love it. Just one kindness: could you add subtitle tracks to the wizard? They are quite hard to add for now, since there is no documentation and media-chrome seems to use a different synthax.

Thank you for the feedback! I'm not quite sure I'm following, though. By the wizard do you mean the framework/element picker within a theme? Would you want the wizard there to be something where you can put in a URL for a subtitle track and we'll add it to the generated tag?

If you're seeing something weird around subtitle syntax then there's probably a documentation issue somewhere (or I'm misunderstanding your question). Subtitles themselves should work with a standard `<track>` in the media element, and the only other place we touch them is via the captions button/menu to toggle those tracks.

About the wizard, it would help if you just had a "Subtitles" checkbox somewhere which then adds a blank <track> line to the script.

As for the synthax question, my point is that your script looks like this

  <video
    slot="media"
    src="https://stream.mux.com/fXNzVtmtWuyz00xnSrJg4OJH6PyNo6D02UzmgeKGkP5YQ/low.mp4"
    playsinline
    crossorigin
  ></video>
And media chorme looks like this

<video slot="media" src="./video.mp4" crossOrigin playsInline>

<track label="English" kind="captions" srcLang="en" src="./captions.vtt"></track>

<track label="thumbnails" default kind="metadata" src="./thumbnails.vtt"></track>

</video>

And I just don't know how to interpolate the two

(Edit, checking further, I did manage to mix the two, and I can play subtitles over your demo video, but not over mine so I guess a foolproof sample in the wizard is probably needed :D )

Ahh ok, I see your point. I'll open an issue on the repo to track this, makes sense to me! Either way, helps to really drive the point home that "it's just a normal media element in a slot."

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.