LanguageControl

Overview | Package | Class | Use | Tree | Deprecated | Index | Help

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.davic.media
Interface LanguageControl

All Superinterfaces:
  Control

All Known Subinterfaces:
  AudioLanguageControl, SubtitlingEventControl, SubtitlingLanguageControl

    public interface LanguageControl

extends Control

This interface is the base interface for both audio and subtitling language control. This interface should never be implemented in a control alone, but always either as audio or subtitling language control. If a language can not be selected because the user/application is not entitled to access it, the language is reset to that before the invocation of the method. If more than one stream with the same language exists, the behaviour of selectLanguage(String)is to select the first listed in the network signalling. NOTE:This is equivalent to item b under 11.4.2.3,"Default media player behaviour".

Method Summary
`String` | `getCurrentLanguage()` Returns the language code of the currently selected language.
`String[]` | `listAvailableLanguages()` Provides the application a list of available languages.
`String` | `selectDefaultLanguage()` Changes the language to the default language determined by the implementation.
`void` | `selectLanguage(String lang)` Changes the language to the language given in the parameter.

Methods inherited from interface javax.media.Control
`getControlComponent`

Method Detail

### listAvailableLanguages

    String[] listAvailableLanguages()

  Provides the application a list of available languages. The returned strings contain three letter language codes according to ISO 639 standard. If there are no selectable languages, the method returns an array of length zero.

### selectLanguage

    void selectLanguage(String lang)
                        throws LanguageNotAvailableException,
                               NotAuthorizedException

  Changes the language to the language given in the parameter.

  Parameters:
    `lang` - the desired language code according to the ISO 639 standard.
  Throws:
    `LanguageNotAvailableException` - if the language given in the parameter is not available,
    `NotAuthorizedException` - if access to the required language is not permitted

### getCurrentLanguage

    String getCurrentLanguage()

  Returns the language code of the currently selected language. If this information is not available, a String of length zero is returned.

### selectDefaultLanguage

    String selectDefaultLanguage()
                                 throws NotAuthorizedException

  Changes the language to the default language determined by the implementation.

  Returns:
    the language code of the default language.
  Throws:
    `NotAuthorizedException` - If access to the default language is not permitted

Overview | Package | Class | Use | Tree | Deprecated | Index | Help

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD