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

Commit

Permalink
feat: rename attributes and docs (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
luwes committed May 27, 2022
1 parent e47e24f commit c02a6ec
Show file tree
Hide file tree
Showing 3 changed files with 493 additions and 475 deletions.
25 changes: 16 additions & 9 deletions README.md
Expand Up @@ -32,23 +32,30 @@ It was primarily built for use in [Media Chrome](https://github.com/muxinc/media

### Methods

- `video.requestCast(options)`
- `CastableVideoElement.exitCast()`
- `video.requestCast(options)`: open the browser casting menu. Options:
- `receiverApplicationId`: defaults to Chromecast default receiver.
- `autoJoinPolicy` ('ORIGIN_SCOPED')
- `androidReceiverCompatible` (false): if `true` enables Cast Connect.
- `language` ('en-US')
- `resumeSavedSession` (false)
- `CastableVideoElement.exitCast()`: stop casting right away.

### Properties

- `CastableVideoElement.castElement`
- `CastableVideoElement.castAvailable`
- `CastableVideoElement.castElement`: the current video element being cast.
- `CastableVideoElement.castAvailable`: `true` when the Cast SDK is available.

### Events

- `entercast`
- `leavecast`
- `castchange`
- `castchange`: fires when cast status changes. e.g. cast device detected.
- `entercast`: fires when starting casting.
- `leavecast`: fires when stopping casting.

e.g. `video.addEventListener('entercast', () => {})`

### Attributes

- `stream-type`: add `<video "stream-type="live">` for live streams.
- `cast-src`: if Chromecast requires a different source than the one loaded.
- `cast-src`: if Chromecast requires a different source than the one loaded.
For example this would be needed if video src is a blob when using MSE.
- `cast-stream-type`: add `<video cast-stream-type="live">` for live streams.
- `cast-content-type`: required if Chromecast can't derive the content type from the source.

1 comment on commit c02a6ec

@vercel
Copy link

@vercel vercel bot commented on c02a6ec May 27, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

castable-video – ./

castable-video-git-main-mux.vercel.app
castable-video.vercel.app
castable-video-mux.vercel.app

Please sign in to comment.