Video player

  • Description

      Video player

      The video player is a multimedia component that plays videos. When the application is executed, the Video Player will be displayed as a rectangle on the screen.


      If the user touches the rectangle, the controls will appear to play: Pause, forward and backwards inside the video. The application also can control the behavior of the procedures Start( ), Pause ( ) and Seek to(ms).


      Video files must be in 3GPP (.3gp) or MPEG-4 (.mp4) formats. For get more information about legal formats, see supported media formats Android.

      App Inventor for Android only allows video files of less than 1 MB . If your multimedia files are too large, You may get errors when you compile or install your application, in which case you should reduce the amount of multimedia files or their sizes.

      Most software video editing, such as Windows Movie Maker and Apple iMovie, can help you reduce the size of the videos by shortening them or recoding the video in a more compact format.
      You can also set the media source in a URL that points to a transmission of video, but the URL must point to the video file itself, not to a program that play the video.

  • Events

    • Completed
    • Event that runs when the video has reached to the end.
  • Procedures

    • Get duration
    • This method returns the duration of the video in milliseconds.
    • Start
    • This method starts the video playback. If this is paused, you can resume with this method.
    • Pause
    • This method pauses the playback of the video. Reproduction can be resume using the Start() method.
    • Seek to(ms)
    • This method searches for the requested time (specified in milliseconds) in the video. If the video is paused, the search will not update the box that is displayed. The player can only jump to key frames in the video, so look for times that differ in short intervals may not move to different frames.
  • Properties

    • Full screen
    • If this property is set to 'True' the player will be maximized and will occupy the screen.
    • Origin
    • This property refers to the name of the video that will be used by the player. This property is generally defined in the properties of the component.
    • Volume
    • Allows you to set the video volume when played. This values range from 0 to 100. Values ​​less than 0 will be treated as 0 and values ​​greater than 0 100 will be treated as 100.
    • Height
    • Set the height in pixels.
    • Height in percentage
    • Set the height in percentage.
    • Width
    • Set the width in pixels.
    • Width in percentage
    • Set the width in percentage.
    • Visible
    • Sets the visibility of the component. It can be "Visible", so that it see or "Hidden" to hide it.