
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);