Skip to main content

 

 

 

 
Language:
 
Applies only to Mobile Apps and Reactive Web Apps
Service Studio version:
 
 
OutSystems

Video

Template:OutSystems/Documentation_KB/ContentCollaboration
  • Edit
    Collaborate with us
    Edit this page on GitHub
  • You can use the Video UI pattern to embed a native video player into your application.

    Note: If you want to stream videos from YouTube, Vimeo, or others, see the How to Add Video to Your Applications article.

    How to use the Video UI Pattern

    1. In Service Studio, in the Toolbox, search for Video.

      The Video widget is displayed.

      If the UI widget does not display, it may be because you used a ready-made app, which deletes unused widgets from the module. To make additional widgets available in your app:

      a. Go to Module > Manage dependencies.

      b. Search for and select the relevant Producer, for example OutSystemsUI. Ensure Show All is selected.

      c. On the Public elements for the selected Producer displayed on the right, ensure Show All is selected.

      d. Search for and select the element you want to add, and click Apply.

      e. In Service Studio, in the Toolbox, search for the widget again.

    2. From the Toolbox, drag the Video widget into the Main Content area of your application's screen.

    3. On the Properties tab, set the VideoURL property to the source video file you want to embed in your app.

      • If using an external source file, insert the file URL.

      • If using a local file, include the video in a module as a resource and use the runtime path as follows:

        1. On the Data tab, right-click the Resources folder and select Import Resource.

        2. Browse and select the video file you want to add and click Open.

        3. On the Resource properties tab, from the Deploy Action drop-down, select Deploy to Target Directory.

        4. On the Interface tab, from the Widget Tree, select the Video pattern.

        5. In the VideoURL property, enter the runtime path of the video file.

          Tip: You can copy the runtime path from the Resource Runtime Path property tab.

    4. On the Video Properties tab, you can also define (optional) properties, such as the height and width of the video and the audio settings.

    After following these steps and publishing the module, you can test the pattern in your app.

    Properties

    Property Description
    VideoURL (Text): Mandatory The video file URL or the runtime path of the resource video file.
    PosterURL (Text): Optional The URL to the poster image that displays before the video starts.
    Width (Text): Optional Width (in pixel or percentage) of the video.

    Examples

    • Blank - The video is 100% wide. This is the default value.
    • 150 - The video is 150px wide.
    Height (Text): Optional Height (in pixel or percentage) of the video.

    Examples

    • Blank - The video is 100% high. This is the default value.
    • 150 - The video is 150px high.
    Muted (Boolean): Optional If True, the video audio is muted. If False, the video audio is not muted. This is the default.
    Loop (Boolean): Optional If True, the video replays as soon as it ends. If False, the video does not replay. This is the default.
    Controls (Boolean): Optional If True, the video controls are enabled. If False, the video controls are disabled. This is the default.
    Note In the case of mobile apps, the controls are always enabled.
    Autoplay (Boolean): Optional If True, the video starts once the page is loaded. If False, the video doesn't start immediately. This is the default.
    ExtendedClass Adds custom style classes to the Pattern. You define your custom style classes in your application using CSS.

    Examples

    • Blank - No custom styles are added (default value).
    • "myclass" - Adds the myclass style to the UI styles being applied.
    • "myclass1 myclass2" - Adds the myclass1 and myclass2 styles to the UI styles being applied.
    You can also use the classes available on the OutSystems UI. For more information, see the OutSystems UI Live Style Guide.
    • Was this article helpful?