![](https://secure.gravatar.com/avatar/2a5aa573eaa525346834e86829257d2d?rating=PG&size=50&default=https%3A%2F%2Fcdn.desk.com%2Fassets%2Funknown_user_50-8ad5644bbe6b1bd7454f2ea465f782bd.png)
Update vtt file
I wrote a java script that uses ajax to modify vtt file following user actions.
Now i try to update the player with the new vtt.
It works but the player CSS is broken.
How can i do to keep css unchanged ?
This is my code after the modification :
/*i force the navigator to reload the vtt file*/
var oReq = new XMLHttpRequest();
oReq.open("get", data.urlvtt, true);
oReq.send();
/*update the player*/
player.setup({
autostart: true,
file: data.urlvideo,
image: data.poster,
width: playerwidth,
height: playerheight,
primary: 'html5',
mobilecontrols: true,
tracks: [{
file: data.urlvtt,
kind: 'chapters'
}],
});
/*seeking to the last position*/
player.seek(editorLastPosition);