ClapperGtk.Audio

g ClapperGtk.Audio ClapperGtk.Audio ClapperGtk.Av ClapperGtk.Av ClapperGtk.Av->ClapperGtk.Audio GObject.GInterface GObject.GInterface Gtk.Accessible Gtk.Accessible GObject.GInterface->Gtk.Accessible Gtk.Buildable Gtk.Buildable GObject.GInterface->Gtk.Buildable Gtk.ConstraintTarget Gtk.ConstraintTarget GObject.GInterface->Gtk.ConstraintTarget GObject.InitiallyUnowned GObject.InitiallyUnowned Gtk.Widget Gtk.Widget GObject.InitiallyUnowned->Gtk.Widget GObject.Object GObject.Object GObject.Object->GObject.InitiallyUnowned Gtk.Accessible->Gtk.Widget Gtk.Buildable->Gtk.Widget Gtk.ConstraintTarget->Gtk.Widget Gtk.Widget->ClapperGtk.Av

Subclasses:

None

Methods

Inherited:

ClapperGtk.Av (4), Gtk.Widget (183), GObject.Object (37), Gtk.Accessible (18), Gtk.Buildable (1)

Structs:

Gtk.WidgetClass (18), GObject.ObjectClass (5)

class

new ()

get_child ()

set_child (child)

Virtual Methods

Inherited:

Gtk.Widget (25), GObject.Object (7), Gtk.Accessible (7), Gtk.Buildable (9)

Properties

Inherited:

ClapperGtk.Av (3), Gtk.Widget (35), Gtk.Accessible (1)

Name

Type

Flags

Short Description

child

Gtk.Widget

r/w

Signals

Inherited:

Gtk.Widget (13), GObject.Object (1)

Fields

Inherited:

Gtk.Widget (13), GObject.Object (1)

Class Details

class ClapperGtk.Audio(**kwargs)
Bases:

ClapperGtk.Av

Abstract:

No

Structure:

ClapperGtk.AudioClass

A GTK widget for audio playback with Clapper API.

ClapperGtk.Audio is a widget meant for integrating audio playback within GTK application. It exposes [class`Clapper`.Player] through its base class [property`ClapperGtk`.Av:player] property.

Other widgets (buttons, seek bar, etc.) provided by ClapperGtk library, once placed anywhere inside audio container (including nesting within another widget like [class`Gtk`.Box]) will automatically control ClapperGtk.Audio they are within. This allows to freely create custom UI best suited for specific application.

Basic usage

A typical use case is to embed audio widget as part of your app where audio playback is needed (can be even the very first child of the window). Get the [class`Clapper`.Player] belonging to the AV widget and start adding new [class`Clapper`.MediaItem] items to the [class`Clapper`.Queue] for playback. For more information please refer to the Clapper playback library documentation.

Actions

You can use built-in actions of parent [class`ClapperGtk`.Av]. See its documentation for the list of available ones.

ClapperGtk.Audio as Gtk.Buildable

ClapperGtk.Audio implementation of the [iface`Gtk`.Buildable] interface supports placing a single widget (which might then hold multiple widgets) as <child> element.

``xml <object class=”ClapperGtkAudio” id=”audio”>

<child>
<object class=”GtkBox”>

<property name=”orientation”>horizontal</property> <child>

<object class=”ClapperGtkPreviousItemButton”>

</child> <child>

<object class=”ClapperGtkTogglePlayButton”>

</child> <child>

<object class=”ClapperGtkNextItemButton”>

</child>

</object>

</child>

</object> ``

New in version 0.10.

classmethod new()
Returns:

a new audio Gtk.Widget.

Return type:

Gtk.Widget

Creates a new ClapperGtk.Audio instance.

Newly created audio widget will also have set “scaletempo” GStreamer element as default audio filter on its [class`Clapper`.Player] and disable video and subtitle streams. This can be changed after construction by setting corresponding player properties.

get_child()
Returns:

Gtk.Widget set as child.

Return type:

Gtk.Widget or None

Get a child Gtk.Widget of self.

set_child(child)
Parameters:

child (Gtk.Widget or None) – a Gtk.Widget

Set a child Gtk.Widget of self.

Property Details

ClapperGtk.Audio.props.child
Name:

child

Type:

Gtk.Widget

Default Value:

None

Flags:

READABLE, WRITABLE

The child widget of ClapperGtkAudio.