Skip to content

Commit dfcd78b

Browse files
committed
Update sticky doc
Update sticky providers Add border radius on sticky element
1 parent 94b2f5a commit dfcd78b

File tree

3 files changed

+13
-11
lines changed

3 files changed

+13
-11
lines changed

src/plugins/sticky/README.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@ Supports for sticky mode.
44

55
## Overview
66

7-
| <!-- --> | <!-- --> |
8-
| ----------------- | ---------------------------------------- |
9-
| Name | `sticky` |
10-
| Global name&sup1; | `window.VlitejsSticky` |
11-
| Path | `vlitejs/dist/plugins/sticky` |
12-
| Entry point | `vlitejs/dist/plugins/sticky/sticky.js` |
13-
| Stylesheet | `vlitejs/dist/plugins/sticky/sticky.css` |
14-
| Provider&sup2; | `'html5'` |
15-
| Media type&sup3; | `'video'` |
7+
| <!-- --> | <!-- --> |
8+
| ----------------- | -------------------------------------------- |
9+
| Name | `sticky` |
10+
| Global name&sup1; | `window.VlitejsSticky` |
11+
| Path | `vlitejs/dist/plugins/sticky` |
12+
| Entry point | `vlitejs/dist/plugins/sticky/sticky.js` |
13+
| Stylesheet | `vlitejs/dist/plugins/sticky/sticky.css` |
14+
| Provider&sup2; | `'html5', 'youtube', 'vimeo', 'dailymotion'` |
15+
| Media type&sup3; | `'video'` |
1616

1717
> **Note** _&sup1; Useful only if `vLitejs` is included with a `<script>` tag (see [CDN](../../../README.md#CDN) section)._
1818
@@ -59,7 +59,7 @@ The plugin allows customization with an optional object as the third parameter o
5959
| `ratio` | `Number` | `16/9` | Specify the ratio of the sticky player |
6060

6161
```js
62-
Vlitejs.registerPlugin('cast', VlitejsCast, {
62+
Vlitejs.registerPlugin('sticky', VlitejsSticky, {
6363
mode: 'instant',
6464
offset: 20,
6565
width: 400,

src/plugins/sticky/sticky.css

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
top: 0;
77
left: 0;
88
z-index: 1;
9+
border-radius: 8px;
10+
overflow: hidden;
911
}
1012

1113
&-closeStickyButton {

src/plugins/sticky/sticky.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export default class Sticky {
2323
observer!: IntersectionObserver
2424
resizeTimer!: number
2525

26-
providers = ['html5']
26+
providers = ['html5', 'youtube', 'dailymotion', 'vimeo']
2727
types = ['video']
2828

2929
/**

0 commit comments

Comments
 (0)