Windows Media Player 11 SDK ClosedCaption.SAMIFileName 

Windows Media Player SDK banner art

Previous Next

ClosedCaption.SAMIFileName

The SAMIFileName property specifies or retrieves the name of the file containing the information needed for closed captioning.

Syntax

  player.closedCaption.
  

Possible Values

This property is a read/write String.

Remarks

The Synchronized Accessible Media Interchange (SAMI) file must use an .smi or .sami file name extension.

If you don't specify a value for SAMIFileName, this property retrieves a string containing the file name or URL associated with the current media item. This association can occur when a SAMI file is specified using the sami URL parameter, or automatically when the SAMI file has the same name as the digital media file name (except for the file name extension). If there is no SAMI file associated with the current media, this property retrieves an empty string ("").

Once you specify a value for SAMIFileName, that value persists until you specify a new value (or until a new media item is opened using the sami URL parameter). Therefore, you must specify a new value for this property before you play each new media item. That way, the new value for SAMIFileName will take effect when the next media item is opened (or when Player.close is called). Specifying a new value for SAMIFileName has no effect for the current media.

To cause Windows Media Player to return to using the SAMI file associated with a particular media item, specify a value for SAMIFileName equal to an empty string ("") before you play the next media item.

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

Example Code

The following three JScript examples use ClosedCaption.SAMIFileName to specify the name of a closed caption text file. 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