GitHub

Resource management

Managing Videos

After you've succesfully authenticated and instantiated an instance of the Editframe class, you can access previously created videos.

Video properties

PropertyTypeValue
idstringThe video's ID
isFailedbooleanWhether video encoding failed
isReadybooleanWhether video encoding succeeded
downloadUrlstringURL to download the video from
timestampnumberUnix timestamp representing when the video was encoded
streamUrlstringURL to stream the video from
thumbnailUrlstringURL for the video's thumbnail image
metadataobjectArbitrary metadata

Fetch all videos

editframe.videos.all() signature

async function all(page?: number, perPage?: number): Promise<Video[]>;

Example

const videos = await editframe.videos.all();
[
  {
    "id": "6jx24gqZW7",
    "isFailed": false,
    "isReady": true,
    "downloadUrl": "https://api.editframe.com/v2/videos/6jx24gqZW7/download?client_id=mCEKwLSfNZzhyKOqd7QnJZ",
    "timestamp": 1652804118,
    "streamUrl": "https://api.editframe.com/v2/videos/6jx24gqZW7/stream?client_id=mCEKwLSfNZzhyKOqd7QnJZ",
    "thumbnailUrl": "https://api.editframe.com/v2/videos/6jx24gqZW7/thumbnail?client_id=mCEKwLSfNZzhyKOqd7QnJZ",
    "metadata": {
      "myAppId": 1
    }
  },
  {
    "id": "yKOqd7QnJZ",
    "isFailed": true,
    "isReady": false,
    "metadata": {
      "myAppId": 1
    }
  }
]

Fetch a single video

editframe.videos.get() signature

async function get(id: string): Promise<Video | undefined>;

Example

const video = await editframe.videos.get("6jx24gqZW7");
{
  "id": "6jx24gqZW7",
  "isFailed": false,
  "isReady": true,
  "downloadUrl": "https://api.editframe.com/v2/videos/6jx24gqZW7/download?client_id=mCEKwLSfNZzhyKOqd7QnJZ",
  "timestamp": 1652804118,
  "streamUrl": "https://api.editframe.com/v2/videos/6jx24gqZW7/stream?client_id=mCEKwLSfNZzhyKOqd7QnJZ",
  "thumbnailUrl": "https://api.editframe.com/v2/videos/6jx24gqZW7/thumbnail?client_id=mCEKwLSfNZzhyKOqd7QnJZ",
  "metadata": {
    "myAppId": 1
  }
}
Previous
Applications