KDE 4.2 PyKDE API Reference

- KDE's Python API

# MediaController Class Reference

`from PyKDE4.phonon import *`

Inherits: QObject
Namespace: Phonon

## Detailed Description

\class MediaController mediacontroller.h Phonon/MediaController Controls optional features of a media file/device like title, chapter, angle.

Author:
  Matthias Kretz <kretz@kde.org>

## Enumerations

Feature | { Angles, Chapters, Titles }

## Signals

| angleChanged (int angleNumber)
| availableAnglesChanged (int availableAngles)
| availableAudioChannelsChanged ()
| availableChaptersChanged (int availableChapters)
| availableSubtitlesChanged ()
| availableTitlesChanged (int availableTitles)
| chapterChanged (int chapterNumber)
| titleChanged (int titleNumber)

## Methods

| __init__ (self, Phonon.MediaObject parent)
| angleChanged (self, int angleNumber)
bool | autoplayTitles (self)
int | availableAngles (self)
| availableAnglesChanged (self, int availableAngles)
[Phonon::AudioChannelDescription] | availableAudioChannels (self)
| availableAudioChannelsChanged (self)
int | availableChapters (self)
| availableChaptersChanged (self, int availableChapters)
[Phonon::SubtitleDescription] | availableSubtitles (self)
| availableSubtitlesChanged (self)
int | availableTitles (self)
| availableTitlesChanged (self, int availableTitles)
| chapterChanged (self, int chapterNumber)
int | currentAngle (self)
Phonon.AudioChannelDescription | currentAudioChannel (self)
int | currentChapter (self)
Phonon.SubtitleDescription | currentSubtitle (self)
int | currentTitle (self)
| nextTitle (self)
| previousTitle (self)
| setAutoplayTitles (self, bool a0)
| setCurrentAngle (self, int angleNumber)
| setCurrentAudioChannel (self, Phonon.AudioChannelDescription stream)
| setCurrentChapter (self, int chapterNumber)
| setCurrentSubtitle (self, Phonon.SubtitleDescription stream)
| setCurrentTitle (self, int titleNumber)
Phonon.MediaController.Features | supportedFeatures (self)
| titleChanged (self, int titleNumber)

## Method Documentation

__init__ | ( | self, |
|  | Phonon.MediaObject | parent
| ) |  |  |

angleChanged | ( | self, |
|  | int | angleNumber
| ) |  |  |

Signal syntax:
  `QObject.connect(source, SIGNAL("angleChanged(int)"), target_slot)`

bool autoplayTitles | ( |  | self ) |

int availableAngles | ( |  | self ) |

availableAnglesChanged | ( | self, |
|  | int | availableAngles
| ) |  |  |

Signal syntax:
  `QObject.connect(source, SIGNAL("availableAnglesChanged(int)"), target_slot)`

[Phonon::AudioChannelDescription] availableAudioChannels | ( |  | self ) |

Returns the audio streams that can be selected by the user. The strings can directly be used in the user interface.

See also:
  selectedAudioChannel

See also:
  setCurrentAudioChannel

availableAudioChannelsChanged | ( |  | self ) |

Signal syntax:
  `QObject.connect(source, SIGNAL("availableAudioChannelsChanged()"), target_slot)`

int availableChapters | ( |  | self ) |

availableChaptersChanged | ( | self, |
|  | int | availableChapters
| ) |  |  |

Signal syntax:
  `QObject.connect(source, SIGNAL("availableChaptersChanged(int)"), target_slot)`

[Phonon::SubtitleDescription] availableSubtitles | ( |  | self ) |

Returns the subtitle streams that can be selected by the user. The strings can directly be used in the user interface.

See also:
  selectedSubtitle

See also:
  setCurrentSubtitle

availableSubtitlesChanged | ( |  | self ) |

Signal syntax:
  `QObject.connect(source, SIGNAL("availableSubtitlesChanged()"), target_slot)`

int availableTitles | ( |  | self ) |

availableTitlesChanged | ( | self, |
|  | int | availableTitles
| ) |  |  |

Signal syntax:
  `QObject.connect(source, SIGNAL("availableTitlesChanged(int)"), target_slot)`

chapterChanged | ( | self, |
|  | int | chapterNumber
| ) |  |  |

Signal syntax:
  `QObject.connect(source, SIGNAL("chapterChanged(int)"), target_slot)`

int currentAngle | ( |  | self ) |

Phonon.AudioChannelDescription currentAudioChannel | ( |  | self ) |

Returns the selected audio stream.

See also:
  availableAudioChannels

See also:
  setCurrentAudioChannel

int currentChapter | ( |  | self ) |

Phonon.SubtitleDescription currentSubtitle | ( |  | self ) |

Returns the selected subtitle stream.

See also:
  availableSubtitles

See also:
  setCurrentSubtitle

int currentTitle | ( |  | self ) |

nextTitle | ( |  | self ) |

Skips to the next title.

If it was playing before the title change it will start playback on the next title if autoplayTitles is enabled.

previousTitle | ( |  | self ) |

Skips to the previous title.

If it was playing before the title change it will start playback on the previous title if autoplayTitles is enabled.

setAutoplayTitles | ( | self, |
|  | bool | a0
| ) |  |  |

setCurrentAngle | ( | self, |
|  | int | angleNumber
| ) |  |  |

setCurrentAudioChannel | ( | self, |
|  | Phonon.AudioChannelDescription | stream
| ) |  |  |

Selects an audio stream from the media.

Some media formats allow multiple audio streams to be stored in the same file. Normally only one should be played back.

Parameters:

  | stream | Description of an audio stream

See also:
  availableAudioChannels()

See also:
  currentAudioChannel()

setCurrentChapter | ( | self, |
|  | int | chapterNumber
| ) |  |  |

setCurrentSubtitle | ( | self, |
|  | Phonon.SubtitleDescription | stream
| ) |  |  |

Selects a subtitle stream from the media.

Some media formats allow multiple subtitle streams to be stored in the same file. Normally only one should be displayed.

Parameters:

  | stream | description of a subtitle stream

See also:
  availableSubtitles()

See also:
  currentSubtitle()

setCurrentTitle | ( | self, |
|  | int | titleNumber
| ) |  |  |

Skips to the given title titleNumber.

If it was playing before the title change it will start playback on the new title if autoplayTitles is enabled.

Phonon.MediaController.Features supportedFeatures | ( |  | self ) |

titleChanged | ( | self, |
|  | int | titleNumber
| ) |  |  |

Signal syntax:
  `QObject.connect(source, SIGNAL("titleChanged(int)"), target_slot)`

## Enumeration Documentation

Feature

Enumerator:

  Angles = 1 |
  Chapters = 2 |
  Titles = 4 |