@vonage/vivid-react
Version:
Vivid wrapped for easy React usage & IDE autocomplete support & typescript typings
396 lines (391 loc) • 8.08 kB
JavaScript
/*
* DO NOT EDIT THIS FILE. IT IS GENERATED
*/
/*
Code in this file were generated using following JSON:
{
"kind": "class",
"description": "",
"name": "AudioPlayer",
"members": [
{
"kind": "field",
"name": "playButtonAriaLabel",
"type": {
"text": "| string\n\t\t| null"
},
"default": "null"
},
{
"kind": "field",
"name": "pauseButtonAriaLabel",
"type": {
"text": "| string\n\t\t| null"
},
"default": "null"
},
{
"kind": "field",
"name": "sliderAriaLabel",
"type": {
"text": "string | null"
},
"default": "null"
},
{
"kind": "field",
"name": "skipForwardButtonAriaLabel",
"type": {
"text": "| string\n\t\t| null"
},
"default": "null"
},
{
"kind": "field",
"name": "skipBackwardButtonAriaLabel",
"type": {
"text": "| string\n\t\t| null"
},
"default": "null"
},
{
"kind": "field",
"name": "connotation",
"type": {
"text": "AudioPlayerConnotation | undefined"
},
"description": "The connotation the audio-player should have.",
"privacy": "public"
},
{
"kind": "field",
"name": "src",
"type": {
"text": "string | undefined"
},
"description": "Indicates the audio-player's src.",
"privacy": "public"
},
{
"kind": "method",
"name": "srcChanged"
},
{
"kind": "field",
"name": "playbackRate"
},
{
"kind": "field",
"name": "disabled",
"type": {
"text": "boolean"
},
"default": "false",
"description": "Indicates whether audio player is disabled.",
"privacy": "public"
},
{
"kind": "field",
"name": "notime",
"type": {
"text": "boolean"
},
"default": "false",
"privacy": "public",
"description": ""
},
{
"kind": "field",
"name": "skipBy",
"type": {
"text": "AudioPlayerMediaSkipBy | undefined"
},
"description": "Allows the audio to skip back or forward",
"privacy": "public"
},
{
"kind": "field",
"name": "playbackRates",
"type": {
"text": "string | null"
},
"default": "null",
"description": "Sets the available playback rates. When an empty string, no choices will be available",
"privacy": "public"
},
{
"kind": "field",
"name": "paused",
"type": {
"text": "boolean"
}
},
{
"kind": "field",
"name": "#audioBuffer",
"privacy": "private",
"type": {
"text": "AudioBuffer | undefined"
}
},
{
"kind": "field",
"name": "#fetchAbortController",
"privacy": "private",
"type": {
"text": "AbortController | undefined"
}
},
{
"kind": "method",
"name": "#fetchAndCacheAudioBuffer",
"async": true
},
{
"kind": "field",
"name": "duration"
},
{
"kind": "field",
"name": "currentTime"
},
{
"kind": "field",
"name": "#sliderEl",
"privacy": "private",
"type": {
"text": "Slider | null"
},
"readonly": true
},
{
"kind": "field",
"name": "#playerEl",
"privacy": "private",
"default": "new Audio()"
},
{
"kind": "field",
"name": "#isProgrammaticSliderUpdate",
"privacy": "private",
"type": {
"text": "boolean"
},
"default": "false"
},
{
"kind": "field",
"name": "durationFallback",
"type": {
"text": "boolean"
},
"default": "false",
"description": "Enables fallback logic to fetch and decode audio buffer for duration when metadata is missing.",
"privacy": "public"
},
{
"kind": "method",
"name": "play"
},
{
"kind": "method",
"name": "pause"
},
{
"kind": "method",
"name": "#setSliderInteractionListeners",
"parameters": [
{
"name": "add",
"default": "true"
}
]
},
{
"kind": "field",
"name": "#pausedChanged",
"privacy": "private"
},
{
"kind": "field",
"name": "#updateProgress",
"privacy": "private"
},
{
"kind": "field",
"name": "#updateTotalTime",
"privacy": "private"
},
{
"kind": "field",
"name": "#dragInterval",
"privacy": "private",
"type": {
"text": "number | undefined"
}
},
{
"kind": "field",
"name": "#updateCurrentTimeOnSliderChange",
"privacy": "private"
},
{
"kind": "field",
"name": "#setPausedState",
"privacy": "private"
},
{
"kind": "field",
"name": "VIVID_VERSION",
"static": true,
"default": "__PACKAGE_VERSION__",
"description": "The current version of the Vivid library, which is useful for debugging.\nIt can be accessed from any Vivid element via `<el>.constructor.VIVID_VERSION`.",
"type": {
"text": "string"
},
"inheritedFrom": {
"name": "VividElement",
"module": "src/shared/foundation/vivid-element/vivid-element.ts"
}
},
{
"kind": "field",
"name": "componentName",
"type": {
"text": "string"
},
"static": true,
"description": "Core component name, without prefix",
"inheritedFrom": {
"name": "VividElement",
"module": "src/shared/foundation/vivid-element/vivid-element.ts"
}
}
],
"attributes": [
{
"name": "play-button-aria-label",
"type": {
"text": "| string\n\t\t| null"
},
"default": "null",
"fieldName": "playButtonAriaLabel"
},
{
"name": "pause-button-aria-label",
"type": {
"text": "| string\n\t\t| null"
},
"default": "null",
"fieldName": "pauseButtonAriaLabel"
},
{
"name": "slider-aria-label",
"type": {
"text": "string | null"
},
"default": "null",
"fieldName": "sliderAriaLabel"
},
{
"name": "skip-forward-aria-label",
"type": {
"text": "| string\n\t\t| null"
},
"default": "null",
"fieldName": "skipForwardButtonAriaLabel"
},
{
"name": "skip-backward-aria-label",
"type": {
"text": "| string\n\t\t| null"
},
"default": "null",
"fieldName": "skipBackwardButtonAriaLabel"
},
{
"name": "connotation",
"type": {
"text": "AudioPlayerConnotation | undefined"
},
"description": "The connotation the audio-player should have.",
"fieldName": "connotation"
},
{
"name": "src",
"type": {
"text": "string | undefined"
},
"description": "Indicates the audio-player's src.",
"fieldName": "src"
},
{
"name": "disabled",
"type": {
"text": "boolean"
},
"default": "false",
"description": "Indicates whether audio player is disabled.",
"fieldName": "disabled"
},
{
"name": "notime",
"type": {
"text": "boolean"
},
"default": "false",
"fieldName": "notime"
},
{
"name": "skip-by",
"type": {
"text": "AudioPlayerMediaSkipBy | undefined"
},
"description": "Allows the audio to skip back or forward",
"fieldName": "skipBy"
},
{
"name": "playback-rates",
"type": {
"text": "string | null"
},
"default": "null",
"description": "Sets the available playback rates. When an empty string, no choices will be available",
"fieldName": "playbackRates"
},
{
"name": "duration-fallback",
"type": {
"text": "boolean"
},
"default": "false",
"description": "Enables fallback logic to fetch and decode audio buffer for duration when metadata is missing.",
"fieldName": "durationFallback"
}
],
"mixins": [
{
"name": "Localized",
"module": "/src/shared/patterns"
}
],
"superclass": {
"name": "VividElement",
"module": "/src/shared/foundation/vivid-element/vivid-element"
},
"vividComponent": {
"public": true,
"name": "audio-player"
}
}
*/
import wrapper from '@vonage/vivid-react-wrapper'
import { registerAudioPlayer } from '@vonage/vivid'
registerAudioPlayer('vvd3')
const VwcAudioPlayer = wrapper(`vvd3-audio-player`, {
events: [],
attributes: [],
properties: ['playButtonAriaLabel', 'pauseButtonAriaLabel', 'sliderAriaLabel', 'skipForwardButtonAriaLabel', 'skipBackwardButtonAriaLabel', 'connotation', 'src', 'playbackRate', 'disabled', 'notime', 'skipBy', 'playbackRates', 'paused', 'duration', 'currentTime', 'durationFallback', 'VIVID_VERSION', 'componentName']
})
VwcAudioPlayer.displayName = 'VwcAudioPlayer'
export default VwcAudioPlayer