MedAllowZoomChange
(Byte) |
If the user right-clicks on a media file while it is playing,
he is presented with a number of options which he can set (run-time).
One of these options is the current "zoom" setting. This
property (MedAllowZoomChange) sets whether the user can change
the zoom setting from that popup window at run-time. A value of
'1' enables setting the zoom property, and a value of '2' disables it
(for reasons I won't go into). If you do not set any value it defaults
to enabled. See the GetInfo and Update methods. |
MedAutoResize
(Byte) |
If you set this to true (1), then the Media Viewer
object will resize itself each time you load a file, so that the object
(ocx) is only large enough to "fit" the file. The top-left
corner remains constant. By default this is set to 0. You
can either set this property "directly" before you call the
Load method, or once the file has loaded using the Update
method. Also works with the GetInfo method. |
MedAutoRewind
(Byte) |
Set this to True (1) to automatically rewind Media files
once they have finished playing. Set it "directly" before
calling the Load method, or set it once a file is open using the
Update method. Also works with the GetInfo method. |
MedAutoStart
(Byte) |
Set this to True (1) to automatically start playing media
files once you load them. Set it "directly" before calling
the Load method, or set it once a file is open using the Update
method. Also works with the GetInfo method. |
MedCurrentPosition
(Long) |
Holds the current "position" within the playing
file. For a 15 second clip this starts with 0.0 and ends on 15.0.
Use the GetInfo and Update methods. |
MedDuration
(String) |
Holds the expected duration (in seconds to 1 decimal place).
Note, if you are playing the file at anything other than a PlayRate
of 100%, the MedDuration property will need to be adjusted in your
calculations, as it returns the duration assuming the PlayRate
will be 100%. See the GetInfo method. |
MedEnableSlideBar
(Byte) |
Sets whether the SlideBar is enabled or disabled for the
control. Use the Update or GetInfo methods.
Valid values are true (1) or false (0). |
MedEnableToolbar
(Byte) |
Sets whether the Toolbar is enabled or disabled for the
control. Use the Update or GetInfo methods.
Valid values are true (1) or false (0). |
MedEndPosition
(Long) |
The default end position for a clip of 15 seconds would
be 15.0 (i.e. the end of the track). You can set this to a lesser
value if you want to end before then. Use the GetInfo or
Update methods. |
MedFileName
(String) |
Use the GetInfo or Update methods.
It returns something like "c:\files\file1.avi", being the name
of the file currently loaded. |
MedInfo_Author
(String) |
This property holds the name of the author for the loaded
file, if available. Use the GetInfo method. |
MedInfo_Copyright
(String) |
This property holds copyright info for the loaded file,
if available. Use the GetInfo method. |
MedInfo_Description
(String) |
This property holds a description of the loaded media file,
if available. Use the GetInfo method. |
MedInfo_FileName
(String) |
This property holds the current filename (including path)
of the loaded file. Use the GetInfo method. |
MedInfo_Rating
(String) |
This property holds rating information for the loaded file,
if available. Use the GetInfo method. |
MedInfo_Title
(String) |
This property holds the title of the loaded media file,
if available. Use the GetInfo method. |
MedMute
(Byte) |
A value of 1 mutes the sound, 0 "un-mutes" it.
If unset, defaults to 0. Use the GetInfo or Update
methods. |
MedPlayRate
(Long) |
Set the playback rate for media files. 100 is normal
speed (i.e. 100%), 50 is 50%, and so on. Set it "directly"
(ThisViewer1.MedPlayRate = 50) before calling the Load method,
or after loading a file using the Update method. Also works
with the GetInfo method. |
MedRepeatTimes
(Byte) |
Holds the number of times a file will be played / looped
before stopping. A value of 0 or 1 indicates the file will play
through once and then stop. Use the GetInfo or Update
methods. |
MedRightClick
(Byte) |
By default, if the user right-clicks on the Viewer control
a popup menu appears. Setting this property to false (0)
disables that popup window from appearing. Use the Update
or GetInfo methods.
Example:
ThisViewer1.Load ('c:\mydoc.avi')
ThisViewer1.Update('MedRightClick', false) |
MedShowGotoBar
(Byte) |
Determines whether the 'Goto Bar' drop list is hidden or
not. Use the Update or GetInfo methods - valid values
are true (1) or false (0). |
MedShowInfoWindow
(Byte) |
Determines whether the 'Clip', 'Author', and 'Copyright'
information is hidden or not. Use the Update or GetInfo
methods - valid values are true (1) or false (0). |
MedShowPositionControls
(Byte) |
Determines whether the 'Skip Back', 'Rewind', 'Fast Forward',
'Skip Forward', and 'Preview each clip in Playlist' buttons are hidden
or not. Use the Update or GetInfo methods - valid
values are true (1) or false (0). |
MedShowSlideBar
(Byte) |
Determines whether the 'Slide Bar' ('Tracker Bar') is hidden
or not. This is the bar which you can use to 'move around' in the
clip by dragging the locator on the bar. Use the Update or
GetInfo methods - valid values are true (1) or false (0). |
MedShowToolbar
(Byte) | Set to True (1) to display the native Media toolbar, or
False (0) to hide it. Either set this "directly" before
calling the Load method, or after a file has loaded using the
Update method. Also works with the GetInfo method. |
MedSoundCard
(Byte) | Use the GetInfo method. A value of 1 means
that a soundcard is present on the PC. |
MedStartPosition
(Long) | The default start position for a clip is at 0.0 (i.e. the
beginning of the track). You can set this to any value though, to
start playing the clip at a point other than at the beginning. Use
the Update or GetInfo methods. |
MedVolume
(Long) | This property holds the current playback volume.
This can be any value from -1 (max volume) to -9640 (min volume).
If unset this defaults to -600. Use the Update or GetInfo
methods. |
MedZoom
(Byte) | This property determines the visual "size" of
the movie clip which you load. It can hold one of 8 possible values,
as outlined below:
- 100 - 100%, or the default size
- 50 - 50%, or half the default size
- 200 - 200%, or double the default size
- 1 - Full screen
- 2 - Fit to size
- 3 - 1/16th of the screen size
- 4 - 1/4 of the screen size
- 5 - 1/2 of the screen size
If unset, this property defaults to 100. Use the Update or
GetInfo methods. Note that some settings only work with certain
file formats, such as Full Screen works with Mpeg, but not AVI.
Example:
ThisViewer1.Load ( 'c:\MyFile.mpg' )
! Load the clip
ThisViewer1.Wait(2) ! Gives the ocx time
to finish loading
ThisViewer1.Update('MedZoom', 1) ! Shows video
at full screen
ThisViewer1.Play() ! Start playing the clip |
The version of Windows Media Player to Load. You need to set this
the
call to the Init method.
There are currently two allowed values for MPVersionNumber. Setting
this to 6 will use the old Windows Media Player 6/7 control. Setting this to
10 will use the new Windows Media player 9 and newer control. Please note that
using the new control is currently a Beta feature, in testing it works very
well, however there is a known issue with multiple controls on a single window
causing a GPF when the window is closed. You may have both old and new controls
in your application, and you can even have old and new controls on the same
window/thread.
The same technique is used regardless of whether the Init method
call is being done manually or populated by the template.