The YouTube feature in EnsembleUI allows integration of YouTube videos into your application, providing users with a rich multimedia experience.

YouTube Player Configuration

The YouTube player component offers a range of options for customizing the behavior and appearance of YouTube videos within the application.

  • URL: Specifies the URL of the main YouTube video to be played.
  • Video List: Provides a list of additional videos to be displayed in the video player.
  • Playback Rate: Allows users to adjust the playback speed of the video.
  • Volume: Enables users to set the volume level for audio playback.
  • Playback Controls: Offers options to show/hide video controls, enable captions, and display annotations.
  • Autoplay: Determines whether the video should start playing automatically when loaded.
  • Start and End Seconds: Specifies the start and end times of the video playback.
  • Aspect Ratio: Defines the aspect ratio of the video player.

Controlling Video Playback

The control buttons allow users to interact with the YouTube player and manage video playback effectively.

  • Prev/Next: Navigate to the previous or next video in the playlist.
  • Play/Pause: Start or pause video playback.
  • Mute/Unmute: Toggle audio mute/unmute.
  • Stop: Stop video playback.

Setting Playback Rate and Volume

Users can set the playback rate and volume using the provided text input fields:

  • Set playback rate: Adjust the playback speed of the video.
  • Set volume: Control the audio volume of the video.

Example Configuration

    - TextInput:
            hintText: Set playback rate
            id: playback
        - TextInput:
            hintText: set volume
            id: volume
        - YouTube:
            volume: ${volume.value}
            showFullScreenButton: true
              - IoBP24I2lwA
            playbackRate: ${playback.value}
            enableCaptions: true
            showControls: true
            showAnnotations: false
            id: youtubeId
            startSeconds: 10
            endSeconds: 40
            autoplay: true
            aspectRatio: 4 / 3
        - Flow:
              gap: 16
              lineGap: 16
              - Button:
                  label: Prev
                  onTap: |
              - Button:
                  label: Play
                  onTap: |
              - Button:
                  label: Pause
                  onTap: |
              - Button:
                  label: Mute
                  onTap: |
              - Button:
                  label: Unmute
                  onTap: |
              - Button:
                  label: Next
                  onTap: |
              - Button:
                  label: Stop
                  onTap: |

Note: The YouTube feature is compatible with Native iOS and Android applications.