Skip to content
This repository has been archived by the owner on May 8, 2024. It is now read-only.

Commit

Permalink
docs: update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
luwes committed Jan 12, 2023
1 parent 61fd549 commit f49565f
Showing 1 changed file with 17 additions and 11 deletions.
28 changes: 17 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,14 @@
# `<youtube-video>`

A custom element (web component) for the YouTube player.

The element API matches the HTML5 `<video>` tag, so it can be easily swapped with other media, and be compatible with other UI components that work with the video tag.

## Example

```html
<html>
<head>
<script type="module" src="https://unpkg.com/youtube-video-element@0"></script>
</head>
<body>

<youtube-video controls src="https://www.youtube.com/watch?v=rubNgGj3pYo"></youtube-video>

</body>
</html>
<script type="module" src="https://cdn.jsdelivr.net/npm/youtube-video-element@0"></script>
<youtube-video controls src="https://www.youtube.com/watch?v=rubNgGj3pYo"></youtube-video>
```

## Installing
Expand All @@ -30,7 +23,7 @@ Note the `type="module"`, that's important.
```html
<head>
<script type="module" src="https://unpkg.com/youtube-video-element@0"></script>
<script type="module" src="https://cdn.jsdelivr.net/npm/youtube-video-element@0"></script>
</head>
```

Expand All @@ -49,3 +42,16 @@ Include in your app javascript (e.g. src/App.js)
import 'youtube-video-element';
```
This will register the custom elements with the browser so they can be used as HTML.


## Related

- [Media Chrome](https://github.com/muxinc/media-chrome) Your media player's dancing suit. 🕺
- [`<mux-video>`](https://github.com/muxinc/elements/tree/main/packages/mux-video) A Mux-flavored HTML5 video element w/ hls.js and Mux data builtin.
- [`<mux-player>`](https://github.com/muxinc/elements/tree/main/packages/mux-player) The official Mux-flavored video player web component.
- [`<vimeo-video>`](https://github.com/luwes/vimeo-video-element) A web component for the Vimeo player.
- [`<videojs-video>`](https://github.com/luwes/videojs-video-element) A web component for Video.js.
- [`<wistia-video>`](https://github.com/luwes/wistia-video-element) A web component for the Wistia player.
- [`<jwplayer-video>`](https://github.com/luwes/jwplayer-video-element) A web component for the JW player.
- [`<hls-video>`](https://github.com/muxinc/hls-video-element) A web component for playing HTTP Live Streaming (HLS) videos.
- [`castable-video`](https://github.com/muxinc/castable-video) Cast your video element to the big screen with ease!

0 comments on commit f49565f

Please sign in to comment.