overwolf.media.videos

Use the overwolf.media.videos API to create video composition, delete video files, and get details of video files that were created by the app 

Methods

createVideoComposition(sourceVideoUrl, segments, callback)

Version added: 0.78

Creates a compilation video out of a source video and a list of segments. Listen to the event to determine when the compilation video is ready.

  • Parameter: sourceVideoUrl <string>

    The url of the source video in an overwolf://media form.
  • Parameter: segments <Video Composition Segment Array>

    A JSON containing a list of segments, each segment has a start time and an end time in milliseconds. The segments must be sorted in acsending order. Example:

    {
    	"segments": [
    		{ "startTime": 2000, "endTime": 4000 },
    		{ "startTime": 8000, "endTime": 10000 },
    		{ "startTime": 14000, "endTime": 18000 }
    	]
    }
  • Parameter: callback <function>

    A callback function which will be called with the status of the request and the url to the target video.

getVideos(callback)

Version added: 0.89.100

Gets a list of all of the videos created by this app.

  • Parameter: callback <function>

    A callback function which will be called with the status of the request.

getVideosSize(callback)

Version added: 0.91.200

Returns the total size of the video files created by this app in gigabytes.

  • Parameter: callback <function>

    A callback with the videos size.

deleteOldVideos(keepNewestXGbs, callback)

Version added: 0.89.100

Deletes all videos created by this app with an option to keep the newest X GBs (use with care).

  • Parameter: keepNewestXGbs <int>

    Keep the newest X GBs of videos. Pass 0 to delete all videos.
  • Parameter: callback <function>

    A callback function which will be called with the status of the request.

deleteVideo(videoUrl, callback)

Version added: 0.89.100

Deletes a specific video created by this app.

  • Parameter: videoUrl <string>

    The Overwolf URL of the video to delete.
  • Parameter: callback <function>

    A callback function which will be called with the status of the request.

Types

Video Composition Segment

A helper structure to describe video segments.

Properties

startTime

Version added: 0.78

Segment start time.

Type: int

endTime

Version added: 0.78

Segment end time.

Type: int

Video Composition Segment Array

Properties

segments

Version added: 0.78

An array of segments.

Type: Video Composition Segment