Youtube player

  • Description

      Youtube player

      The youtube player is a visible multimedia component that plays videos in Youtube. When the application is executed, the Youtube Player will be displayed as a rectangle on the screen. If use the procedure 'Load and Play' or 'Load Thumbnail' with the 'video id', video will be displayed. If the user touches the rectangle, the controls will appear youtube controls. The application also can control the behavior of the procedures Play( ), Pause ( ) , Seek to(secs), Enable FullScreen( ).

  • Events

    • On Error
    • This event are invoked when any error with the player are found. Values:
      • UNKNOWN
      • INVALID_VOLUME
      • INVALID_SEEK_TO
      • INVALID_PARAMETER_IN_REQUEST: he request contains an invalid parameter value. For example, this error occurs if you specify a video ID that does not have 11 characters, or if the video ID contains invalid characters, such as exclamation points or asterisks.
      • HTML_5_PLAYER: The requested content cannot be played in an HTML5 player or another error related to the HTML5 player has occurred.
      • VIDEO_NOT_FOUND: The video requested was not found. This error occurs when a video has been removed (for any reason) or has been marked as private.
      • VIDEO_NOT_PLAYABLE_IN_EMBEDDED_PLAYER: The owner of the requested video does not allow it to be played in embedded players.
    • Full Screen
    • Event are invoked when the player switches between full screen on or off. Event returns true or false in variable state.
    • On Playback Quality Change
    • This event are invoked when the video quality was changed. Values:
      • UNKNOWN
      • SMALL: Player height is 240px, and player dimensions are at least 320px by 240px for 4:3 aspect ratio.
      • MEDIUM: Player height is 360px, and player dimensions are 640px by 360px (for 16:9 aspect ratio) or 480px by 360px (for 4:3 aspect ratio).
      • LARGE: Player height is 480px, and player dimensions are 853px by 480px (for 16:9 aspect ratio) or 640px by 480px (for 4:3 aspect ratio).
      • HD720: Player height is 720px, and player dimensions are 1280px by 720px (for 16:9 aspect ratio) or 960px by 720px (for 4:3 aspect ratio).
      • HD1080: Player height is 1080px, and player dimensions are 1920px by 1080px (for 16:9 aspect ratio) or 1440px by 1080px (for 4:3 aspect ratio).
      • HIGH_RES: Player height is greater than 1080px, which means that the player's aspect ratio is greater than 1920px by 1080px.
      • DEFAULT: YouTube selects the appropriate playback quality.
    • On Playback Rate Change
    • This event are invoked when playback rate was changed. Default playback rate is 1, which indicates that the video is playing at normal speed. Values:
      • RATE_0_25
      • RATE_0_5
      • RATE_1
      • RATE_1_5
      • RATE_2
      • UNKNOWN
    • On State Change
    • This event is activated each time the status of the player changes. When the player starts loading a video, it transmits an event UNSTARTED. Values:
      • UNSTARTED
      • ENDED
      • PLAYING
      • PAUSED
      • BUFFERING
      • VIDEO_CUED
      • UNKNOWN
  • Procedures

    • Load and Play video
    • This method loads and plays the specified video in parameter 'id video'.
    • Load Thumbnail video
    • This method loads the specified video's thumbnail in parameter 'id video' and prepares the player to play the video. The player does not request the FLV until Play Video() or Seek To() is called.
    • Play video
    • This method plays the currently Thumbnail/loaded video.
    • Pause video
    • This method pauses the currently playing video.
    • Seek to(seconds)
    • This method seeks to a specified time in the video. If the player is paused when the function is called, it will remain paused.
    • Enable FullScreen (boolean)
    • If this method sets to 'True' the player will be maximized and will occupy the screen. When Youtube player switches between full screen on or off calls event 'Full Screen'.
    • Toogle FullScreen
    • This method uses to enter full-screen.
  • Properties

    • Is Full Screen?
    • This property returns 'True' if the player is maximized and occupy the screen.
    • Start Seconds
    • This property accepts a float/integer. If it is specified, then the video will start from the closest keyframe to the specified time.
    • Volume
    • Returns or set the player's volume, an integer between 0 and 100. Note that getVolume() will return the volume even if the player is muted.
    • Get Current Second
    • Returns the current second of the currently playing video.
    • Get Video Duration
    • Returns the duration in seconds of the currently playing video. This parameter will return 0 until the video's metadata is loaded, which normally happens just after the video starts playing.
    • 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.