@mux/mux-player
Advanced tools
Comparing version 0.1.0-canary.10-3639da0 to 0.1.0-canary.10-3e02bf0
@@ -175,4 +175,7 @@ import '@mux/playback-core'; | ||
storyboardToken: string | undefined; | ||
addTextTrack(kind: TextTrackKind, label: string, lang?: string, id?: string): TextTrack | undefined; | ||
removeTextTrack(track: TextTrack): void; | ||
readonly textTracks: TextTrackList | undefined; | ||
} | ||
export declare function getVideoAttribute(el: MuxPlayerElement, name: string): string | null; | ||
export default MuxPlayerElement; |
@@ -194,4 +194,7 @@ import '@mux/playback-core'; | ||
set storyboardToken(val: string | undefined); | ||
addTextTrack(kind: TextTrackKind, label: string, lang?: string, id?: string): TextTrack | undefined; | ||
removeTextTrack(track: TextTrack): void; | ||
get textTracks(): TextTrackList | undefined; | ||
} | ||
export declare function getVideoAttribute(el: MuxPlayerElement, name: string): string | null; | ||
export default MuxPlayerElement; |
{ | ||
"name": "@mux/mux-player", | ||
"version": "0.1.0-canary.10-3639da0", | ||
"version": "0.1.0-canary.10-3e02bf0", | ||
"description": "An open source Mux player web component that Just Works™", | ||
@@ -5,0 +5,0 @@ "main": "./dist/index.cjs.js", |
@@ -169,2 +169,3 @@ <p align="center"> | ||
| `beacon-collection-domain` | `string` (domain name) | Assigns a custom domain to be used for Mux Data collection. | N/A | | ||
| `custom-domain` | `string` (domain name) | Assigns a custom domain to be used for Mux Video. | N/A | | ||
@@ -203,2 +204,3 @@ ### Methods | ||
| `volume` | Is a double indicating the audio volume, from 0.0 (silent) to 1.0 (loudest). | `1` | | ||
| `customDomain` | Is a `String` that assigns a custom domain to be used for Mux Video. | `undefined` | | ||
@@ -205,0 +207,0 @@ ### Events |
@@ -6,3 +6,3 @@ // import playback-core here to make sure that the polyfill is loaded | ||
import MuxVideoElement, { MediaError } from '@mux/mux-video'; | ||
import { Metadata, StreamTypes } from '@mux/playback-core'; | ||
import { Metadata, StreamTypes, addTextTrack, removeTextTrack } from '@mux/playback-core'; | ||
import VideoApiElement, { initVideoApi } from './video-api'; | ||
@@ -916,2 +916,18 @@ import { getPlayerVersion, isInLiveWindow, seekToLive, toPropName } from './helpers'; | ||
} | ||
addTextTrack(kind: TextTrackKind, label: string, lang?: string, id?: string) { | ||
const mediaEl = this.media?.nativeEl; | ||
if (!mediaEl) return; | ||
return addTextTrack(mediaEl, kind, label, lang, id); | ||
} | ||
removeTextTrack(track: TextTrack) { | ||
const mediaEl = this.media?.nativeEl; | ||
if (!mediaEl) return; | ||
return removeTextTrack(mediaEl, track); | ||
} | ||
get textTracks() { | ||
return this.media?.textTracks; | ||
} | ||
} | ||
@@ -918,0 +934,0 @@ |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1711796
13996
234