Audio"

From Documentation
m (→‎Version History: add Track as children)
Line 65: Line 65:
 
|-
 
|-
 
| 9.5.0
 
| 9.5.0
| September, 2020
+
| September 2020
| [https://tracker.zkoss.org/browse/ZK-4648 ZK-4648] Audio supports to add tracks
+
| [https://tracker.zkoss.org/browse/ZK-4648 ZK-4648]: Audio supports to add tracks
 
|}
 
|}
  
 
{{ZKComponentReferencePageFooter}}
 
{{ZKComponentReferencePageFooter}}

Revision as of 04:04, 2 September 2020

Audio

Employment/Purpose

An audio component is used to play the audio at the browser. Like image, you could use the src property to specify an URL of an audio resource, or the setContent method to specify a dynamically generated audio. Developers might be able to control the play of an audio by the play, stop and pause methods.

Example

ZKComRef Audio Example.png

 <audio src="music.wav" controls="true"></audio>
The audio supports controls property since 7.0.0

Supports HTML5

[Since 7.0.0]

The audio component has now been enhanced to support HTML 5, it includes the properties like autoplay, controls, loop, muted and preload.

Multiple Sources

[Since 7.0.0]

Most browsers do not support all the audio formats,so we could specify multiple source files in different formats for different browsers. For examples:

 <audio src="music.wav, music.mp3, music.ogg" controls="true"></audio>

Supported Events

Name
Event Type
None None

Supported Children

* Track

Use Cases

Version Description Example Location
     

Version History

Last Update : 2020/09/02


Version Date Content
7.0.0 August, 2013 Audio now supports HTML 5
9.5.0 September 2020 ZK-4648: Audio supports to add tracks



Last Update : 2020/09/02

Copyright © Potix Corporation. This article is licensed under GNU Free Documentation License.