🎉Video
I'm a speed photo
var a =new Video({
name:"video",//video name
position:{//you enter where it will be on the screen
x:"50%",y:"50%"
},
scale:{//automatically adjusts if you do not add this
x:"25px",
y:"25px"
},
layer:100,//you don't have to type is automatically set to 100
autoplay: true,//auto play video
muted:true,//mute video sound
video:"http://techslides.com/demos/sample-videos/small.mp4",//video link or file
eval:`
console.log('Video ended')
//for example, write to console, you can use functions
`,
removeable:true//deletes itself after the video ends
})
(android, macos, windows, linux) for those other than To prevent sudden sound in browsers: if you do autoplay: true and muted:false directly, it will give an error. the user will not give an erorr when the user presses a key or clicks somewhere. (you can do something like press a key to start the game). more information:https://goo.gl/xX8pDD
Update
video.update({
removeable:false
})
//or
updateData({
name:"video",
removeable:false
})
Get
console.log(video.get())
console.log(getData("video"))
//Example
console.log(
video.get().removeable
)
Remove
video.remove()
removeData("video")
Last updated