self.player.set_state(Gst.State.READY)
self.player.set_property("suburi", name)
self.player.set_property("subtitle-font-desc", "Sans, 18")
self.player.set_state(Gst.State.PLAYING)
When a certain button is clicked, the above code sets subtitles for video in playing state. I used the above code to set the subtitles to a video which was already in PLAYING state, when clicked on certain button. When I click on it, subtitles are displayed; but the videos does not resume from current location; it starts over. I also tried the following,
_, duration = self.player.query_duration(Gst.Format.TIME)
print(duration)
self.player.set_state(Gst.State.NULL)
self.player.set_property("uri", self.filename)
self.player.set_property("suburi", name)
self.player.set_property("subtitle-font-desc", "Sans, 18")
self.player.set_state(Gst.State.PLAYING)
self.player.seek_simple(Gst.Format.TIME, Gst.SeekFlags.FLUSH, duration)
Even this does not seek. Is there any alternative way to set the suburi without restarting the video?