import OlapicStreamEntity from 'olapic-devkit/src/core/entities/stream/stream.entity.js'
OlapicStreamEntity
Extends:
This represents the Olapic streams in DevKit.
Constructor Summary
Public Constructor | ||
public |
constructor(data: Object) 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 |
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#constructorParams:
Name | Type | Attribute | Description |
data | Object | All the information for the stream. |
Public Members
public get handler: OlapicStreamsHandler: * source
A shortcut method to get access to the streams handler object.
Override:
OlapicEntity#handlerPublic 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 |
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 |
Example:
.getCoverImage().then((media) => {
console.log(media.get('caption'));
});