Media
MediaModel
Namespace: Svrf.Models.Media
MediaModel
class contains the metadata and files for Media from the Svrf API.
MediaMetadata
Namespace: Svrf.Models.Media
MediaMetadata
class contains metadata about media.
Name | Type | Description |
---|---|---|
Id | string | The unique ID of this Media. |
Title | string | The title of the Media, suitable for displaying. |
Description | string | A description of the Media. |
Authors | IEnumerable<string> | The Media's authors. This should be displayed when possible. |
Site | string | The site that this Media came from. This should be displayed when possible. |
Canonical | string | The canonical page this Media can be found at via Svrf. |
Url | string | The original page this Media is located at. |
EmbedUrl | string | A player that can be embedded using an <iframe> tag to play the Media. |
EmbedHtml | string | An <iframe> tag that embeds a player that plays the Media. |
Type | MediaType | The type of the Media. This should influence the media controls displayed to the user. |
Adult | bool | Whether the Media is adult content. |
Width | int? | The width, in pixels, of the Media's source. |
Height | int? | The height, in pixels, of the Media's source. |
Duration | float? | The duration of the Media in seconds. |
Metadata | MediaMetadata | Metadata about the Media. |
Files | MediaFiles | Various sizes of images and resolutions for the Media. They will never be larger than the Media source's original resolution. |
MediaMetadata
Namespace: Svrf.Models.Media
MediaMetadata
class contains metadata about media.
Name | Type | Description |
---|---|---|
IsFaceFilter | bool | For 3D Media, denotes that this model can be applied as a face filter overlay on a video of a face. |
HasBlendShapes | bool | For 3D Media, denotes that this model contains blend shapes, but having to calculate and apply weights to them is not required. These are models like glasses, hats, and billboards that do not react to face movement. |
RequiresBlendShapes | bool | For 3D Media, denotes that calculating and applying blend shape weights to this model is required for the correct experience. If your platform cannot detect and calculate blend shape weights you MUST NOT present these models to your users. |
MediaFiles
Namespace: Svrf.Models.Media
MediaFiles
contains various sizes of images and resolutions for the Media. They will never be larger than the Media source's original resolution.
Name | Type | Description |
---|---|---|
Images | MediaImages | Resized jpeg stills of the Media. For video , these will be stills from 1/3 of the video's duration. Resolutions larger than the original size will not be included (the original is included as max ). For stereoscopic content, this will be a monoscopic version of the top or left channel. |
Videos | MediaVideos | Resized mp4 (H.264 ) videos of the Media. Only included if the Media is video . Resolutions larger than the original size will not be included (the original is included as max ). For stereoscopic content, this will be a monoscopic version of the top or left channel. |
Stereo | MediaStereo | Resized versions of the Media, matching the Media's type, in stereo. Only included if the Media is stereoscopic. Resolutions larger than the original size will not be included (the original is included as max ). |
Gltf | Dictionary<string, string> | A map of file names to urls where those files are hosted. The file names are relative and their name hierarchy should be respected when saving them locally. |
GltfMain | string | Url for the main GLTF file (that has .gltf extension). |
Glb | string | This is the binary glTF format that should be used by clients if the Media is a 3D object. This is the preferred format to use on end-user devices. |
GlbDraco | string | This is the binary glTF format, with additional DRACO compression, that should be used by clients if the Media is a 3D object. Your renderer must support the KHR_draco_mesh_compression extension to use this model. |
MediaImages
Namespace: Svrf.Models.Media
Resized jpeg
stills of the Media.
For videos, these will be stills from 1/3 of the video's duration.
For stereoscopic content, this will be a monoscopic version of the top or left channel.
Resolutions larger than the original size will not be included.
Name | Type | Description |
---|---|---|
Max | string | The image in its largest available size (the original size). This image should be used in third-party applications for the best experience, except on mobile devices (see 4096 ). |
Width8192 | string | The image at a reasonably large resolution that can be used for a better desktop experience. |
Width4096 | string | 4096px wide image. This image should be used on mobile devices, as larger images may cause some devices to crash. |
Width1080 | string | 1080px wide image. This image should be used for previews or other uses requiring clear resolution at low bandwidth. |
Width1080Watermarked | string | 1080px wide watermarked image. This image should be used for sharing on social media. |
Width720 | string | 720px wide image. This image may be used for thumbnailing. |
Size720x720 | string | A 1:1 image. This image may be used for thumbnailing. |
Size720x540 | string | A 4:3 image. This image may be used for thumbnailing. |
Size720x405 | string | A 16:9 image. This image may be used for thumbnailing. |
Width540 | string | 540px wide image. This image may be used for thumbnailing. |
Width136 | string | 136px wide image. This image may be used for thumbnailing. |
MediaVideos
Namespace: Svrf.Models.Media
Resized mp4
(H.264
) videos of the Media. Only included if the Media is video
.
Resolutions larger than the original size will not be included (the original is included as max
).
For stereoscopic content, this will be a monoscopic version of the top or left channel.
Name | Type | Description |
---|---|---|
Max | string | Maximum resolution video (original source video), width pixels wide at unspecified video and audio rates. |
Hls | string | URL for an HLS master playlist containing streams in all of the above resolutions which are no wider than the original Media. This should be used for streaming unless the platform does not support HLS. |
Clip | string | A 6-second, 1440px wide clip, with a 2MBps video rate, no audio. |
Width4096 | string | 4096px wide video with a 20MBps video rate, 256KBps audio rate. |
Width2160 | string | 2160px wide video with a 10MBps video rate, 192KBps audio rate. |
Width1440 | string | 1440px wide video with a 4.4MBps video rate, 128KBps audio rate. |
Width848 | string | 848px wide video with a 1.3MBps video rate, 96KBps audio rate. |
MediaStereo
Namespace: Svrf.Models.Media
Resized versions of the Media, matching the Media's type, in stereo. Only included if the Media is stereoscopic.
Resolutions larger than the original size will not be included (the original is included as max
).
Name | Type | Description |
---|---|---|
Max | string | The Media in its largest available size (the original size). |
Hls | string | URL for an HLS master playlist containing streams in all of the above resolutions which are no wider than the original Media. Only included if the Media is a video . |
Width4096 | string | 4096px wide image. This image should be used on mobile devices, as larger images may cause some devices to crash. Only included if the Media is a photo . |
Width2160 | string | 2160px wide video with a 10MBps video rate, 192KBps audio rate. Only included if the Media is a video . |
Width1440 | string | 1440px wide video with a 4.4MBps video rate, 128KBps audio rate. Only included if the Media is a video . |
Width848 | string | 848px wide video with a 1.3MBps video rate, 96KBps audio rate. Only included if the Media is a video . |