> For the complete documentation index, see [llms.txt](https://electoriaengine.gitbook.io/api/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://electoriaengine.gitbook.io/api/components/video.md).

# Video

I'm a speed photo

```javascript
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
})
```

{% hint style="info" %}
You don't have to add anything other than name and position.
{% endhint %}

{% hint style="danger" %}
(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>
{% endhint %}

{% embed url="<https://1070416189-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FAoN3PvLitJVdWdsmwATH%2Fuploads%2Fu2YjZq0EyS1cquYH2ouh%2Fvideo.mp4?alt=media&token=a826f002-b97d-46db-8d4d-aaa6e2c6566f>" %}

## Update&#x20;

```javascript
video.update({
    removeable:false
})
//or 
updateData({
    name:"video",
    removeable:false
})
```

## Get

```javascript
console.log(video.get())
console.log(getData("video"))
//Example
console.log(
video.get().removeable
)
```

## Remove

```javascript
video.remove()
removeData("video")
```
