SAMILang

来源:互联网 发布:软件开发 什么方向 编辑:程序博客网 时间:2024/06/06 07:41

ClosedCaption.SAMILang

ClosedCaption.SAMILang

 

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

Syntax

player.closedCaption.SAMILang

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:

Copy Code
.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.

Examples

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".

Copy Code
<!-- Create the SELECT element. --><SELECT ID = CCLANG  NAME = "CCLANG"  LANGUAGE = "JScript"     /* Set the closed caption language when the SELECT element changes. */        onChange = "Player.closedCaption.SAMILang = CCLANG.value;        ">        /* Fill in the SELECT element options. */           <OPTION VALUE = "'Spanish Captions'">Spanish           <OPTION VALUE = "'Japanese Captions'">Japanese           <OPTION VALUE = "'English Captions'">English           <OPTION VALUE = "'French Captions'">French           <OPTION VALUE = "'German Captions'" SELECTED>German</SELECT>
原创粉丝点击