Compartir a través de


IWMPClosedCaption::SAMILang property

[The feature associated with this page, Windows Media Player SDK, is a legacy feature. It has been superseded by MediaPlayer. MediaPlayer has been optimized for Windows 10 and Windows 11. Microsoft strongly recommends that new code use MediaPlayer instead of Windows Media Player SDK, when possible. Microsoft suggests that existing code that uses the legacy APIs be rewritten to use the new APIs if possible.]

The SAMILang property gets or sets the language displayed for closed captioning.

Syntax

public System.String SAMILang {get; set;}

Public Property SAMILang As System.String

Property value

The System.String that is the name specified in the language identifier of a SAMI file.

Remarks

A SAMI file can contain text for one or many languages. The languages available for closed captioning are defined between the <STYLE> and 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 string you set using SAMILang must match the Name attribute in the language specifier.

Requirements

Requirement Value
Version
Windows Media Player 9 Series or later
Namespace
WMPLib
Assembly
Interop.WMPLib.dll (Interop.WMPLib.dll.dll)

See also

Adding Closed Captions to Digital Media

IWMPClosedCaption Interface (VB and C#)

IWMPClosedCaption2 Interface (VB and C#)