427 lines
15 KiB
JSON
427 lines
15 KiB
JSON
{
|
|
"$schema": "../../TcHmiFramework/Schema/ControlDescription.Schema.json",
|
|
"apiVersion": 1,
|
|
"name": "TcHmiAudio",
|
|
"namespace": "TcHmi.Controls.Beckhoff",
|
|
"displayName": "Audio",
|
|
"version": {
|
|
"full": "14.4.1.0",
|
|
"major": 14,
|
|
"minor": 4,
|
|
"build": 1,
|
|
"revision": 0
|
|
},
|
|
"visible": true,
|
|
"themeable": "Standard",
|
|
"base": "TcHmi.Controls.System.TcHmiControl",
|
|
"description": "A simple audio player.",
|
|
"defaultDesignerEvent": "",
|
|
"properties": {
|
|
"containerControl": false,
|
|
"geometry": {
|
|
"width": 300,
|
|
"height": 54
|
|
}
|
|
},
|
|
"icons": [
|
|
{
|
|
"name": "Icons/16x16.png",
|
|
"width": 16,
|
|
"height": 16
|
|
}
|
|
],
|
|
"template": "Template.html",
|
|
"dependencyFiles": [
|
|
{
|
|
"name": "Style.css",
|
|
"type": "Stylesheet",
|
|
"description": ""
|
|
},
|
|
{
|
|
"name": "../dist/TcHmiAudio/TcHmiAudio.esm.js",
|
|
"type": "EsModule",
|
|
"description": "Contains all the main logic as ES module."
|
|
}
|
|
],
|
|
"themes": {},
|
|
"attributes": [
|
|
{
|
|
"name": "data-tchmi-src-list",
|
|
"propertyName": "SrcList",
|
|
"propertySetterName": "setSrcList",
|
|
"propertyGetterName": "getSrcList",
|
|
"displayName": "Src List",
|
|
"visible": true,
|
|
"themeable": "Advanced",
|
|
"displayPriority": 10,
|
|
"type": "tchmi:framework#/definitions/TcHmi.Controls.Beckhoff.TcHmiAudio.AudioSourceList",
|
|
"category": "Common",
|
|
"description": "A List of audio sources. The order of the list corresponds to the order in which the sources are attempted to be loaded.",
|
|
"readOnly": false,
|
|
"bindable": true,
|
|
"defaultBindingMode": "OneWay",
|
|
"heritable": true,
|
|
"allowSymbolExpressionsInObject": true,
|
|
"defaultValue": null,
|
|
"defaultValueInternal": null
|
|
},
|
|
{
|
|
"name": "data-tchmi-volume",
|
|
"propertyName": "Volume",
|
|
"propertySetterName": "setVolume",
|
|
"propertyGetterName": "getVolume",
|
|
"displayName": "Volume",
|
|
"visible": true,
|
|
"themeable": "Advanced",
|
|
"displayPriority": 20,
|
|
"type": "tchmi:framework#/definitions/Fraction",
|
|
"category": "Audio",
|
|
"description": "The volume value between 0 and 1.",
|
|
"readOnly": false,
|
|
"bindable": true,
|
|
"defaultBindingMode": "OneWay",
|
|
"heritable": true,
|
|
"defaultValue": null,
|
|
"defaultValueInternal": 1
|
|
},
|
|
{
|
|
"name": "data-tchmi-mute",
|
|
"propertyName": "Mute",
|
|
"propertySetterName": "setMute",
|
|
"propertyGetterName": "getMute",
|
|
"displayName": "Mute",
|
|
"visible": true,
|
|
"themeable": "Advanced",
|
|
"displayPriority": 20,
|
|
"type": "tchmi:general#/definitions/Boolean",
|
|
"category": "Audio",
|
|
"description": "If set true, the audio will be silenced.",
|
|
"readOnly": false,
|
|
"bindable": true,
|
|
"defaultBindingMode": "OneWay",
|
|
"heritable": true,
|
|
"defaultValue": true,
|
|
"defaultValueInternal": false
|
|
},
|
|
{
|
|
"name": "data-tchmi-playbackrate",
|
|
"propertyName": "Playbackrate",
|
|
"propertySetterName": "setPlaybackrate",
|
|
"propertyGetterName": "getPlaybackrate",
|
|
"displayName": "Playbackrate",
|
|
"visible": true,
|
|
"themeable": "Advanced",
|
|
"displayPriority": 70,
|
|
"type": "tchmi:general#/definitions/Number",
|
|
"category": "Audio",
|
|
"description": "The normal playback rate is multiplied by this value to obtain the current rate, so a value of 1.0 indicates normal speed.",
|
|
"readOnly": false,
|
|
"bindable": true,
|
|
"defaultBindingMode": "OneWay",
|
|
"heritable": true,
|
|
"defaultValue": null,
|
|
"defaultValueInternal": 1
|
|
},
|
|
{
|
|
"name": "data-tchmi-current-time",
|
|
"propertyName": "CurrentTime",
|
|
"propertySetterName": "setCurrentTime",
|
|
"propertyGetterName": "getCurrentTime",
|
|
"displayName": "Current Time",
|
|
"visible": true,
|
|
"themeable": "Advanced",
|
|
"displayPriority": 200,
|
|
"type": "tchmi:general#/definitions/Number",
|
|
"category": "Audio",
|
|
"description": "The current playback time of the audio.",
|
|
"readOnly": false,
|
|
"bindable": true,
|
|
"defaultBindingMode": "OneWay",
|
|
"heritable": true,
|
|
"defaultValue": null,
|
|
"defaultValueInternal": 0
|
|
},
|
|
{
|
|
"name": "data-tchmi-duration",
|
|
"propertyName": "Duration",
|
|
"propertyGetterName": "getDuration",
|
|
"displayName": "Duration",
|
|
"visible": true,
|
|
"displayPriority": 200,
|
|
"type": "tchmi:general#/definitions/Number",
|
|
"category": "Audio",
|
|
"description": "Returns a number indicating the length of the media in seconds or 0 if no media is available.",
|
|
"readOnly": true,
|
|
"bindable": false,
|
|
"defaultBindingMode": "OneWay",
|
|
"heritable": true
|
|
},
|
|
{
|
|
"name": "data-tchmi-is-ended",
|
|
"propertyName": "IsEnded",
|
|
"propertyGetterName": "getIsEnded",
|
|
"displayName": "Is Ended",
|
|
"visible": true,
|
|
"displayPriority": 200,
|
|
"type": "tchmi:general#/definitions/Boolean",
|
|
"category": "Audio",
|
|
"description": "Returns a Boolean that indicates whether the media element has finished playing.",
|
|
"readOnly": true,
|
|
"bindable": false,
|
|
"defaultBindingMode": "OneWay",
|
|
"heritable": true
|
|
},
|
|
{
|
|
"name": "data-tchmi-is-playing",
|
|
"propertyName": "IsPlaying",
|
|
"propertyGetterName": "getIsPlaying",
|
|
"displayName": "Is Playing",
|
|
"visible": true,
|
|
"displayPriority": 200,
|
|
"type": "tchmi:general#/definitions/Boolean",
|
|
"category": "Audio",
|
|
"description": "Returns a Boolean that indicates whether the media element is playing right now.",
|
|
"readOnly": true,
|
|
"bindable": false,
|
|
"defaultBindingMode": "OneWay",
|
|
"heritable": true
|
|
},
|
|
{
|
|
"name": "data-tchmi-controls",
|
|
"propertyName": "Controls",
|
|
"propertySetterName": "setControls",
|
|
"propertyGetterName": "getControls",
|
|
"displayName": "Controls",
|
|
"visible": true,
|
|
"themeable": "Standard",
|
|
"displayPriority": 10,
|
|
"type": "tchmi:general#/definitions/Boolean",
|
|
"category": "Player",
|
|
"description": "If set true, the browser will offer controls to allow the user to control audio playback, including volume, seeking, and pause/resume playback.",
|
|
"readOnly": false,
|
|
"bindable": true,
|
|
"defaultBindingMode": "OneWay",
|
|
"heritable": true,
|
|
"defaultValue": true,
|
|
"defaultValueInternal": false
|
|
},
|
|
{
|
|
"name": "data-tchmi-autoplay",
|
|
"propertyName": "Autoplay",
|
|
"propertySetterName": "setAutoplay",
|
|
"propertyGetterName": "getAutoplay",
|
|
"displayName": "Autoplay",
|
|
"visible": true,
|
|
"themeable": "Standard",
|
|
"displayPriority": 20,
|
|
"type": "tchmi:general#/definitions/Boolean",
|
|
"category": "Player",
|
|
"description": "If set true, the audio automatically begins to play back.\nNote: On modern browsers this is not allowed for unmuted audio.",
|
|
"readOnly": false,
|
|
"bindable": true,
|
|
"defaultBindingMode": "OneWay",
|
|
"heritable": true,
|
|
"defaultValue": null,
|
|
"defaultValueInternal": false
|
|
},
|
|
{
|
|
"name": "data-tchmi-loop",
|
|
"propertyName": "Loop",
|
|
"propertySetterName": "setLoop",
|
|
"propertyGetterName": "getLoop",
|
|
"displayName": "Loop",
|
|
"visible": true,
|
|
"themeable": "Standard",
|
|
"displayPriority": 20,
|
|
"type": "tchmi:general#/definitions/Boolean",
|
|
"category": "Player",
|
|
"description": "If set true, we will, upon reaching the end of the audio, automatically seek back to the start.",
|
|
"readOnly": false,
|
|
"bindable": true,
|
|
"defaultBindingMode": "OneWay",
|
|
"heritable": true,
|
|
"defaultValue": null,
|
|
"defaultValueInternal": false
|
|
}
|
|
],
|
|
"attributeCategories": [
|
|
{
|
|
"name": "Audio",
|
|
"displayPriority": 500,
|
|
"defaultCollapsed": true,
|
|
"description": "Attributes defining the audio playback of the control."
|
|
},
|
|
{
|
|
"name": "Player",
|
|
"displayPriority": 510,
|
|
"defaultCollapsed": true,
|
|
"description": "Attributes defining the audio player of the control."
|
|
}
|
|
],
|
|
"functions": [
|
|
{
|
|
"name": "play",
|
|
"displayName": "play",
|
|
"visible": true,
|
|
"description": "Begins playback of the audio.",
|
|
"category": "Playback handling",
|
|
"params": [],
|
|
"type": null,
|
|
"heritable": true
|
|
},
|
|
{
|
|
"name": "pause",
|
|
"displayName": "pause",
|
|
"visible": true,
|
|
"description": "Pauses the audio playback.",
|
|
"category": "Playback handling",
|
|
"params": [],
|
|
"type": null,
|
|
"heritable": true
|
|
},
|
|
{
|
|
"name": "stop",
|
|
"displayName": "stop",
|
|
"visible": true,
|
|
"description": "Stops the media playback which means pause playback and set current time to 0.",
|
|
"category": "Playback handling",
|
|
"params": [],
|
|
"type": null,
|
|
"heritable": true
|
|
},
|
|
{
|
|
"name": "skipForward",
|
|
"displayName": "skipForward",
|
|
"visible": true,
|
|
"description": "Move the current time position forward.",
|
|
"category": "Playback handling",
|
|
"params": [
|
|
{
|
|
"name": "valueNew",
|
|
"displayName": "valueNew",
|
|
"description": "Delta time in seconds.",
|
|
"type": "tchmi:general#/definitions/Number",
|
|
"bindable": true,
|
|
"visible": true
|
|
}
|
|
],
|
|
"type": null,
|
|
"heritable": true
|
|
},
|
|
{
|
|
"name": "skipBackward",
|
|
"displayName": "skipBackward",
|
|
"visible": true,
|
|
"description": "Move the current time position backwards.",
|
|
"category": "Playback handling",
|
|
"params": [
|
|
{
|
|
"name": "valueNew",
|
|
"displayName": "valueNew",
|
|
"description": "Delta time in seconds.",
|
|
"type": "tchmi:general#/definitions/Number",
|
|
"bindable": true,
|
|
"visible": true
|
|
}
|
|
],
|
|
"type": null,
|
|
"heritable": true
|
|
}
|
|
],
|
|
"events": [
|
|
{
|
|
"name": ".onLoadedData",
|
|
"displayName": ".onLoadedData",
|
|
"visible": true,
|
|
"category": "Control",
|
|
"description": "The loadedData event is fired after the browser has loaded the audio data.",
|
|
"heritable": true,
|
|
"arguments": []
|
|
},
|
|
{
|
|
"name": ".onError",
|
|
"displayName": ".onError",
|
|
"visible": true,
|
|
"displayPriority": 30,
|
|
"category": "Control",
|
|
"description": "The error event is fired when the audio was not loaded successfully.",
|
|
"heritable": true,
|
|
"arguments": [
|
|
{
|
|
"type": "tchmi:framework#/definitions/DOMErrorEvent",
|
|
"description": "The ErrorEvent object of the underlying error dom event."
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": ".onVolumeChange",
|
|
"displayName": ".onVolumeChange",
|
|
"visible": true,
|
|
"category": "Control",
|
|
"description": "The volumechange event is fired when the volume has changed.",
|
|
"heritable": true,
|
|
"arguments": [
|
|
{
|
|
"type": "tchmi:framework#/definitions/Fraction",
|
|
"description": "The new volume value between 0 and 1."
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": ".onDurationChange",
|
|
"displayName": ".onDurationChange",
|
|
"visible": true,
|
|
"category": "Control",
|
|
"description": "The durationchange event is fired when the duration has changed.",
|
|
"heritable": true,
|
|
"arguments": [
|
|
{
|
|
"type": "tchmi:general#/definitions/Number",
|
|
"description": "The new duration in seconds."
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": ".onIsEndedChange",
|
|
"displayName": ".onIsEndedChange",
|
|
"visible": true,
|
|
"category": "Control",
|
|
"description": "The onIsEndedChange event is fired when the playback stops because the end of the media is reached or because no further data is available.",
|
|
"heritable": true,
|
|
"arguments": [
|
|
{
|
|
"type": "tchmi:general#/definitions/Boolean",
|
|
"description": "The new isEnded value."
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": ".onIsPlayingChange",
|
|
"displayName": ".onIsPlayingChange",
|
|
"visible": true,
|
|
"category": "Control",
|
|
"description": "The onIsPlayingChange event is fired when the audio playback has started.",
|
|
"heritable": true,
|
|
"arguments": [
|
|
{
|
|
"type": "tchmi:general#/definitions/Boolean",
|
|
"description": "The new isPlaying value."
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": ".onTimeUpdate",
|
|
"displayName": ".onTimeUpdate",
|
|
"visible": true,
|
|
"category": "Control",
|
|
"description": "The timeupdate event is fired when the time of audio is updated.",
|
|
"heritable": true,
|
|
"arguments": []
|
|
}
|
|
],
|
|
"dataTypes": [
|
|
{
|
|
"schema": "Schema/Types.Schema.json"
|
|
}
|
|
]
|
|
} |