Skip to content

Commit

Permalink
Update sticky doc
Browse files Browse the repository at this point in the history
Update sticky providers
Add border radius on sticky element
  • Loading branch information
yoriiis committed May 2, 2023
1 parent 94b2f5a commit dfcd78b
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 11 deletions.
20 changes: 10 additions & 10 deletions src/plugins/sticky/README.md
Expand Up @@ -4,15 +4,15 @@ Supports for sticky mode.

## Overview

| <!-- --> | <!-- --> |
| ----------------- | ---------------------------------------- |
| Name | `sticky` |
| Global name&sup1; | `window.VlitejsSticky` |
| Path | `vlitejs/dist/plugins/sticky` |
| Entry point | `vlitejs/dist/plugins/sticky/sticky.js` |
| Stylesheet | `vlitejs/dist/plugins/sticky/sticky.css` |
| Provider&sup2; | `'html5'` |
| Media type&sup3; | `'video'` |
| <!-- --> | <!-- --> |
| ----------------- | -------------------------------------------- |
| Name | `sticky` |
| Global name&sup1; | `window.VlitejsSticky` |
| Path | `vlitejs/dist/plugins/sticky` |
| Entry point | `vlitejs/dist/plugins/sticky/sticky.js` |
| Stylesheet | `vlitejs/dist/plugins/sticky/sticky.css` |
| Provider&sup2; | `'html5', 'youtube', 'vimeo', 'dailymotion'` |
| Media type&sup3; | `'video'` |

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

```js
Vlitejs.registerPlugin('cast', VlitejsCast, {
Vlitejs.registerPlugin('sticky', VlitejsSticky, {
mode: 'instant',
offset: 20,
width: 400,
Expand Down
2 changes: 2 additions & 0 deletions src/plugins/sticky/sticky.css
Expand Up @@ -6,6 +6,8 @@
top: 0;
left: 0;
z-index: 1;
border-radius: 8px;
overflow: hidden;
}

&-closeStickyButton {
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/sticky/sticky.ts
Expand Up @@ -23,7 +23,7 @@ export default class Sticky {
observer!: IntersectionObserver
resizeTimer!: number

providers = ['html5']
providers = ['html5', 'youtube', 'dailymotion', 'vimeo']
types = ['video']

/**
Expand Down

0 comments on commit dfcd78b

Please sign in to comment.