open_subtitles


Description:

public signal void open_subtitles (MediaItem item)

A signal that user wants to open subtitles file.

Implementation should add a way for user to select subtitles to open such as by e.g. using [class@Gtk.FileDialog] and then add them to the item using [method@Clapper.MediaItem.set_suburi] method.

This signal will pass the [class@Clapper.MediaItem] that was current when user clicked the open button and subtitles should be added to this item. This avoids situations where another item starts playing before user selects subtitles file to be opened. When using asynchronous operations to open file, implementation should [method@GObject.Object.ref] the item to ensure that it stays valid until finish.

Note that this signal will not be emitted if open button is not visible by setting [ method@ClapperGtk.ExtraMenuButton.set_can_open_subtitles] to true, so you do not have to implement handler for it otherwise.

Parameters:

item

a MediaItem