Totem.Object¶
- Subclasses:
None
Methods¶
- Inherited:
Gtk.Application (21), Gio.Application (39), GObject.Object (37), Gio.ActionGroup (14), Gio.ActionMap (5)
- Structs:
class |
|
class |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
Properties¶
- Inherited:
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r |
Current stream’s content-type. |
||
r |
Current stream’s display name. |
||
r |
The MRL of the current stream. |
||
r |
The player’s position (time) in the current stream. |
||
r |
Whether Totem is in fullscreen mode. |
||
r |
Current main page. |
||
r |
Whether Totem is currently playing a file. |
||
r |
Whether the current stream is seekable. |
||
r |
The length of the current stream. |
Signals¶
Name |
Short Description |
---|---|
The |
|
The |
|
The |
|
The |
|
The |
|
The |
Fields¶
Class Details¶
- class Totem.Object(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
All the fields in the
Totem.Object
structure are private and should never be accessed directly.- classmethod get_supported_content_types()¶
-
Get the full list of file content types which Totem supports playing.
New in version 3.1.5.
- classmethod get_supported_uri_schemes()¶
-
Get the full list of URI schemes which Totem supports accessing.
New in version 3.1.5.
- add_to_playlist(uri, display_name, play)¶
- Parameters:
Add uri to the playlist and play it immediately.
- add_to_view(file, title)¶
- Parameters:
Adds a local media file to the main view.
- can_seek_next()¶
- Return type:
Returns true if
Totem.Object.seek_next
() would have an effect.
- can_seek_previous()¶
- Return type:
Returns true if
Totem.Object.seek_previous
() would have an effect.
- clear_playlist()¶
Empties the current playlist.
- Parameters:
id (
str
) – the ID for the menu section to empty
Empty the
Gio.Menu
section pointed to by id, and remove any related actions. Note that menu items with specific target will not have the associated action removed.
- exit()¶
Closes Totem.
- get_current_mrl()¶
- Returns:
a newly-allocated string containing the MRL of the current stream
- Return type:
Get the MRL of the current stream, or
None
if nothing’s playing. Free withGLib.free
().
- get_current_time()¶
- Returns:
the current position in the stream
- Return type:
Gets the current position’s time in the stream as a gint64.
- get_main_window()¶
- Returns:
Totem’s main window
- Return type:
Gets Totem’s main window and increments its reference count.
- Parameters:
id (
str
) – the ID for the menu section to look up- Returns:
- Return type:
Get the
Gio.Menu
of the given id from the main TotemGtk.Builder
file.
- get_playlist_length()¶
- Returns:
the playlist length
- Return type:
Returns the length of the current playlist.
- get_playlist_pos()¶
- Returns:
the index of the current playlist entry, or -1
- Return type:
Returns the 0-based index of the current entry in the playlist. If there is no current entry in the playlist, -1 is returned.
- get_rate()¶
- Returns:
the volume level
- Return type:
Gets the current playback rate, with
1.0
being the normal playback rate.
- get_short_title()¶
-
Gets the title of the current entry in the playlist.
- get_title_at_playlist_pos(playlist_index)¶
- Parameters:
playlist_index (
int
) – the 0-based entry index- Returns:
- Return type:
Gets the title of the playlist entry at index.
- get_video_widget()¶
- Returns:
Totem’s video widget
- Return type:
Gets Totem’s video widget and increments its reference count.
- get_volume()¶
- Returns:
the volume level
- Return type:
Gets the current volume level, as a value between 0.0 and 1.0.
- next_angle()¶
Switches to the next angle, if watching a DVD. If not watching a DVD, this is a no-op.
- pause()¶
Pauses the current stream. If Totem is already paused, it continues to be paused.
- play()¶
Plays the current stream. If Totem is already playing, it continues to play. If the stream cannot be played, and error dialog is displayed.
- play_pause()¶
Gets the current MRL from the playlist and attempts to play it. If the stream is already playing, playback is paused.
- remote_command(cmd, url)¶
- Parameters:
cmd (
Totem.RemoteCommand
) – aTotem.RemoteCommand
Executes the specified cmd on this instance of Totem. If cmd is an operation requiring an MRL, url is required; it can be
None
otherwise.If Totem’s fullscreened and the operation is executed correctly, the controls will appear as if the user had moved the mouse.
- remote_get_setting(setting)¶
- Parameters:
setting (
Totem.RemoteSetting
) – aTotem.RemoteSetting
- Returns:
- Return type:
Returns the value of setting for this instance of Totem.
- remote_set_setting(setting, value)¶
- Parameters:
setting (
Totem.RemoteSetting
) – aTotem.RemoteSetting
value (
bool
) – the new value for the setting
Sets setting to value on this instance of Totem.
- seek_next()¶
If a DVD is being played, goes to the next chapter. If a normal stream is being played, plays the next entry in the playlist.
- seek_previous()¶
If a DVD is being played, goes to the previous chapter. If a normal stream is being played, goes to the start of the stream if possible. If seeking is not possible, plays the previous entry in the playlist.
- seek_relative(offset, accurate)¶
- Parameters:
Seeks to an offset from the current position in the stream, or displays an error dialog if that’s not possible.
- seek_time(msec, accurate)¶
- Parameters:
Seeks to an absolute time in the stream, or displays an error dialog if that’s not possible.
- set_current_subtitle(subtitle_uri)¶
- Parameters:
subtitle_uri (
str
) – the URI of the subtitle file to add
Add the subtitle_uri subtitle file to the playlist, setting it as the subtitle for the current playlist entry.
- set_rate(rate)¶
- Parameters:
rate (
float
) – the new absolute playback rate- Returns:
- Return type:
Sets the playback rate, with
1.0
being the normal playback rate.
- set_volume(volume)¶
- Parameters:
volume (
float
) – the new absolute volume value
Sets the volume, with 1.0 being the maximum, and 0.0 being the minimum level.
- show_error(title, reason)¶
-
Displays a non-blocking error dialog with the given title and reason.
- stop()¶
Stops playback, and sets the playlist back at the start.
Signal Details¶
- Totem.Object.signals.file_closed(object)¶
- Signal Name:
file-closed
- Flags:
- Parameters:
object (
Totem.Object
) – The object which received the signal
The
Totem.Object
::file-closed
signal is emitted when Totem closes a stream.
- Totem.Object.signals.file_has_played(object, mrl)¶
- Signal Name:
file-has-played
- Flags:
- Parameters:
object (
Totem.Object
) – The object which received the signalmrl (
str
) – the MRL of the opened stream
The
Totem.Object
::file-has-played
signal is emitted when a new stream has started playing in Totem.
- Totem.Object.signals.file_opened(object, mrl)¶
- Signal Name:
file-opened
- Flags:
- Parameters:
object (
Totem.Object
) – The object which received the signalmrl (
str
) – the MRL of the opened stream
The
Totem.Object
::file-opened
signal is emitted when a new stream is opened by Totem.
- Totem.Object.signals.get_text_subtitle(object, mrl)¶
- Signal Name:
get-text-subtitle
- Flags:
- Parameters:
object (
Totem.Object
) – The object which received the signalmrl (
str
) – the MRL of the opened stream
- Returns:
allocated string representing the URI of the subtitle to use for mrl
- Return type:
The
Totem.Object
::get-text-subtitle
signal is emitted before opening a stream, so that plugins have the opportunity to detect or download text subtitles for the stream if necessary.
- Totem.Object.signals.get_user_agent(object, mrl)¶
- Signal Name:
get-user-agent
- Flags:
- Parameters:
object (
Totem.Object
) – The object which received the signalmrl (
str
) – the MRL of the opened stream
- Returns:
allocated string representing the user-agent to use for mrl
- Return type:
The
Totem.Object
::get-user-agent
signal is emitted before opening a stream, so that plugins have the opportunity to return the user-agent to be set.
- Totem.Object.signals.metadata_updated(object, artist, title, album, track_number)¶
- Signal Name:
metadata-updated
- Flags:
- Parameters:
The
Totem.Object
::metadata-updated
signal is emitted when the metadata of a stream is updated, typically when it’s being loaded.
Property Details¶
- Totem.Object.props.current_content_type¶
-
The content-type of the current stream.
- Totem.Object.props.current_display_name¶
-
The display name of the current stream.
- Totem.Object.props.current_mrl¶
-
The MRL of the current stream.
- Totem.Object.props.current_time¶
-
The player’s position (time) in the current stream, in milliseconds.
- Totem.Object.props.main_page¶
-
The name of the current main page (usually “grilo”, or “player”).