Media API
Media Details
Video Type Id
A media needs a video type before it can go live.
Video Type Id | Title |
---|---|
1 | Residential Real Estate |
2 | Business Profile |
3 | Neighborhood Tour |
4 | Market Reports / Updates |
5 | City Highlight / Community Tour |
6 | Miscellaneous |
7 | News |
8 | How-To Guide |
9 | Event |
11 | Profile Video |
15 | Commercial Real Estate |
16 | Hotel |
17 | School Tour |
18 | Things to Do |
19 | Inspection |
20 | Vacation Rental |
21 | Land |
22 | Video Clip |
99 | Private |
Media Status Code
When a video is first uploaded to WellcomeMat the returned status code should be 100 File Received. At that point, the encoding system will process the file accordingly, and you can track its encoding status by querying the media. As files become ready, they are immediately pushed into the cloud and out to the CDN delivery service.
Media Status Code | Definition |
---|---|
000 | File not received |
100 | File received |
200 | Queued for encoding |
310 | Generating images |
320 | Encoding 720p video |
330 | Encoding 360p video |
340 | Encoding 270p mobile video |
350 | Encoding 480p video |
360 | Encoding 1080p video |
400 | Active |
410 | Encoded, needs a video type to go active |
500 | Inactive |
600 | Encode Failed |
700 | Marked for deletion |
Response Types
The following response types are found in Media
responses.
type Media = {
media_id: number;
hash: string; // the primary lookup key for the media, i.e. "5isp21d3cb831kank"
created: string; // `YYYY-MM-DD hh:mm:ss {EDT|EST}`
replaced: string; // `YYYY-MM-DD hh:mm:ss {EDT|EST}`
data_updated: string; // `YYYY-MM-DD hh:mm:ss {EDT|EST}`
status_code: "000"|"100"|"200"|"310"|"320"|"330"|"340"|"350"|"360"|"400"|"410"|"500"|"600"|"700";
status_message: string; // message string for Media Status
status_group: "File Not Received"|"File Received"|"Processing"|"Active"|"Pending"|"Inactive"|"Encode Failed"|"Deleted";
is_ready: boolean;
user_id: string; // string representation of an integer
title: string;
description: string;
keywords: string;
customid: string;
original_file: string;
original_size_bytes: string; // string representation of an integer
original_size_readable: string; // example: "2.8mb"
source: string; // example: "api", "ingest", "site", "toolset", etc.
traffic_url: string | null;
slideshow: "0" | "1";
video_type: string; // string representation of an integer
location: {
address: string | null;
city: string | null;
state_province: string | null;
postal_code: string | null;
latitude: string | null;
longitude: string | null;
};
video: {
https_url: string; // base url where the files can be accessed, i.e. `https://{hostname}/`
v270p: string | null;
v360p: string | null;
v480p: string | null;
v720p: string | null;
v1080p: string | null;
length: string; // string representation of an integer
storage_size_bytes: string; // string representation of an integer
storage_size_readable: string; // example: "11.0mb"
};
preview: null | {
https_url: string; // base url where the files can be accessed, i.e. `https://{hostname}/`
v270p_preview: string | null;
v360p_preview: string | null;
v480p_preview: string | null;
v720p_preview: string | null;
v1080p_preview: string | null;
GIF_preview: string | null;
};
image: {
hash: string; // image hash (not a media hash)
https_url: string; // base url where the files can be accessed, i.e. `https://{hostname}/`
large: string; // 1920x1080 max
thumbnail_16x9: string; // 320x180 scaled+cropped
play: string; // 640x360 scaled+cropped
};
photos: {
https_url: string; // base url WITHOUT trailing slash i.e. `https://{hostname}`
seconds: {
[second: string]: string; // per-second filename
};
};
links: {
base: string;
embed: string;
share: string;
unbranded_base: string;
unbranded_embed: string;
};
};