Replies: 2 comments
-
Amazing 🥳 |
Beta Was this translation helpful? Give feedback.
-
Just leaving a note that the idea of progressive enhancement hasn't been lost on us but we're still thinking about the why. Something like this might be possible in the future: <!-- this is not supported yet -->
<media-outlet>
<video></video>
</media-outlet> I'm just wondering why if we also provide support for |
Beta Was this translation helpful? Give feedback.
-
👋
This is a really exciting release! The focus was the media providers change proposal but so much was fixed/added along the way. Get ready to meet our new player markup, some old friends, and much more :)
Important Note
Be aware there's quite a few breaking changes but we're officially committing to this being the last breaking changes to core. We'll be moving forward with this architecture into 1.0. Nearly everything from here will be fixes, enhancements, or new additions.
Media Prefix (BREAKING CHANGE)
We've moved from the
vds-*
prefix for our element and React component tag names tomedia-*
for HTML and<Media*>
for React. Following our friends over at media-chrome. Honestly, thevds-
prefix never sat well with me. We just needed a good time/reason to make the shift and this was perfect with the media providers change proposal.We were debating whether we'll be a media UI framework or player for a while. After some back/forth we decided being a complete player will lead to the best DX for most of our users (you!). Hence, why our new top-level element changed from
vds-media
tomedia-player
🎉DEFINE
HTML
REACT
TYPES
Player Markup (BREAKING CHANGE)
OLD
NEW
HTML
REACT
The best part? This is the same regardless of which provider you choose. We'll talk about
<media-outlet>
further down - that's the most exciting part of this design!Aspect Ratio (BREAKING CHANGE)
OLD
Yikes!
NEW
Few new CSS variables join the family as well:
--media-min-height
: Specifies the minimum height of the provider output.--media-max-height
: Specifies the maximum height of the provider output.--media-aspect-ratio
: This is automatically set by the aspect ratio attr/prop but you can now set it for initial HTML loads to prevent a layout shift. The docs loading page covers this.Media Outlet (NEW)
If you've worked with newer JS frameworks you might've encountered a
<RouterOulet>
component before. This is similar but for media! The<media-outlet>
serves as a render target for the current media provider. The outlet gives you complete control of where the provider is rendered. This flexibility enables layouts, floating players, external controls, and more.👉 See the media outlet docs for further learning.
Player Subscribe (BREAKING CHANGE)
We redesigned the player subscription API as the old made it hard to listen to multiple updates at once which could also cause race conditions.
OLD
NEW
HLS Events (BREAKING CHANGE)
We've added the
hls
prefix back to HLS events since they're now available out of the box on the<media-player>
component.OLD
React callbacks also have the
Hls
prefix:Source Handling (NEW)
Two new props join the family,
src
andpreload
. Both are available on the media player component.The introduction of the
src
prop means we can handle source changes internally leading to a much more reliable and smoother change process. No more stressing about how to handle source/provider changes. We do it for you!Some new events are here too:
👉 See the new loading source docs for further learning.
Source Objects (NEW)
The player now accepts source objects such as
MediaStream
,MediaSource
,Blob
, andFile
.👉 See the new loading source docs for further learning.
Provider Tech (NEW)
Providers are no longer elements and are completely managed out of the box for you. As part of the source selection process, we select the best provider for the job, dynamically load it, preconnect any URLs, and load the source. This release is all about making your life easier 🍹
New Types/Checks
New Events
👉 See the new provider loading docs for further learning.
Media Toggle Button (NEW)
The toggle button is back!
👉 See the media toggle button docs for further learning.
Media Slider (New)
The slider is back and improved!
👉 See the media slider docs for further learning.
Slider Subscribe (NEW)
All sliders such as
<media-slider>
,<media-time-slider>
, and<media-volume-slider>
now have a subscribe method similar to the player.Media Remote Improvements (NEW)
The media remote had some neat improvements:
togglePaused
,toggleMuted
, andtoggleFullscreen
.Deprecations/Changes (BREAKING CHANGE)
The following were all deprecated and removed from the library:
vds-aspect-ratio
element was removed.vds-hls-video
element was removed.vds-video
element was removed.vds-audio
element was removed.view
attribute is no longer required.isHLSVideoElement
have been removed.media-connect
event is nowmedia-player-connect
REACT
<MediaProvider>
React component was removed. This is no longer required as we switched back to simple refs.useMediaElement
is nowuseMediaPlayer
.useMediaProviderElement
hook is nowuseMediaProvider
.useMediaState
hook is nowuseMediaStore
(again) to align with the slider hook. Apologies for the back and forward change on this one.👉 Refer to React state management docs for further information on mentioned changes.
Docs/Fixes
Next Steps
We're mostly continuing with tasks listed last week as this week was about final core library changes.
<media-gesture>
,<media-sync>
, and<media-visibility>
management components.Following that is a mix of framework integrations, feature parity, and skins work. We're not sure on the order of things yet but we'll share some updates when we know.
Community Discord
Hope you enjoy this latest release as much as we did building it! If you have any awesome ideas on how to make the player better drop by our Discord. We're slowly growing and just passed 500 members! I can't wait to see where we end up after some big releases around frameworks, skins, and the big 1.0!
💬 Join us on Discord
Until next time friends 🍎
Beta Was this translation helpful? Give feedback.
All reactions