Player

  • Description

      Player

      The Player component is a multimedia component that plays audio and controls the vibration of the phone. To know what audio formats are admitted, see Supported media formats Android.
      This component is indicated for long sound files, such as songs, while the component sound it's more efficient for short files, like sound effects.

      • The path of the multimedia file that you want to play, is specified in the property 'Origin', which can be set in the component properties or in the Block Editor.
      • The vibration time is specified in the Block Editor in milliseconds (Thousandths of a second).
  • Events

    • Completed
    • This event is activated when the audio has reached to the end.
    • Other player started
    • This event is activated when another player starts playing, when there is already another playing or paused but that has not stopped.
  • Procedures

    • Pause
    • This method suspends audio playback if it is playing.
    • Start
    • This method plays the audio. If it was previously paused, the reproduction resumes. If it stopped earlier, it starts from the beginning.
    • Stop
    • This method stops playback of the audio and is located at the beginning of the audio.
    • Vibrate (ms)
    • This method vibrates the device by a specific number of milliseconds.
  • Properties

    • Is playing
    • This property lets you know if the audio is playing. Will return 'True' if it is playing and 'False' if you are not doing it.
    • Loop
    • If set to 'True', the player will play in a loop, it is say infinitely.
    • Only active screen
    • If set to 'True' the player will only be heard when the user has the player as active screen. If you change the screen, for example if you minimize it or open another one that overlaps it, the player will pause.
      If set to 'False', the player will continue playing regardless of whether the screen is active or not.
    • Origin
    • This property refers to the audio path that is used by the player to play it.
    • Volume
    • Allows you to set the volume of the audio when played. This values they range from 0 to 100.