次の方法で共有


Detailed Object Model Comparison

[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 following table compares the Windows Media Player 6.4 object model properties with the Windows Media Player 7 or later object model.

Windows Media Player 6.4 property Windows Media Player 7 or later equivalent
Player6.AllowChangeDisplaySize The display of Windows Media Player 7 or later automatically resizes to fit the media. You can set the height and width properties in the <OBJECT> tag or in script.
Player6.AllowScan Controls. fastForward and Controls.fastReverse are automatically enabled for file types that support these methods.
Player6.AnglesAvailable Not available.
Player6.AnimationAtStart Not available.
Player6.AudioStream Use Controls.currentAudioLanguageIndex.
Player6.AudioStreamsAvailable Use Controls.audioLanguageCount.
Player6.AutoRewind Use Controls.currentPosition in script to specify or retrieve the current position. Alternatively, use markers and the Player.markerHit event.
Player6.AutoSize Automatic sizing is the default behavior. To override automatic sizing, set the height and width properties in the <OBJECT> tag or in script.
Player6.AutoStart Use Settings.autoStart.
Player6.Balance Use Settings.balance.
Player6.Bandwidth Use Network.bandWidth.
Player6.BaseURL Use Settings.baseURL.
Player6.BufferingCount Use Network.bufferingCount.
Player6.BufferingProgress Use Network.bufferingProgress.
Player6.BufferingTime Use Network.bufferingTime.
Player6.ButtonsAvailable Not available.
Player6.CanPreview Not available.
Player6.CanScan Use Controls.isAvailable("FastForward") and Controls.isAvailable("FastReverse").
Player6.CanSeek Use Controls.isAvailable to test whether a particular seek method can be performed.
Player6.CanSeekToMarkers Use Controls.isAvailable("CurrentMarker"). Use Media.markerCount to retrieve the count of markers in a particular media item. Use Controls.currentMarker to specify or retrieve the current marker number.
Player6.CaptioningID Use ClosedCaption.captioningID.
Player6.CCActive Not available. See Closed Captioning for information about how closed captioning has changed in Windows Media Player.
Player6.ChannelDescription Not available.
Player6.ChannelName Not available.
Player6.ChannelURL Not available.
Player6.ClickToPlay Not available. You should provide controls in your user interface to start playback. Alternatively, the user can right-click the video image to open a pop-up menu that contains a Play/Pause selection if Player.enableContextMenu equals true.
Player6.ClientID Not available.Windows Media Player 9 Series or later allows the user to select whether a unique Player ID is transmitted to content providers.
If the user selects this option, the Player sends a unique ID to the Windows Media server. The ID is logged in the server's log file, located in the ..system32\logfiles folder by default. The log field name is "c-playerid". Server logging is not enabled by default in Windows Media Services.
If the user does not select this option, the server generates a random session ID, which is unique for each client for a given session.
For more information, see the Windows Media Services 9 Series documentation.
Player6.CodecCount Not available.
Player6.ColorKey Not available.
Player6.ConnectionSpeed Not available. Use Network.bitRate to determine the current bit rate.
Player6.ContactAddress Not available.
Player6.ContactEmail Not available.
Player6.ContactPhone Not available.
Player6.CreationDate Use MediaCollection.getMediaAtom("CreationDate") to retrieve the index of the creation date atom. Use Media.getItemInfoByAtom to retrieve the metadata.
Player6.CurrentAngle Not available.
Player6.CurrentAudioStream Use Controls.currentAudioLanguageIndex.
Player6.CurrentButton Not available.
Player6.CurrentCCService Not available.
Player6.CurrentChapter Retrieve the current playlist. If the current playlist is not the same one as the playlist returned by Cdrom.playlist, then there is no current chapter. Otherwise, the current chapter number is the index of the current media in the current playlist.
Player6.CurrentDiscSide Not available.
Player6.CurrentDomain Use DVD.domain.
Player6.CurrentMarker Use Controls.currentMarker.
Player6.CurrentPosition Use Controls.currentPosition.
Player6.CurrentSubpictureStream Not available.
Player6.CurrentTime Use Controls.currentPositionTimeCode, Controls.currentPositionString, or Controls.currentPosition.
Player6.CurrentTitle Retrieve the current playlist. If the current playlist is the same one as the playlist returned by Cdrom.playlist, then the title number is the index of the current media in the current playlist.
Player6.CurrentVolume Not available.
Player6.CursorType Not available. Use Internet Explorer styles instead.
Player6.DefaultFrame Use Settings.defaultFrame, or use a <PARAM> attribute in the <OBJECT> element:
<PARAM NAME="defaultFrame" VALUE="right">
Player6.DisplayBackColor Not available.
Player6.DisplayForeColor Not available.
Player6.DisplayMode The current position can be retrieved in seconds from the beginning as a Number using Controls.currentPosition, as a String formatted as HH:MM:SS (hours, minutes, seconds) using Controls.currentPositionString, or in time code format using Controls.currentPositionTimeCode.
Player6.DisplaySize The default display automatically resizes to fit the media. You can set the height and width properties in the <OBJECT> tag, or in script. Use Player.fullScreen to switch to full-screen mode.
Player6.Duration Use Media.duration.
Player6.DVD Use Player.DVD.
Player6.EnableContextMenu Use Player.enableContextMenu.
Player6.Enabled Use Player.enabled.
Player6.EnableFullScreenControls When using Windows Media Player 9 Series or later, full-screen controls are enabled automatically unless Player.uiMode = "none".
Player6.EnablePositionControls Not available. You can provide custom controls or use Player.uimode to choose a default configuration.
Player6.EnableTracker Not available. You can provide a custom control or use Player.uimode to choose a default configuration.
Player6.EntryCount Use Playlist.count
Player6.ErrorCode Use ErrorItem.errorCode.
Player6.ErrorCorrection Not available.
Player6.ErrorDescription Use ErrorItem.errorDescription.
Player6.FileName Use Player.URL or Player.currentMedia. Use Controls.currentItem when working within a playlist.
Player6.FramesPerSecond Not available.
Player6.HasError Use Error.errorCount.
Player6.HasMultipleItems Not available.
Player6.ImageSourceHeight Use Media.imageSourceHeight.
Player6.ImageSourceWidth Use Media.imageSourceWidth.
Player6.InvokeURLs Use Settings.invokeURLs.
Player6.IsBroadcast Use Network.sourceProtocol.
Player6.IsDurationValid Not available. Media.duration contains a valid value when used with the current media object.
Player6.Language Use Controls.currentAudioLanguage
Player6.LostPackets Use Network.lostPackets.
Player6.MarkerCount Use Media.markerCount.
Player6.Mute Use Settings.mute.
Player6.OpenState Use Player.openState.
Player6.PlayCount Use Settings.playCount.
Player6.PlayState Use Player.playState.
Player6.PreviewMode Not available. Use a script loop structure with an HTML timer to duplicate this functionality.
Player6.Rate Use Settings.rate.
Player6.ReadyState Use Player.openState.
Player6.ReceivedPackets Use Network.receivedPackets.
Player6.ReceptionQuality Use Network.receptionQuality.
Player6.RecoveredPackets Use Network.recoveredPackets.
Player6.Root Not available.
Player6.SAMIFileName Use ClosedCaption.SAMIFileName.
Player6.SAMILang Use ClosedCaption.SAMILang.
Player6.SAMIStyle Use ClosedCaption.SAMIStyle.
Player6.SelectionEnd Use Media.duration to determine the length of a Media object. Use a marker with Controls.currentMarker to specify a custom end position.
Player6.SelectionStart Use Controls.currentPosition to start playback from a particular position or use a marker with Controls.currentMarker to specify a custom start position.
Player6.SendErrorEvents Errors are queued. Use the Error object and the ErrorItem object to retrieve error information.
Player6.SendKeyboardEvents Not available.
Player6.SendMouseClickEvents Not available.
Player6.SendMouseMoveEvents Not available.
Player6.SendOpenStateChangeEvents Not available.
Player6.SendPlayStateChangeEvents Not available.
Player6.SendWarningEvents Not available.
Player6.ShowAudioControls Not available. You can provide custom controls or use Player.uimode to choose a default configuration.
Player6.ShowCaptioning Not available. You can provide a custom closed caption display.
Player6.ShowControls Not available. You can provide custom controls or use Player.uimode to choose a default configuration.
Player6.ShowDisplay Not available.
Player6.ShowGotoBar Not available. You can provide custom functionality using the Media object
Player6.ShowPositionControls Not available. You can provide custom controls or use Player.uimode to choose a default configuration.
Player6.ShowStatusBar Not available. You can provide custom controls or use Player.uimode to choose a default configuration.
Player6.ShowTracker Not available. You can provide custom controls or use Player.uimode to choose a default configuration.
Player6.SourceLink Use Media.sourceURL.
Player6.SourceProtocol Use Network.sourceProtocol.
Player6.StreamCount Not available. Use Controls.audioLanguageCount to retrieve the number of audio language streams.
Player6.SubpictureOn Not available.
Player6.SubpictureStreamsAvailable Not available
Player6.TitlesAvailable Use the following:Player.Cdrom.playlist.count - 1
Player6.TotalTitleTime Use currentMedia.duration or currentMedia.durationString.
Player6.TransparentAtStart Use script to specify the height and width values to make the player visible or invisible.
Player6.UniqueID Not available.
Player6.VideoBorder3D Not available.
Player6.VideoBorderColor Not available.
Player6.VideoBorderWidth Not available.
Player6.Volume Use Settings.Volume.
Player6.VolumesAvailable Not available.

The following table compares the Windows Media Player version 6.4 object model methods with the Windows Media Player 7 or later object model.

Windows Media Player 6.4 method Windows Media Player 7 or later equivalent
Player6.AboutBox Use Player.versionInfo to retrieve the version of Windows Media Player.
Player6.BackwardScan Use Settings.rate.
Player6.ButtonActivate Not available.
Player6.ButtonSelectAndActivate Not available.
Player6.Cancel Not available.
Player6.ChapterPlay If already playing the specified title playlist, retrieve the desired chapter as a media object using the following syntax:
var media = Player.currentPlaylist.item(index);
Then, specify Player.currentMedia using the media object returned.
Player6.ChapterPlayAutoStop Not available.
Player6.ChapterSearch If already playing the specified title playlist, retrieve the desired chapter as a media object using the following syntax:
var media = Player.currentPlaylist.item(index);
Then, specify Player.currentMedia using the media object returned.
Player6.FastForward Use Controls.fastForward.
Player6.FastReverse Use Controls.fastReverse.
Player6.ForwardScan Use Settings.rate.
Player6.GetAllGPRMs Not available.
Player6.GetAllSPRMs Not available.
Player6.GetAudioLanguage Use Controls.currentAudioLanguage to retrieve the LCID of the current audio language.
Player6.GetCodecDescription Not available.
Player6.GetCodecInstalled Not available.
Player6.GetCodecURL Use ErrorItem.customUrl.
Player6.GetCurrentEntry Use script to loop through the current playlist. Use Media.isIdentical to compare each entry in the playlist to the Player.currentMedia object.
Player6.GetMarkerName Use Media.getMarkerName.
Player6.GetMarkerTime Use Media.getMarkerTime.
Player6.GetMediaInfoString Use Media.getItemInfo, Media.getItemInfoByAtom, and their associated methods to retrieve metadata.
Player6.GetMediaParameter Use Playlist.item to retrieve a media item. Then use Media.getItemInfo to retrieve the parameter string.
Player6.GetMediaParameterName Use Playlist.item to retrieve a media item. Then use Media.getAttributeName to retrieve the parameter string.
Player6.GetMoreInfoURL Not available.
Player6.GetNumberOfChapters If a title is currently playing, use currentPlaylist.count.
Player6.GetStreamGroup Not available.
Player6.GetStreamName Not available.
Player6.GetStreamSelected Not available.
Player6.GetSubpictureLanguage Not available.
Player6.GoUp Use DVD.back.
Player6.IsSoundCardEnabled Not available.
Player6.LeftButtonSelect Not available.
Player6.LowerButtonSelect Not available.
Player6.MenuCall Use DVD.titleMenu or DVD.topMenu.
Player6.Next Use Controls.next.
Player6.NextPGSearch Use Controls.next.
Player6.Open Use Player.URL or Player.currentMedia. Files always open asynchronously.
Player6.Pause Use Controls.pause.
Player6.Play Use Controls.play.
Player6.Previous Use Controls.previous.
Player6.PrevPGSearch Use Controls.previous.
Player6.ResumeFromMenu Use DVD.resume.
Player6.RightButtonSelect Not available.
Player6.SetCurrentEntry Retrieve a media object using currentPlaylist.item(entryNumber). Then, specify the retrieved media object using Controls.currentItem.
Player6.ShowDialog Not available.
Player6.StillOff Use Controls.play. Alternatively, use Controls.Next if currently in still mode.
Player6.Stop Use Controls.stop.
Player6.StreamSelect Not available. Use Controls.currentAudioLanguage to specify an audio language stream.
Player6.TimePlay From the root playlist, use currentPlaylist.item(index) to retrieve a media object. Then, set the media object as the current one using Controls.currentItem. Then, specify Controls.currentPosition using a time value in seconds.
Player6.TimeSearch Use Controls.currentPosition.
Player6.TitlePlay If already playing the specified title playlist, retrieve the desired chapter as a media object using the following syntax:
var media = Player.currentPlaylist.item(index);
Then, specify Player.currentMedia using the media object returned.
Alternatively, use currentPlaylist.item to retrieve a media object, and then use the media object returned to specify Controls.currentItem.
Player6.TopPGSearch Not available.
Player6.UOPValid Not available
Player6.UpperButtonSelect Not available.

The following table compares the Windows Media Player version 6.4 object model events with the Windows Media Player 7 or later object model.

Windows Media Player 6.4 event Windows Media Player 7 or later equivalent
Player6.Buffering Use Player.Buffering.
Player6.Click Use Player.Click
Player6.DblClick Use Player.DoubleClick
Player6.Disconnect Not available.
Player6.DisplayModeChange Not available.
Player6.DVDNotify Player.DomainChange and Player.OpenPlaylistSwitch are DVD-specific events. Other events related to playlists, media, and CD-ROM media may apply as well depending on the application.
Player6.EndOfStream Use Player.PlayState.
Player6.Error The event is unchanged. Errors, however, are queued. Use the Error object with the ErrorItem object to retrieve error information from the queue. See the example code in the preceding section, Error handling.
Player6.KeyDown Use Player.Keydown
Player6.KeyPress Use Player.KeyPress
Player6.KeyUp Use Player.KeyUp
Player6.MarkerHit Use Player.MarkerHit.
Player6.MouseDown Use Player.MouseDown
Player6.MouseMove Use Player.MouseMove
Player6.MouseUp Use Player.MouseUp
Player6.NewStream Use Player.OpenStateChange
Player6.OpenStateChange Use Player.OpenStateChange.
Player6.PlayStateChange Use Player.PlayStateChange.
Player6.PositionChange Use Player.PositionChange.
Player6.ReadyStateChange Use Player.PlayStateChange.
Player6.ScriptCommand Use Player.ScriptCommand.
Player6.Warning Not available.

Object Model Migration Guide

Object Model Reference for Scripting