I'm making a HTML5 Video Player with number of different languages subtitles. I want to show my subtitles through the VTTCue
method only. So far my VTTCue
works for English perfectly, but it doesn't work with other languages like hindi, urdu, chinese, japanese, korean and even Spanish. It does not show some of the character of Spanish language such as ó
or á
. Instead it shows something very different. Please help me. And I only want to show the subtitles through the VTTCue
method only. Thanks
My Code:
<html>
<head>
<title></title>
</head>
<body>
<video width="640" height="360" src="video.mp4" controls></video>
<script>
var video_player = document.querySelector('video');
var track = undefined;
track = video_player.addTextTrack("subtitles", undefined, "es");
track.mode = "showing";
track.addCue(new VTTCue(0, 10, "cómo están"));
</script>
</body>
</html>