Home Reference Source Repository
public class | source

OlapicStreamEntity

Extends:

OlapicEntity → OlapicStreamEntity

This represents the Olapic streams in DevKit.

Constructor Summary

Public Constructor
public

The class constructor that receives the stream information.

Member Summary

Public Members
public

An alias/name for the entity.

public get

A shortcut method to get access to the streams handler object.

Method Summary

Public Methods
public

Gets the stream base image as a media entity.

public

Gets the stream cover image as a media entity.

Inherited Summary

From class OlapicEntity
public get

A quick shortcut for the entities so they can access their own entities handler.

public

An alias/name for the entity, for debug purposes.

public

The entity information.

public

get(path: string): *

Access the entity data using a path-like format.

public

A utility method that returns the entity name/alias.

Public Constructors

public constructor(data: Object) source

The class constructor that receives the stream information.

Override:

OlapicEntity#constructor

Params:

NameTypeAttributeDescription
data Object

All the information for the stream.

Public Members

public alias: String source

An alias/name for the entity.

Override:

OlapicEntity#alias

public get handler: OlapicStreamsHandler: * source

A shortcut method to get access to the streams handler object.

Override:

OlapicEntity#handler

Return:

OlapicStreamsHandler

the handler object for this specific type of entity.

Public Methods

public getBaseImage(): Promise<OlapicMediaEntity, Error> source

Gets the stream base image as a media entity.

Return:

Promise<OlapicMediaEntity, Error>

A promise with the media entity or an Error object if something goes wrong.

Example:

.getBaseImage().then((media) => {
    console.log(media.get('caption'));
});

public getCoverImage(): Promise<OlapicMediaEntity, Error> source

Gets the stream cover image as a media entity.

Return:

Promise<OlapicMediaEntity, Error>

A promise with the media entity or an Error object if something goes wrong.

Example:

.getCoverImage().then((media) => {
    console.log(media.get('caption'));
});