Using DVD Methods
DVD-specific methods are called on the Windows Media Player control's DVD property, which then resolves to a MediaPlayer object, as indicated in the following syntax.
MediaPlayer.DVD.ChapterPlay( Title, Chapter )
For standard playback functionality (pause, play, and stop), DVD-specific methods have not been created. Use the following Windows Media Player control methods.
In most cases, the standard Windows Media Player control Pause, Play, and Stop methods function correctly. However, when toggling between Play and the digital video disc (DVD) methods BackwardScan and ForwardScan, the methods will not interact. To correctly implement these methods in tandem, add a flag to track whether your application is scanning through the DVD when the Play method is called.
For example, the following code uses a flag called isScanning to determine whether the DVD is being scanned. If it is, ForwardScan is called with a parameter of 1 to reduce the scanning speed to standard playing speed; otherwise, the Play method is called.
Dim isScanning
isScanning = False
Sub cmdPlay_OnClick()
If isScanning Then
MediaPlayer1.DVD.ForwardScan(1)
Else
MediaPlayer1.Play()
End If
isScanning = False
End Sub
'Call this when you want to fast forward through the DVD
Sub cmdFastForward_OnClick()
isScanning = True
MediaPlayer1.DVD.ForwardScan(5)
End Sub
'Call this when you want to rewind through the DVD
Sub cmdRewind_OnClick()
isScanning = True
MediaPlayer1.DVD.BackwardScan(5)
End Sub
Note Using the Stop method is not recommended, because it discontinues DVD playback. To continue DVD playback, you must restart the video from the beginning by calling the Play method or refreshing the page. To avoid this, use the Pause method to stop the video and the Play method to resume the video.
The Windows Media Player control supports the following DVD methods. For more information, see Windows Media Player Object Model Version 6.4 Methods.
- BackwardScan
- ButtonActivate
- ButtonSelectAndActivate
- ChapterPlay
- ChapterPlayAutoStop
- ChapterSearch
- ForwardScan
- GetAllGPRMs
- GetAllSPRMs
- GetAudioLanguage
- GetNumberOfChapters
- GetSubpictureLanguage
- GoUp
- LeftButtonSelect
- LowerButtonSelect
- MenuCall
- NextPGSearch
- PrevPGSearch
- ResumeFromMenu
- RightButtonSelect
- StillOff
- TimePlay
- TimeSearch
- TitlePlay
- TopPGSearch
- UOPValid
- UpperButtonSelect