I am using the video tag and track tag to show a video with a .vtt subtitle file on my website, as in the code below: 

```
<div id="Video">
<video id="player" controls width="1024" height="576">
<source src="video/video00.mp4" type="video/mp4"/>
<track id="subtitletrack" label="English" kind="subtitles" srclang="en" src="subtitle/video02.vtt" default>
</video>

```

This all works fine, but I would like to set the subtitle randomly from an array using javascript: 

```
var subArray = ["subtitle/video00.vtt","subtitle/video01.vtt","subtitle/video02.vtt"];
var subtitle = subArray[Math.floor(Math.random()*subArray.length)];

```

Now the variable 'subtitle' is one of three random vtt files. 

How can I set the track src to the variable 'subtitle'? 

Thank you very much!