Windows Media Player 11 SDK ClosedCaption.SAMILang 

Windows Media Player SDK banner art

Previous Next

ClosedCaption.SAMILang

The SAMILang property specifies or retrieves the language displayed for closed captioning.

Syntax

  player.closedCaption. 

Possible Values

This property is a read/write String.

Remarks

A SAMI file can contain text for one or many languages. The languages available for closed captioning are defined between the <STYLE> and </STYLE> tags in the SAMI file. A language identifier is specified with a unique alphanumeric string that is preceded by a period (.). The name specified for a language can be any string. For example, the following could be used to define US English:

.ENUSCC {Name:'English Captions' lang: en-US; SAMIType:CC;}

If no SAMI language is specified, the first language defined in the SAMI file is used by default.

The value you pass using ClosedCaption.SAMILang must match the Name attribute in the language specifier.

Windows Media Player 10 Mobile: This property is read only, and always returns an empty string.

Example Code

The following JScript example uses ClosedCaption.SAMILang in an HTML SELECT element to specify the closed caption language. The Player object was created with ID = "Player".

  

Requirements

Version: Windows Media Player version 7.0 or later.

Library: Use wmp.dll.

See Also

Previous Next