@aidenlx/player
Version:
Headless web components that make integrating media on the a web a breeze.
1,472 lines (1,471 loc) • 819 kB
JSON
{
"components": [
{
"source": {
"dirPath": "media/controller",
"filePath": "media/controller/MediaControllerElement.ts"
},
"documentation": "The media controller acts as a message bus between the media provider and all other\ncomponents, such as UI components and plugins. The main responsibilities are:\n\n- Provide the media context that is used to pass media state down to components (this\ncontext is injected into and managed by the media provider).\n\n- Listen for media request events and fulfill them by calling the appropriate props/methods on\nthe current media provider.\n\n💡 The base `MediaPlayer` acts as both a media controller and provider.",
"className": "MediaControllerElement",
"props": [
{
"name": "styles",
"typeText": "unknown",
"static": true,
"typeInfo": {
"original": "CSSResultGroup",
"resolved": "(CSSResultOrNative | CSSResultArray)[] | CSSResult | CSSStyleSheet"
},
"documentation": "",
"docTags": [],
"readonly": true,
"internal": false,
"deprecated": false,
"required": false,
"optional": false,
"defaultValue": "",
"enum": false
}
],
"methods": [
{
"name": "exitFullscreen",
"static": false,
"typeInfo": {
"signatureText": "() => Promise<void>",
"returnText": "Promise<void>"
},
"parameters": [],
"docTags": [],
"internal": false,
"deprecated": false,
"documentation": ""
}
],
"events": [],
"tagName": "vds-media-controller",
"docTags": [
{
"name": "tagname",
"text": "vds-media-controller"
},
{
"name": "slot",
"text": "- Used to pass in components that use/manage media state."
},
{
"name": "example",
"text": "```html\n<vds-media-controller>\n <vds-video-player>\n <!-- UI components here. -->\n </vds-video-player>\n\n <!-- Other components that use/manage media state here. -->\n</vds-media-controller>\n```"
}
],
"cssProps": [],
"cssParts": [],
"slots": [
{
"name": "DEFAULT",
"default": true,
"description": "Used to pass in components that use/manage media state."
}
],
"dependencies": [],
"dependents": []
},
{
"source": {
"dirPath": "media/manage",
"filePath": "media/manage/MediaSyncElement.ts"
},
"documentation": "This element is responsible for synchronizing elements of the type `MediaProviderElement`.\n\nSynchronization includes:\n\n- Single media playback (eg: user plays a video while another is already playing, so we pause\nthe newly inactive player).\n\n- Shared media volume (eg: user sets desired volume to 50% on one player, and they expect it to\nbe consistent across all players).\n\n- Saving media volume to local storage (eg: user sets desired to volume 50%, they leave\nthe site, and when they come back they expect it to be 50% without any interaction).",
"className": "MediaSyncElement",
"props": [
{
"attribute": "single-playback",
"reflect": false,
"name": "singlePlayback",
"typeText": "boolean",
"static": false,
"typeInfo": {
"original": "boolean",
"resolved": "boolean"
},
"documentation": "Whether only one is player should be playing at a time.",
"docTags": [
{
"name": "default",
"text": "false"
}
],
"readonly": false,
"internal": false,
"deprecated": false,
"required": false,
"optional": false,
"defaultValue": "false",
"enum": false
},
{
"attribute": "shared-volume",
"reflect": false,
"name": "sharedVolume",
"typeText": "boolean",
"static": false,
"typeInfo": {
"original": "boolean",
"resolved": "boolean"
},
"documentation": "Whether media volume should be in-sync across all media players.",
"docTags": [
{
"name": "default",
"text": "false"
}
],
"readonly": false,
"internal": false,
"deprecated": false,
"required": false,
"optional": false,
"defaultValue": "false",
"enum": false
},
{
"attribute": "volume-storage-key",
"reflect": false,
"name": "volumeStorageKey",
"typeText": "string",
"static": false,
"typeInfo": {
"original": "string",
"resolved": "string | undefined"
},
"documentation": "If a value is provided, volume will be saved to local storage to the given key as it's\nupdated. In addition, when a media provider connects to the manager, it's volume will be\nset to the saved volume level. If no value is provided, nothing is saved or retrieved.\n\nNote that this includes both the volume and muted state.",
"docTags": [
{
"name": "default",
"text": "undefined"
}
],
"readonly": false,
"internal": false,
"deprecated": false,
"required": false,
"optional": true,
"defaultValue": "undefined",
"enum": false
},
{
"name": "mediaProvider",
"typeText": "unknown",
"static": false,
"typeInfo": {
"original": "MediaProviderElement | undefined",
"resolved": "MediaProviderElement | undefined"
},
"documentation": "",
"docTags": [],
"readonly": true,
"internal": false,
"deprecated": false,
"required": false,
"optional": false,
"defaultValue": "",
"enum": false
}
],
"methods": [],
"events": [
{
"name": "vds-media-volume-sync",
"docTags": [
{
"name": "bubbles"
},
{
"name": "composed"
}
],
"bubbles": true,
"composed": true,
"internal": false,
"deprecated": false,
"documentation": "Fired when media volume has been synchronized.",
"typeInfo": {
"original": "MediaVolumeSyncEvent",
"resolved": "VdsEvent<MediaVolumeChange>"
}
}
],
"tagName": "vds-media-sync",
"docTags": [
{
"name": "tagname",
"text": "vds-media-sync"
},
{
"name": "slot",
"text": "- Used to pass in content, typically a media player/provider."
},
{
"name": "events",
"text": "/Users/aidenlx/repo/obsidian/player/packages/player/src/media/manage/media-sync.events.ts"
},
{
"name": "example",
"text": "```html\n<vds-media-sync\n single-playback\n shared-volume\n volume-storage-key=\"@vidstack/volume\"\n>\n <!-- ... -->\n</vds-media-sync>\n```"
}
],
"cssProps": [],
"cssParts": [],
"slots": [
{
"name": "DEFAULT",
"default": true,
"description": "Used to pass in content, typically a media player/provider."
}
],
"dependencies": [],
"dependents": []
},
{
"source": {
"dirPath": "media/manage",
"filePath": "media/manage/MediaVisibilityElement.ts"
},
"documentation": "This element is responsible for managing a `MediaProviderElement` as viewport or page\nvisibility changes occur.\n\nManagement includes:\n\n- Playback or volume changes when page visibility changes (eg: user changes tab or device\nsleeps).\n\n- Playback or volume changes when viewport visibility changes (eg: user scrolls video in and\nout of view).",
"className": "MediaVisibilityElement",
"props": [
{
"unionTypesText": [
"play",
"unmute"
],
"attribute": "enter-viewport",
"reflect": false,
"name": "enterViewport",
"typeText": "string",
"static": false,
"typeInfo": {
"original": "EnterVisibilityMediaAction",
"resolved": "\"play\" | \"unmute\" | undefined"
},
"documentation": "The action to perform on the media provider when it enters the viewport.",
"docTags": [
{
"name": "default",
"text": "undefined"
}
],
"readonly": false,
"internal": false,
"deprecated": false,
"required": false,
"optional": true,
"defaultValue": "undefined",
"enum": false
},
{
"unionTypesText": [
"pause",
"mute"
],
"attribute": "exit-viewport",
"reflect": false,
"name": "exitViewport",
"typeText": "string",
"static": false,
"typeInfo": {
"original": "ExitVisibilityMediaAction",
"resolved": "\"mute\" | \"pause\" | undefined"
},
"documentation": "The action to perform on the media provider when it exits the viewport.",
"docTags": [
{
"name": "default",
"text": "undefined"
}
],
"readonly": false,
"internal": false,
"deprecated": false,
"required": false,
"optional": true,
"defaultValue": "undefined",
"enum": false
},
{
"attribute": "viewport-enter-delay",
"reflect": false,
"name": "viewportEnterDelay",
"typeText": "number",
"static": false,
"typeInfo": {
"original": "number",
"resolved": "number"
},
"documentation": "The amount of time in milliseconds to delay viewport enter actions.",
"docTags": [
{
"name": "default",
"text": "0"
}
],
"readonly": false,
"internal": false,
"deprecated": false,
"required": false,
"optional": false,
"defaultValue": "0",
"enum": false
},
{
"unionTypesText": [
"play",
"unmute"
],
"attribute": "enter-page",
"reflect": false,
"name": "enterPage",
"typeText": "string",
"static": false,
"typeInfo": {
"original": "EnterVisibilityMediaAction",
"resolved": "\"play\" | \"unmute\" | undefined"
},
"documentation": "The action to perform on the media provider when the page becomes visible.",
"docTags": [
{
"name": "default",
"text": "undefined"
}
],
"readonly": false,
"internal": false,
"deprecated": false,
"required": false,
"optional": true,
"defaultValue": "undefined",
"enum": false
},
{
"unionTypesText": [
"pause",
"mute"
],
"attribute": "exit-page",
"reflect": false,
"name": "exitPage",
"typeText": "string",
"static": false,
"typeInfo": {
"original": "ExitVisibilityMediaAction",
"resolved": "\"mute\" | \"pause\" | undefined"
},
"documentation": "The action to perform on the media provider when the page becomes hidden.",
"docTags": [
{
"name": "default",
"text": "undefined"
}
],
"readonly": false,
"internal": false,
"deprecated": false,
"required": false,
"optional": true,
"defaultValue": "undefined",
"enum": false
},
{
"unionTypesText": [
"state",
"visibility"
],
"attribute": "page-change-type",
"reflect": false,
"name": "pageChangeType",
"typeText": "string",
"static": false,
"typeInfo": {
"original": "'state' | 'visibility'",
"resolved": "\"state\" | \"visibility\""
},
"documentation": "The type of page state to use when determining visibility.\n\n- **state:** Refers to the page lifecycle state. This is typically what you want.\n- **visibility:** Visible here means the page content may be at least partially visible. In\npractice, this means that the page is the foreground tab of a non-minimized window.\n\n💡 Need help making a decision?\n\n- Use `state` when you want completely visible / not visible.\n- Use `visibility` when you want partially visible / not visible.",
"docTags": [
{
"name": "default",
"text": "'state'"
}
],
"readonly": false,
"internal": false,
"deprecated": false,
"required": false,
"optional": false,
"defaultValue": "'state'",
"enum": false
},
{
"attribute": "page-enter-delay",
"reflect": false,
"name": "pageEnterDelay",
"typeText": "number",
"static": false,
"typeInfo": {
"original": "number",
"resolved": "number"
},
"documentation": "The amount of time in milliseconds to delay page enter actions.",
"docTags": [
{
"name": "default",
"text": "0"
}
],
"readonly": false,
"internal": false,
"deprecated": false,
"required": false,
"optional": false,
"defaultValue": "0",
"enum": false
},
{
"attribute": "intersection-root",
"reflect": false,
"name": "intersectionRoot",
"typeText": "string",
"static": false,
"typeInfo": {
"original": "string",
"resolved": "string | undefined"
},
"documentation": "A DOM query selector for the element that is used as the viewport for checking visibility\nof the media player. Must be a ancestor of the media player. Defaults to the browser viewport\nif not specified.",
"docTags": [
{
"name": "default",
"text": "undefined"
}
],
"readonly": false,
"internal": false,
"deprecated": false,
"required": false,
"optional": true,
"defaultValue": "undefined",
"enum": false
},
{
"attribute": "intersection-threshold",
"reflect": false,
"name": "intersectionThreshold",
"typeText": "number",
"static": false,
"typeInfo": {
"original": "number",
"resolved": "number"
},
"documentation": "A number which indicates at what percentage of the media player's visibility the observer's\n`onEnter` and `onExit` actions should be triggered.",
"docTags": [
{
"name": "default",
"text": "1"
}
],
"readonly": false,
"internal": false,
"deprecated": false,
"required": false,
"optional": false,
"defaultValue": "1",
"enum": false
},
{
"name": "isIntersecting",
"typeText": "boolean",
"static": false,
"typeInfo": {
"original": "boolean",
"resolved": "boolean"
},
"documentation": "",
"docTags": [],
"readonly": true,
"internal": false,
"deprecated": false,
"required": false,
"optional": false,
"defaultValue": "",
"enum": false
},
{
"name": "mediaProvider",
"typeText": "unknown",
"static": false,
"typeInfo": {
"original": "MediaProviderElement | undefined",
"resolved": "MediaProviderElement | undefined"
},
"documentation": "",
"docTags": [],
"readonly": true,
"internal": false,
"deprecated": false,
"required": false,
"optional": false,
"defaultValue": "",
"enum": false
}
],
"methods": [],
"events": [
{
"name": "vds-media-visibility-change",
"docTags": [
{
"name": "bubbles"
},
{
"name": "composed"
}
],
"bubbles": true,
"composed": true,
"internal": false,
"deprecated": false,
"documentation": "Fired when media visibility changes based on the viewport position or page visibility state.",
"typeInfo": {
"original": "MediaVisibilityChangeEvent",
"resolved": "VdsEvent<MediaVisibilityChange>"
}
}
],
"tagName": "vds-media-visibility",
"docTags": [
{
"name": "tagname",
"text": "vds-media-visibility"
},
{
"name": "slot",
"text": "- Used to pass in content, typically a media player/provider."
},
{
"name": "events",
"text": "/Users/aidenlx/repo/obsidian/player/packages/player/src/media/manage/media-visibility.events.ts"
},
{
"name": "example",
"text": "```html\n<vds-media-visibility\n enter-viewport=\"play\"\n exit-viewport=\"pause\"\n enter-page=\"unmute\"\n exit-page=\"mute\"\n>\n <!-- ... -->\n</vds-media-visibility>\n```"
}
],
"cssProps": [],
"cssParts": [],
"slots": [
{
"name": "DEFAULT",
"default": true,
"description": "Used to pass in content, typically a media player/provider."
}
],
"dependencies": [],
"dependents": []
},
{
"source": {
"dirPath": "media/ui",
"filePath": "media/ui/MediaUiElement.ts"
},
"documentation": "This is a general styling container which holds your UI elements. Media attributes and\nCSS properties are exposed on this element to help you style your UI elements.\n\nExample media attributes include: `media-paused`, `media-can-play`, and `media-waiting`.\n\nExample media CSS properties include: `--media-seekable-amount`, `--media-buffered-amount`,\nand `--media-duration`.\n\nThis element also handles hiding the UI depending on whether native UI can't be hidden\n(*cough* iOS). This is simply to avoid double controls (native + custom). The `hidden` attribute\nwill be applied to prevent it from happening.",
"className": "MediaUiElement",
"props": [
{
"name": "styles",
"typeText": "unknown",
"static": true,
"typeInfo": {
"original": "CSSResultGroup",
"resolved": "(CSSResultOrNative | CSSResultArray)[] | CSSResult | CSSStyleSheet"
},
"documentation": "",
"docTags": [],
"readonly": true,
"internal": false,
"deprecated": false,
"required": false,
"optional": false,
"defaultValue": "",
"enum": false
},
{
"name": "parts",
"typeText": "unknown",
"static": true,
"typeInfo": {
"original": "string[]",
"resolved": "string[]"
},
"documentation": "",
"docTags": [],
"readonly": true,
"internal": false,
"deprecated": false,
"required": false,
"optional": false,
"defaultValue": "",
"enum": false
}
],
"methods": [],
"events": [],
"tagName": "vds-media-ui",
"docTags": [
{
"name": "tagname",
"text": "vds-media-ui"
},
{
"name": "slot",
"text": "- Used to pass in UI components."
},
{
"name": "example",
"text": "```html\n<vds-media-ui>\n <!-- ... -->\n</vds-media-ui>\n```"
},
{
"name": "example",
"text": "```css\nvds-media-ui {\n opacity: 1;\n transition: opacity 0.15s ease-out;\n}\n\nvds-media-ui[media-idle],\nvds-media-ui:not([media-can-play]) {\n opacity: 0;\n}\n```"
}
],
"cssProps": [],
"cssParts": [],
"slots": [
{
"name": "DEFAULT",
"default": true,
"description": "Used to pass in UI components."
}
],
"dependencies": [],
"dependents": []
},
{
"source": {
"dirPath": "players/audio",
"filePath": "players/audio/AudioPlayerElement.ts"
},
"documentation": "Used to embed sound content into documents via the native `<audio>` element. It may contain\none or more audio sources, represented using the `src` attribute or the `<source>` element: the\nbrowser will choose the most suitable one.\n\n💡 This element contains the exact same interface as the `<audio>` element. It redispatches\nall the native events if needed, but prefer the `vds-*` variants (eg: `vds-play`) as they\niron out any browser issues.",
"className": "AudioPlayerElement",
"props": [
{
"name": "styles",
"typeText": "unknown",
"static": true,
"typeInfo": {
"original": "CSSResultGroup",
"resolved": "(CSSResultOrNative | CSSResultArray)[] | CSSResult | CSSStyleSheet"
},
"documentation": "",
"docTags": [],
"readonly": true,
"internal": false,
"deprecated": false,
"required": false,
"optional": false,
"defaultValue": "",
"enum": false
},
{
"unionTypesText": [
"nodownload",
"nofullscreen",
"noremoteplayback",
"nodownload nofullscreen",
"nodownload noremoteplayback",
"nofullscreen noremoteplayback",
"nodownload nofullscreen noremoteplayback"
],
"attribute": "controls-list",
"reflect": true,
"name": "controlsList",
"typeText": "string",
"static": false,
"typeInfo": {
"original": "MediaControlsList | undefined",
"resolved": "\"nodownload nofullscreen noremoteplayback\" | \"nodownload nofullscreen\" | \"nodownload noremoteplayback\" | \"nodownload\" | \"nofullscreen noremoteplayback\" | \"nofullscreen\" | \"noremoteplayback\" | undefined"
},
"documentation": "Determines what controls to show on the media element whenever the browser shows its own set\nof controls (e.g. when the controls attribute is specified).",
"docTags": [
{
"name": "example",
"text": "'nodownload nofullscreen noremoteplayback'"
},
{
"name": "link",
"text": "https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/controlsList"
}
],
"readonly": false,
"internal": false,
"deprecated": false,
"required": false,
"optional": false,
"defaultValue": "",
"enum": false
},
{
"unionTypesText": [
"anonymous",
"use-credentials"
],
"attribute": "cross-origin",
"reflect": true,
"name": "crossOrigin",
"typeText": "string",
"static": false,
"typeInfo": {
"original": "MediaCrossOriginOption | undefined",
"resolved": "\"anonymous\" | \"use-credentials\" | undefined"
},
"documentation": "Whether to use CORS to fetch the related image.",
"docTags": [
{
"name": "link",
"text": "https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/crossOrigin"
}
],
"readonly": false,
"internal": false,
"deprecated": false,
"required": false,
"optional": false,
"defaultValue": "",
"enum": false
},
{
"attribute": "default-muted",
"reflect": false,
"name": "defaultMuted",
"typeText": "boolean",
"static": false,
"typeInfo": {
"original": "boolean | undefined",
"resolved": "boolean | undefined"
},
"documentation": "Reflects the muted attribute, which indicates whether the audio output should be muted by\ndefault. This property has no dynamic effect. To mute and unmute the audio output, use\nthe `muted` property.",
"docTags": [
{
"name": "link",
"text": "https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/defaultMuted"
}
],
"readonly": false,
"internal": false,
"deprecated": false,
"required": false,
"optional": false,
"defaultValue": "",
"enum": false
},
{
"attribute": "default-playback-rate",
"reflect": false,
"name": "defaultPlaybackRate",
"typeText": "number",
"static": false,
"typeInfo": {
"original": "number | undefined",
"resolved": "number | undefined"
},
"documentation": "A `double` indicating the default playback rate for the media.",
"docTags": [
{
"name": "link",
"text": "https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/defaultPlaybackRate"
}
],
"readonly": false,
"internal": false,
"deprecated": false,
"required": false,
"optional": false,
"defaultValue": "",
"enum": false
},
{
"attribute": "disable-remote-playback",
"reflect": false,
"name": "disableRemotePlayback",
"typeText": "boolean",
"static": false,
"typeInfo": {
"original": "boolean | undefined",
"resolved": "boolean | undefined"
},
"documentation": "Whether to disable the capability of remote playback in devices that are\nattached using wired (HDMI, DVI, etc.) and wireless technologies (Miracast, Chromecast,\nDLNA, AirPlay, etc).",
"docTags": [
{
"name": "link",
"text": "https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/disableRemotePlayback"
},
{
"name": "see",
"text": "://www.w3.org/TR/remote-playback/#the-disableremoteplayback-attribute"
}
],
"readonly": false,
"internal": false,
"deprecated": false,
"required": false,
"optional": false,
"defaultValue": "",
"enum": false
},
{
"unionTypesText": [
"none",
"metadata",
"auto"
],
"attribute": "preload",
"reflect": true,
"name": "preload",
"typeText": "string",
"static": false,
"typeInfo": {
"original": "MediaPreloadOption | undefined",
"resolved": "\"auto\" | \"metadata\" | \"none\" | undefined"
},
"documentation": "Provides a hint to the browser about what the author thinks will lead to the best user\nexperience with regards to what content is loaded before the video is played.",
"docTags": [
{
"name": "link",
"text": "https://developer.mozilla.org/en-US/docs/Web/HTML/Element/video#attr-preload"
}
],
"readonly": false,
"internal": false,
"deprecated": false,
"required": false,
"optional": false,
"defaultValue": "",
"enum": false
},
{
"attribute": "width",
"reflect": true,
"name": "width",
"typeText": "number",
"static": false,
"typeInfo": {
"original": "number | undefined",
"resolved": "number | undefined"
},
"documentation": "The width of the media player.",
"docTags": [],
"readonly": false,
"internal": false,
"deprecated": false,
"required": false,
"optional": false,
"defaultValue": "",
"enum": false
},
{
"attribute": "height",
"reflect": true,
"name": "height",
"typeText": "number",
"static": false,
"typeInfo": {
"original": "number | undefined",
"resolved": "number | undefined"
},
"documentation": "The height of the media player.",
"docTags": [],
"readonly": false,
"internal": false,
"deprecated": false,
"required": false,
"optional": false,
"defaultValue": "",
"enum": false
},
{
"name": "src",
"typeText": "string",
"static": false,
"typeInfo": {
"original": "string",
"resolved": "string"
},
"documentation": "The URL of a media resource to use.",
"docTags": [
{
"name": "link",
"text": "https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/src"
}
],
"readonly": false,
"attribute": "src",
"internal": false,
"deprecated": false,
"required": false,
"optional": false,
"defaultValue": "",
"enum": false
},
{
"name": "mediaElement",
"typeText": "unknown",
"static": false,
"typeInfo": {
"original": "HTMLMediaElement | undefined",
"resolved": "HTMLMediaElement | undefined"
},
"documentation": "",
"docTags": [],
"readonly": true,
"internal": false,
"deprecated": false,
"required": false,
"optional": false,
"defaultValue": "",
"enum": false
},
{
"name": "srcObject",
"typeText": "unknown",
"static": false,
"typeInfo": {
"original": "MediaSrcObject | undefined",
"resolved": "Blob | File | MediaSource | MediaStream | undefined"
},
"documentation": "Sets or returns the object which serves as the source of the media associated with the\n`HTMLMediaElement`.",
"docTags": [
{
"name": "default",
"text": "undefined"
},
{
"name": "link",
"text": "https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/srcObject"
}
],
"readonly": false,
"attribute": "src-object",
"internal": false,
"deprecated": false,
"required": false,
"optional": false,
"defaultValue": "undefined",
"enum": false
},
{
"name": "readyState",
"typeText": "number",
"static": false,
"typeInfo": {
"original": "number",
"resolved": "number"
},
"documentation": "Indicates the readiness state of the media.",
"docTags": [
{
"name": "default",
"text": "ReadyState.HaveNothing"
},
{
"name": "link",
"text": "https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/readyState"
}
],
"readonly": true,
"internal": false,
"deprecated": false,
"required": false,
"optional": false,
"defaultValue": "ReadyState.HaveNothing",
"enum": false
},
{
"name": "networkState",
"typeText": "number",
"static": false,
"typeInfo": {
"original": "number",
"resolved": "number"
},
"documentation": "Indicates the current state of the fetching of media over the network.",
"docTags": [
{
"name": "default",
"text": "NetworkState.Empty"
}
],
"readonly": true,
"internal": false,
"deprecated": false,
"required": false,
"optional": false,
"defaultValue": "NetworkState.Empty",
"enum": false
},
{
"name": "engine",
"typeText": "unknown",
"static": false,
"typeInfo": {
"original": "HTMLMediaElement | undefined",
"resolved": "HTMLMediaElement | undefined"
},
"documentation": "The underlying engine that is actually responsible for rendering/loading media. Some examples\nare:\n\n- The `VideoElement` engine is `HTMLVideoElement`.\n- The `HlsElement` engine is the `hls.js` instance.\n- The `YoutubeElement` engine is `HTMLIFrameElement`.\n\nRefer to the respective provider documentation to find out which engine is powering it.",
"docTags": [
{
"name": "abstract"
}
],
"readonly": true,
"internal": false,
"deprecated": false,
"required": false,
"optional": false,
"defaultValue": "",
"enum": false
},
{
"name": "buffered",
"typeText": "unknown",
"static": false,
"typeInfo": {
"original": "TimeRanges",
"resolved": "TimeRanges"
},
"documentation": "Returns a `TimeRanges` object that indicates the ranges of the media source that the\nbrowser has buffered (if any) at the moment the buffered property is accessed. This is usually\ncontiguous but if the user jumps about while media is buffering, it may contain holes.",
"docTags": [
{
"name": "link",
"text": "https://developer.mozilla.org/en-US/docs/Web/API/TimeRanges"
},
{
"name": "link",
"text": "https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/buffered"
},
{
"name": "default",
"text": "TimeRanges"
}
],
"readonly": true,
"internal": false,
"deprecated": false,
"required": false,
"optional": false,
"defaultValue": {
"name": "default",
"text": "TimeRanges"
},
"enum": false
},
{
"name": "error",
"typeText": "unknown",
"static": false,
"typeInfo": {
"original": "MediaError | undefined",
"resolved": "MediaError | undefined"
},
"documentation": "Returns a `MediaError` object for the most recent error, or `undefined` if there has not been\nan error.",
"docTags": [
{
"name": "default",
"text": "undefined"
},
{
"name": "link",
"text": "https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/error"
}
],
"readonly": true,
"internal": false,
"deprecated": false,
"required": false,
"optional": false,
"defaultValue": "undefined",
"enum": false
},
{
"attribute": "autoplay",
"reflect": true,
"name": "autoplay",
"typeText": "boolean",
"static": false,
"typeInfo": {
"original": "boolean",
"resolved": "boolean"
},
"documentation": "Whether playback should automatically begin as soon as enough media is available to do so\nwithout interruption.\n\nSites which automatically play audio (or videos with an audio track) can be an unpleasant\nexperience for users, so it should be avoided when possible. If you must offer autoplay\nfunctionality, you should make it opt-in (requiring a user to specifically enable it).\n\nHowever, autoplay can be useful when creating media elements whose source will be set at a\nlater time, under user control.",
"docTags": [
{
"name": "default",
"text": "false"
},
{
"name": "link",
"text": "https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/autoplay"
}
],
"readonly": false,
"internal": false,
"deprecated": false,
"required": false,
"optional": false,
"defaultValue": "false",
"enum": false
},
{
"attribute": "controls",
"reflect": true,
"name": "controls",
"typeText": "boolean",
"static": false,
"typeInfo": {
"original": "boolean",
"resolved": "boolean"
},
"documentation": "Indicates whether a user interface should be shown for controlling the resource. Set this to\n`false` when you want to provide your own custom controls, and `true` if you want the current\nprovider to supply its own default controls. Depending on the provider, changing this prop\nmay cause the player to completely reset.",
"docTags": [
{
"name": "default",
"text": "false"
},
{
"name": "link",
"text": "https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/controls"
}
],
"readonly": false,
"internal": false,
"deprecated": false,
"required": false,
"optional": false,
"defaultValue": "false",
"enum": false
},
{
"attribute": "loop",
"reflect": true,
"name": "loop",
"typeText": "boolean",
"static": false,
"typeInfo": {
"original": "boolean",
"resolved": "boolean"
},
"documentation": "Whether media should automatically start playing from the beginning (replay) every time\nit ends.",
"docTags": [
{
"name": "default",
"text": "false"
},
{
"name": "link",
"text": "https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/loop"
}
],
"readonly": false,
"internal": false,
"deprecated": false,
"required": false,
"optional": false,
"defaultValue": "false",
"enum": false
},
{
"attribute": "playsinline",
"reflect": true,
"name": "playsinline",
"typeText": "boolean",
"static": false,
"typeInfo": {
"original": "boolean",
"resolved": "boolean"
},
"documentation": "Whether the video is to be played \"inline\", that is within the element's playback area. Note\nthat setting this to `false` does not imply that the video will always be played in fullscreen.\nDepending on the provider, changing this prop may cause the player to completely reset.",
"docTags": [
{
"name": "default",
"text": "false"
},
{
"name": "link",
"text": "https://developer.mozilla.org/en-US/docs/Web/HTML/Element/video#attr-playsinline"
}
],
"readonly": false,
"internal": false,
"deprecated": false,
"required": false,
"optional": false,
"defaultValue": "false",
"enum": false
},
{
"attribute": "volume",
"reflect": true,
"name": "volume",
"typeText": "number",
"static": false,
"typeInfo": {
"original": "number",
"resolved": "number"
},
"documentation": "An `int` between `0` (silent) and `1` (loudest) indicating the audio volume. Defaults to `1`.",
"docTags": [
{
"name": "default",
"text": "1"
},
{
"name": "link",
"text": "https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/volume"
}
],
"readonly": false,
"internal": false,
"deprecated": false,
"required": false,
"optional": false,
"defaultValue": "1",
"enum": false
},
{
"attribute": "paused",
"reflect": true,
"name": "paused",
"typeText": "boolean",
"static": false,
"typeInfo": {
"original": "boolean",
"resolved": "boolean"
},
"documentation": "Whether playback should be paused. Defaults to `true` if no media has loaded or playback has\nnot started. Setting this to `false` will begin/resume playback.",
"docTags": [
{
"name": "default",
"text": "true"
},
{
"name": "link",
"text": "https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/paused"
}
],
"readonly": false,
"internal": false,
"deprecated": false,
"required": false,
"optional": false,
"defaultValue": "true",
"enum": false
},
{
"attribute": "current-time",
"reflect": false,
"name": "currentTime",
"typeText": "number",
"static": false,
"typeInfo": {
"original": "number",
"resolved": "number"
},
"documentation": "A `double` indicating the current playback time in seconds. Defaults to `0` if the media has\nnot started to play and has not seeked. Setting this value seeks the media to the new\ntime. The value can be set to a minimum of `0` and maximum of the total length of the\nmedia (indicated by the duration prop).",
"docTags": [
{
"name": "default",
"text": "0"
},
{
"name": "link",
"text": "https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/currentTime"
}
],
"readonly": false,
"internal": false,
"deprecated": false,
"required": false,
"optional": false,
"defaultValue": "0",
"enum": false
},
{
"attribute": "muted",
"reflect": true,
"name": "muted",
"typeText": "boolean",
"static": false,
"typeInfo": {
"original": "boolean",
"resolved": "boolean"
},
"documentation": "Whether the audio is muted or not.",
"docTags": [
{
"name": "default",
"text": "false"
},
{
"name": "link",
"text": "https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/muted"
}
],
"readonly": false,
"internal": false,
"deprecated": false,
"required": false,
"optional": false,
"defaultValue": "false",
"enum": false
},
{
"name": "autoplayError",
"typeText": "unknown",
"static": false,
"typeInfo": {
"original": "unknown",
"resolved": "unknown"
},
"documentation": "Returns an `Error` object when autoplay has failed to begin playback. This\ncan be used to determine when to show a recovery UI in the event autoplay fails.",
"docTags": [
{
"name": "default",
"text": "undefined"
}
],
"readonly": true,
"internal": false,
"deprecated": false,
"required": false,
"optional": false,
"defaultValue": "undefined",
"enum": false
},
{
"name": "canPlay",
"typeText": "boolean",
"static": false,
"typeInfo": {
"original": "boolean",
"resolved": "boolean"
},
"documentation": "Whether the user agent can play the media, but estimates that **not enough** data has been\nloaded to play the media up to its end without having to stop for further buffering of\ncontent.",
"docTags": [
{
"name": "default",
"text": "false"
},
{
"name": "link",
"text": "https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/canplay_event"
}
],
"readonly": true,
"internal": false,
"deprecated": false,
"required": false,
"optional": false,
"defaultValue": "false",
"enum": false
},
{
"name": "currentPoster",
"typeText": "string",
"static": false,
"typeInfo": {
"original": "string",
"resolved": "string"
},
"documentation": "The URL of the current poster. Defaults to `''` if no media/poster has been given or\nloaded.",
"docTags": [
{
"name": "default",
"text": "''"
}
],
"readonly": true,
"internal": false,
"deprecated": false,
"required": false,
"optional": false,
"defaultValue": "''",
"enum": false
},
{
"name": "currentSrc",
"typeText": "string",
"static": false,
"typeInfo": {
"original": "string",
"resolved": "string"
},
"documentation": "The absolute URL of the media resource that has been chosen. Defaults to `''` if no\nmedia has been loaded.",
"docTags": [
{
"name": "default",
"text": "''"
},
{
"name": "link",
"text": "https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/currentSrc"
}
],
"readonly": true,
"internal": false,
"deprecated": false,
"required": false,
"optional": false,
"defaultValue": "''",
"enum": false
},
{
"name": "duration",
"typeText": "number",
"static": false,
"typeInfo": {
"original": "number",
"resolved": "number"
},
"documentation": "A `double` indicating the total playback length of the media in seconds. If no media data is\navailable, the returned value is `0`. If the media is of indefinite length (such as\nstreamed live media, a WebRTC call's media, or similar), the value is `+Infinity`.",
"docTags": [
{
"name": "default",
"text": "0"
},
{
"name": "link",
"text": "https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/duration"
}
],
"readonly": true,
"internal": false,
"deprecated": false,
"required": false,
"optional": false,
"defaultValue": "0",
"enum": false
},
{
"name": "ended",
"typeText": "boolean",
"static": false,
"typeInfo": {
"original": "boolean",
"resolved": "boolean"
},
"documentation": "Whether media playback has reached the end. In other words it'll be true\nif `currentTime === duration`.",
"docTags": [
{
"name": "default",
"text": "false"
},
{
"name": "link",
"text": "https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/ended"