-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
87 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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. | ||
|
||
<hr /> | ||
|
||
## ⚙️ 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] | ||
|
||
<hr /> | ||
|
||
## 🥳 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] | ||
|
||
<hr /> | ||
|
||
## 🦻 Event Listeners | ||
|
||
### ❌ Removed Event Listeners: | ||
|
||
The following event listeners have been removed from the new sd-video component: | ||
|
||
1. [message] | ||
2. [uiVideoIframeMessage] | ||
3. [uiSliderSlideChange] | ||
|
||
<hr /> | ||
|
||
## 🧪 Methods | ||
|
||
### ❌ Removed Methods: | ||
|
||
The following methods have been removed from the new sd-video component: | ||
|
||
1. [playPause] | ||
2. [errorPlayVideo] | ||
|
||
<hr /> |