IWMPClosedCaption::put_SAMILang method (wmp.h)
[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 put_SAMILang method specifies the language displayed for closed captioning.
Syntax
HRESULT put_SAMILang(
[in] BSTR bstrSAMILang
);
Parameters
[in] bstrSAMILang
Pointer to a BSTR containing the language.
Return value
The method returns an HRESULT. Possible values include, but are not limited to, those in the following table.
Return code | Description |
---|---|
|
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
Requirement | Value |
---|---|
Minimum supported client | Windows Media Player 9 Series or later. |
Target Platform | Windows |
Header | wmp.h |
DLL | Wmp.dll |