media Properties
The media object provides the following properties.
data
Holds the data object that contains the sound associated with the media object.
Syntax
Example
Type
JavaScript object.
Read/Write
Read only.
Platform Availability
Windows10, Android, iOS
duration
Contains the duration of the audio in seconds.
Syntax
Example
Type
Number
Read/Write
Read only.
Platform Availability
Windows10, Android, iOS
isPlaying
This property contains a Boolean value that indicates whether or not the audio is currently playing.
Syntax
Example
Type
Boolean
Read/Write
Read only
Platform Availability
Windows10, Android, iOS
volume
Contains the current volume level.
Syntax
Example
Type
Double
Read/Write
Read+Write
Remarks
Use this property to read the current volume level or set a new volume level for playing back the audio file. Valid values for this property range from 0.0 to 1.0 inclusive.
Platform Availability
Windows10, Android, iOS