Is there a way to register a (synchronizing) listener to a javafx media player?
Albretch Mueller
lbrtchx at gmail.com
Wed May 30 00:52:31 UTC 2018
If you go:
https://www.ted.com/talks/melissa_fleming_a_boat_carrying_500_refugees_sunk_at_sea_the_story_of_two_survivors/transcript
you will notice that they use some (javascript) strategy to link the
video section to the transcript (in that case of 26 languages) in
actionably and two-way fashion. You will notice that the textual
segment is being highlighted as the speaker talks. So:
https://www.ted.com/talks/melissa_fleming_a_boat_carrying_500_refugees_sunk_at_sea_the_story_of_two_survivors/transcript#t-55066
will bring you to:
"Früher eine aufstrebende Schülerin, nur auf ihre Zukunft bedacht,
war sie jetzt ständig voller Angst."
and the other way around as well, if you click on that part of the
talk the video will be accordingly reset to that moment; so, if you
click on the phrase:
"Ich arbeite, du kannst studieren -- die Möglichkeit eines neuen Lebens"
the video will be correspondingly moved to: #t-80372
You can even change the language of the transcript as the video is
watch and the textual segments will be reset as well!
~
Using a WebView you can access the link itself:
https://www.ted.com/talks/melissa_fleming_a_boat_carrying_500_refugees_sunk_at_sea_the_story_of_two_survivors/transcript
and watch the video without the synchronization to the subtitles
and/or the option to change the language of the transcript.
Using a javafx.scene.media.MediaView you can watch the video locally
(with the embedded captions for the chosen language after downloading
it from them). I need the kind of synchronization capability that ted
is offering, but I don't see how you could achieve this using the
javafx API. In fact, I haven't seen such a thing in software other
than ted and if you can do that with javascript sure can you do it
with JavaFX.
Basically, all you need is a way to register a listener interface to
the synchronizing strategy of the (MV)Controller exposing the beat of
the video.
How could you do such a thing with JavaFX?
lbrtchx
More information about the openjfx-dev
mailing list