πΊDecentraland Playback
Adding the provided m3u8 URL to your scene
Video on Demand (VOD)
// Video will start playing when you click on the screen.
const myVideoClip1 = new VideoClip(
// Enter your playback URL below
'https://playback.livepeer.studio/asset/hls/54bd2bvcxp0y9x7u/index.m3u8?accessKey=349619f3-6gca-44e0-9dce-ea267ab23be0')
const myVideoTexture1 = new VideoTexture(myVideoClip1)
const myMaterial1 = new Material()
myMaterial1.albedoTexture = myVideoTexture1
myMaterial1.roughness = 1
myMaterial1.specularIntensity = 2
myMaterial1.metallic = 0
myMaterial1.emissiveTexture = myVideoTexture1
myMaterial1.emissiveColor = Color3.White()
myMaterial1.emissiveIntensity = 1
const screen1 = new Entity()
screen1.addComponent(new PlaneShape())
screen1.addComponent(
new Transform({
position: new Vector3(10.000, 3.000, 2.000),
scale: new Vector3(9.000, 4.000, 4.000),
rotation: new Quaternion().setEuler(360.000, 180.000, 360.000),
})
)
screen1.addComponent(new OnPointerDown(()=>{
myVideoTexture1.playing = !myVideoTexture1.playing
},{hoverText:'Play/Pause'}))
screen1.addComponent(myMaterial1)
engine.addEntity(screen1)Live Streams
Last updated