Module: Clutter::Media

Defined in:
(unknown)

Overview

Clutter::Media is an opaque structure whose members cannot be directly accessed

Instance Method Summary collapse

Instance Method Details

#audio_volumeFloat

Retrieves the playback volume of media.

Returns:

  • (Float)

    The playback volume between 0.0 and 1.0

#audio_volume=(volume) ⇒ nil

Sets the playback volume of media to volume.

Parameters:

  • volume (Float)

    the volume as a double between 0.0 and 1.0

Returns:

  • (nil)

#buffer_fillFloat

Retrieves the amount of the stream that is buffered.

Returns:

  • (Float)

    the fill level, between 0.0 and 1.0

#can_seekBoolean

Retrieves whether media is seekable or not.

Returns:

  • (Boolean)

    true if media can seek, false otherwise.

#durationFloat

Retrieves the duration of the media stream that media represents.

Returns:

  • (Float)

    the duration of the media stream, in seconds

#eos(media) ⇒ nil

Parameters:

Returns:

  • (nil)

#error(media, error) ⇒ nil

Parameters:

Returns:

  • (nil)

#filename=(filename) ⇒ nil

Sets the source of media using a file path.

Parameters:

  • filename (String)

    A filename

Returns:

  • (nil)

#playingBoolean

Retrieves the playing status of media.

Returns:

  • (Boolean)

    true if playing, false if stopped.

#playing=(playing) ⇒ nil

Starts or stops playing of media.

The implementation might be asynchronous, so the way to know whether the actual playing state of the media is to use the #GObject::notify signal on the Clutter::Media:playing property and then retrieve the current state with clutter_media_get_playing(). ClutterGstVideoTexture in clutter-gst is an example of such an asynchronous implementation.

Parameters:

  • playing (Boolean)

    true to start playing

Returns:

  • (nil)

#progressFloat

Retrieves the playback progress of media.

Returns:

  • (Float)

    the playback progress, between 0.0 and 1.0

#progress=(progress) ⇒ nil

Sets the playback progress of media. The progress is a normalized value between 0.0 (begin) and 1.0 (end).

Parameters:

  • progress (Float)

    the progress of the playback, between 0.0 and 1.0

Returns:

  • (nil)

#subtitle_font_nameString

Retrieves the font name currently used.

Returns:

  • (String)

    a string containing the font name. Use g_free() to free the returned string

#subtitle_font_name=(font_name) ⇒ nil

Sets the font used by the subtitle renderer. The font_name string must be either nil, which means that the default font name of the underlying implementation will be used; or must follow the grammar recognized by pango_font_description_from_string() like:

|[ clutter_media_set_subtitle_font_name (media, "Sans 24pt"); ]|

Parameters:

  • font_name (String)

    a font name, or nil to set the default font name

Returns:

  • (nil)

#subtitle_uriString

Retrieves the URI of the subtitle file in use.

Returns:

  • (String)

    the URI of the subtitle file. Use g_free() to free the returned string

#subtitle_uri=(uri) ⇒ nil

Sets the location of a subtitle file to display while playing media.

Parameters:

  • uri (String)

    the URI of a subtitle file

Returns:

  • (nil)

#uriString

Retrieves the URI from media.

Returns:

  • (String)

    the URI of the media stream. Use g_free() to free the returned string

#uri=(uri) ⇒ nil

Sets the URI of media to uri.

Parameters:

  • uri (String)

    the URI of the media stream

Returns:

  • (nil)