Skip to main content
Language

From Remote URL

VideoEditor SDK supports adding custom frames from a remote URL, this can be a resource hosted by a hosting provider or your servers. The frame tool is optimized for remote resources. This allows directly integrating a remote URL instead of downloading the asset before. For an example of how to download the remote resources in advance and use the local downloaded resources, see the font example.

Adding Frames#

Custom frames can be added by specifying them in the configuration.frame.items array. Each frame takes a unique identifier, a name, a relativeScale, an optional thumbnailURI as well as an optional layoutMode.

Image Groups#

To add the actual images for each frame tile, you can specify them inside the imageGroups property. Each frame consists of four groups corresponding to each side of the frame. In our example, we opt for the "horizontal inside" mode of arranging image tiles providing only a middle image for the left and right parts of the frame and a start, middle and end image for the top and bottom parts. Refer to the guide on frames for an in-depth explanation.

Image Modes#

By default, the midMode is set to FrameTileMode.REPEAT which repeats the middle image to fill out the entire space. For this example, it is set to FrameTileMode.STRETCH for all image groups to keep the correct pattern. In this mode, the middle image is stretched to fill out the entire space.