Share via


Windows Media Player 11 SDK IWMPClosedCaption::put_SAMILang 

Windows Media Player SDK banner art

Previous Next

IWMPClosedCaption::put_SAMILang

The put_SAMILang method specifies the language displayed for closed captioning.

Syntax

  HRESULT put_SAMILang(
  BSTR  bstrSAMILang
);

Parameters

bstrSAMILang

[in]  Pointer to a BSTR containing the language.

Return Values

The method returns an HRESULT. Possible values include, but are not limited to, those in the following table.

Return code Description
S_OK The method succeeded.

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 specify using put_SAMILang must match the Name attribute in the language specifier.

Windows Media Player 10 Mobile: This method always returns E_INVALIDARG.

Requirements

Version: Windows Media Player 9 Series or later.

Header: Include wmp.h.

Library: Use wmp.dll.

See Also

Previous Next