Skip to content

@tmrw-realityos/worldDocs


@tmrw-realityos/world / Components / MediaPlayer

Class: MediaPlayer

Media player component

Extends

Constructors

new MediaPlayer()

new MediaPlayer(): MediaPlayer

Returns

MediaPlayer

Overrides

BaseComponent.constructor

Defined in

world/components/mediaPlayer.ts:26

Properties

autoplay

autoplay: boolean = true

Defined in

world/components/mediaPlayer.ts:21


enabled

enabled: boolean = true

Inherited from

BaseComponent.enabled

Defined in

world/components.ts:7


loop

loop: boolean = true

Defined in

world/components/mediaPlayer.ts:20


mustSave

mustSave: boolean = true

Inherited from

BaseComponent.mustSave

Defined in

world/components.ts:8


muted

muted: boolean = true

Defined in

world/components/mediaPlayer.ts:19


parent?

optional parent: ComponentsContainer

Inherited from

BaseComponent.parent

Defined in

world/components.ts:14


texture_channel

texture_channel: eTextureChannel = eTextureChannel.EMISSIVE

Defined in

world/components/mediaPlayer.ts:22


uid

uid: string = ""

Inherited from

BaseComponent.uid

Defined in

world/components.ts:9


url

url: string = ""

Defined in

world/components/mediaPlayer.ts:17


volume

volume: number = 0.25

Defined in

world/components/mediaPlayer.ts:18


compName

static compName: string = "MediaPlayer"

Overrides

BaseComponent.compName

Defined in

world/components/mediaPlayer.ts:15

Accessors

entity

get entity(): undefined | Entity

set entity(_v): void

Parameters

_v: Entity

Returns

undefined | Entity

Inherited from

BaseComponent.entity

Defined in

world/components.ts:24

Methods

configure()

configure(o): void

Parameters

o

o.url: string

Returns

void

Overrides

BaseComponent.configure

Defined in

world/components/mediaPlayer.ts:66


getCompName()

getCompName(): string

Returns

string

Inherited from

BaseComponent.getCompName

Defined in

world/components.ts:11


onAdded()

onAdded(): void

Returns

void

Overrides

BaseComponent.onAdded

Defined in

world/components/mediaPlayer.ts:32


onClick()?

optional onClick(): void

Returns

void

Inherited from

BaseComponent.onClick

Defined in

world/components.ts:19


onRemoved()

onRemoved(): void

Returns

void

Overrides

BaseComponent.onRemoved

Defined in

world/components/mediaPlayer.ts:41


onUpdate()?

optional onUpdate(dt): void

Parameters

dt: number

Returns

void

Inherited from

BaseComponent.onUpdate

Defined in

world/components.ts:20


preloadVideo()

preloadVideo(): void

Returns

void

Defined in

world/components/mediaPlayer.ts:61


preRender()

preRender(_cam): void

Parameters

_cam: Camera

Returns

void

Defined in

world/components/mediaPlayer.ts:47


serialize()

serialize(): void

Returns

void

Inherited from

BaseComponent.serialize

Defined in

world/components.ts:17