Player
Definition
Multimedia component that plays audio and controls phone vibration. The name of a multimedia file is specified in the Source
property, which can be set in the Designer or in the Blocks Editor. The length of time for a vibration is specified in the Blocks Editor in milliseconds (thousandths of a second).
For supported audio formats, see Android Supported Media Formats.
This component is best for long sound files, such as songs, while the Sound
component is more efficient for short files, such as sound effects.
Properties
- IsPlaying
- Reports whether the media is playing.
- Loop
- If true, the
Player
will loop when it plays. SettingLoop
while the player is playing will affect the current playing. - PlayOnlyInForeground
- If true, the
Player
will pause playing when leaving the current screen; if false (default option), thePlayer
continues playing whenever the current screen is displaying or not. - Source
- Sets the audio source.
- Volume
- Sets the volume property to a number between 0 and 100.