From 19f924fe3f205467e833c9495d648b907e7cc382 Mon Sep 17 00:00:00 2001 From: Vahid Menu Nesro Date: Tue, 28 Nov 2023 00:20:13 +0100 Subject: [PATCH] docs: add ui-video migration guide --- .../src/docs/Migration/ui-video.mdx | 87 +++++++++++++++++++ 1 file changed, 87 insertions(+) create mode 100644 packages/components/src/docs/Migration/ui-video.mdx diff --git a/packages/components/src/docs/Migration/ui-video.mdx b/packages/components/src/docs/Migration/ui-video.mdx new file mode 100644 index 000000000..8bcba9e3f --- /dev/null +++ b/packages/components/src/docs/Migration/ui-video.mdx @@ -0,0 +1,87 @@ +# Migration Guide: From `ui-video` to `sd-video` + +The new `sd-video` is designed to replace the `ui-video`. Instead of mainly providing content via attributes, the `sd-video` component uses slots to allow for more flexibility and customization. + +## ๐Ÿ’พ Slots + +### โœจ New Slots + +#### [default] + +The default slot is used to pass a video player element. + +#### [play-icon] + +The slot for the video's play icon. + +#### [poster] + +Slot to specify an image to be shown before initial play of the wrapped video. This acts like the `poster` attribute on the native video tag. + +
+ +## โš™๏ธ Attributes + +### โœจ New Attributes + +#### [playing] + +Setting this to `true` will hide the play icon and the overlay. + +#### [isBelowBreakpoint] + +Used to set a reactive property to trigger breakpoint re-renders. + +### โŒ Removed Attributes + +The following attributes have been removed from the new sd-video component: + +1. [videoId] +2. [copyrightText] +3. [looped] +4. [muted] +5. [src] +6. [errorText] +7. [contain] + +
+ +## ๐Ÿฅณ Events + +### ๐Ÿ”„ Updated Events + +#### [sd-play] + +Renamed from `uiVideoPlay` to `sd-play`. + +### โŒ Removed Events: + +The following events have been removed from the new sd-video component: + +1. [uiVideoPause] +2. [uiVideoError] + +
+ +## ๐Ÿฆป Event Listeners + +### โŒ Removed Event Listeners: + +The following event listeners have been removed from the new sd-video component: + +1. [message] +2. [uiVideoIframeMessage] +3. [uiSliderSlideChange] + +
+ +## ๐Ÿงช Methods + +### โŒ Removed Methods: + +The following methods have been removed from the new sd-video component: + +1. [playPause] +2. [errorPlayVideo] + +