|
|||
Version
www.capesoft.com Updated 16 November 2005 |
|||
Contents | |||
|
|||
|
The FeMedia Object | ||
Methods |
|||
|
The Templates | ||
|
Useful References | ||
![]() |
Formerly known as the Media file type / object, the FeMedia Object is used to display video files, and play sound files. |
Quick Reference |
EventCallback |
GetInfo |
HideControl |
Init |
Kill |
Load |
Navigate |
Pause |
Play |
Reload |
Stop |
UnhideControl |
Update |
![]() EventCallback ( long EventID, string Parm1, string Parm2, string Parm3, string Parm4 ) ( To do )
|
GetInfo ( <string pPropertyName> ) ThisViewer1.GetInfo()
|
HideControl
( ) ThisViewer.HideControl ()
|
Init
( long ParentControl, <string LoadPath>, long Handle1=0, long
Handle2=0, byte SkipCallbacks=false ) ,byte,proc
ThisViewer.Init (?feControl)
|
Kill
( )
ThisViewer.Kill()
|
Load
( string CurrentPath, <long CurrentControl>
) ,byte,proc
ThisViewer.Load ('c:\test.avi')
|
Navigate
( byte Location, <short PageNumber>, <string Optionals>
)
ThisViewer1.Navigate (1)
! Goto first page
|
Pause
( ) ,byte,proc
ThisViewer.Pause()
|
Play
( ) ,byte,proc
ThisViewer.Play()
|
Reload
( <long CurrentControl> )
ThisViewer.Reload()
|
Stop
( ) ,byte,proc
ThisViewer.Stop()
|
UnhideControl
( ) ThisViewer.UnhideControl ()
|
Update
( string Property, string PropValue ) ,byte,proc
ThisViewer.Update()
|
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:
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 |
Class Properties | |||
feMedia.MPVersionNumber |
The version of Windows
Media Player to load
|
||
MPVersionNumber long
The version of Windows Media Player to Load. You need to set this
before the call to the Init method.
! Use the old version of Windows Media Player ThisViewer1.MPVersionNumber = 6
ThisViewer1.Init (?feControl, , , , 1)
! Use the new version of Windows Media Player ThisViewer3.MPVersionNumber = 10
ThisViewer3.Init (?feControl, , , , 1)
At this time there is quite an overlap in terms of multiple File Explorer classes being implemented by the same templates. In the future we may revisit this, but for now all templates are covered in the main (FileExplorer.htm) help document, please click here.
See the FeMedia_SoundCallbacks
and FeMedia_VideoCallbacks procedures in the feabc.app example
application for more info.
Event Name: | Equate: | Description: |
Buffering | fe:MedEvt_Buffering | Occurs when the control begins or ends buffering. |
Click | fe:MedEvt_Click | Occurs when a user clicks the mouse with the cursor in the image window. |
DblClick | fe:MedEvt_DblClick | Occurs when a user double clicks the mouse with the cursor in the image window. |
Disconnect | fe:MedEvt_Disconnect | Occurs when the control is disconnected from the server. |
DisplayModeChange | fe:MedEvt_DisplayModeChange | Occurs when the DisplayMode property changes. |
DVDNotify | fe:MedEvt_DVDNotify | ( none ) |
EndOfStream | fe:MedEvt_EndOfStream | Occurs when the end of the title is reached. |
Error | fe:MedEvt_Error | Occurs when the control has an error condition. |
KeyDown | fe:MedEvt_KeyDown | Occurs when a key is pressed. |
KeyPress | fe:MedEvt_KeyPress | Occurs when a key is pressed and released. |
KeyUp | fe:MedEvt_KeyUp | Occurs when a key is released. |
MarkerHit | fe:MedEvt_MarkerHit | Occurs when a marker is reached. |
MouseDown | fe:MedEvt_MouseDown | Occurs when a mouse button is pressed. |
MouseMove | fe:MedEvt_MouseMove | Occurs when the mouse pointer is moved. |
MouseUp | fe:MedEvt_MouseUp | Occurs when a mouse button is released. |
NewStream | fe:MedEvt_NewStream | Occurs when a new stream is started in a station. |
OpenStateChange | fe:MedEvt_OpenStateChange | Occurs when the control changes its open state. |
PlayStateChange | fe:MedEvt_PlayStateChange | Occurs when the control changes its play state. |
PositionChange | fe:MedEvt_PositionChange | Occurs when the current media position moves to a new position. |
ReadyStateChange | fe:MedEvt_ReadyStateChange | Occurs when the control's state of readiness changes. |
ScriptCommand | fe:MedEvt_ScriptCommand | Occurs when a synchronized command or URL is received. |
Warning | fe:MedEvt_Warning | Occurs when the control encounters a possible problem. |