diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..2ccbe46 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/node_modules/ diff --git a/README.md b/README.md new file mode 100644 index 0000000..299f346 --- /dev/null +++ b/README.md @@ -0,0 +1,54 @@ +# `is="castable-video"` + +Cast your video element to the big screen with ease! + +The lightweight `CastableVideo` class extends the native `HTMLVideoElement` API and adds casting functionality to any video element. The API was designed to have the feel of a native browser API similar to the other screen presentation API's. + +It was primarily built for use in [Media Chrome](https://github.com/muxinc/media-chrome) but it works great with any custom video controls as you can see in the example. + + +```html + + + + + + + + + + +``` + +## API + +### Methods + +- `video.requestCast(options)` +- `CastableVideo.exitCast()` + +### Properties + +- `CastableVideo.castElement` +- `CastableVideo.castAvailable` + +### Events + +- `entercast` +- `leavecast` +- `castchange` + +e.g. `video.addEventListener('entercast', () => {})` + +### Attributes + +- `stream-type`: add `