Hi all
I am looking for a solution to show different subtitles. I have written something by hand in the following example, but I am not completely satisfied with it. It should be so that the different subtitles are loaded with the various clips. When you click Argument1 should Button1 Array1 Clip1.1 and also Text1.1 appear, and if Argument2 is pressed then Button2 Array1 Clip2.1 and alsoText2.1 should be loaded. See it on Console. Fiddle
Actually, everything works, but that with the subtitles does not want yet. Does anyone have a solution for this problem ? Many Thanks !!
@Mugen87 thanks for the answer. I see that Firefox is not supported The animations are running in a Canvas, so they are not videos. So I think it should work with my code, in principle it already works. But I can’t load different Arrays with different subtitles. Maybe they have a solution for this problem?
I’ve suggested this API because even if you have just audio files, you need to synch the audio with the subtitles. This is something where WebVTT could be really helpful.
@Mugen87 I looked at that and I assume that I have to install an audio player before it can work. But I only use the THREE.AudioLoader and the THREE.bvhLoader to play the data together. So I do not have a timeline for reference. Is that possible on this way ?
The problem is that THREE.AudioLoader returns decoded audio buffers for AudioBufferSourceNode objects. AFAIK, these WebAudio entities are not compatible with WebVTT. Instead you have to do something like this:
@Mugen87 I have one more question. I have the whole integrated, now the audio files loaded twice. 1. can the subtitles not be executed via audioLoader or clip1? They are already loaded on this way. The subtitles should therefore only be added. 2. for the other arguments different subtitle blocks should can be loaded. Do I not need an array for that? https://jsfiddle.net/f2Lommf5/843/ Next -> Argument1 or Argument2 -> Play
Thank You!!
Sry, i had not the time to look at your code in detail. But one thing is obvious: You have to do a audio.play() in order to trigger the onEnter() callbacks. The cues won’t appear if you not actually playback the audio.