CapeSoft.Com
Clarion Accessories
FileExplorer
Documentation
feMedia
CapeSoft Logo

CapeSoft File Explorer FeMedia2
Documentation

Download Latest Version
Installed Version Latest Version
  • Introduction
  • Class Methods Inherited from feMedia
  • New feMedia2 Methods
  • Internal Methods
  • Media Player Methods
  • Control Methods
  • Settings Methods
  • Media Methods

  • Introduction

    The feMedia2 class extends the feMedia class, and provides support for both the older Windows Media Player 6.4 and earlier control, as well as the new control and interface provided from Windows Media Player 7 and upwards. The object will automatically try use the newest interfaces available and fall back to the previous interfaces if they are not available. The new methods will only work with Windows Media Player 7 and later. The old methods are the feMedia class are still supported, and provide support for the old Media Player interface, as well as providing backward compatibility to allow existing code to work with the new interfaces.

    Class Methods Inherited from the feMedia class.

    These methods provide the functionality that existed in the feMedia class, and call the correct code for the specific version of Windows Media Player that is being used. When using the old Windows Media 6.4 and earlier interfaces the functionality remains unchanged, and all existing code work. The object will automatically try use the newest interfaces available and fall back to the previous interfaces if they are not available.

    When using the new Media Player 7 and later interfaces, as much as possible we have maintained transparent backward compatibility, however some code may cease to work, in all cases where deprecated functionality is used with the new control the method will call the ErrorTrap() method with the warning or error.

    To display ErrorTrap messages set the .logging property of the class to 1 and the .level property to the level of logging required (0 for errors only, 1 to include warnings and 2 for all messages including errors, warnings and information). The output can then be viewed using the free DebugView utility from Microsoft (www.sysinternals.com).

    ErrorTrap

    ErrorTrap (string errorMesssage, string methodName, long level=0)

    Description

    The ErrorTrap() method is called each time an error occurs, or a warning is issued, or there is additional information available that can be helpful for debugging and diagnostic purposes. The Level parameter is set dependant on the type of message. The .logging property of the class determines whether these messages are logged to the system debug output (.logging =1) and the .level property of the class determines which messages are logged (.level=0 logs only errors, .level=1 logs errors and warnings, .level=2 logs all messages

    Parameters
    Parameter Description
    errorMessageThe text of the error, warning or informational message.
    methodNameThe name of the method that called ErrorTrap.
    level The level of the of message, indicating the type of message that this is:
    • level = 0, indicates that this is an Error message
    • level = 2, indicates that this is a Warning message
    • level = 3, indicates that this is an informational message.
    Notes

    The passed level parameter is checked against the .level property of the class. If the level is passed is less than or equal to .level the error is logged (if the .logging property is set to a no zero value). By default the .level property is zero, and hence only error messages are logged. To also log warning messages set .logging to 1 and to log all messages set .logging to 2.

    Kill

    Kill ()

    Description

    Cleans up, deallocates all memory, and disposes of all interfaces. Kill should always be called for every object where the Init() method has been called. This method should only be called once, and because of the nature of the interface it is strongly recommend that Init() and Kill() are only called once, and not repeatedly. It is also recommended that the template generated code for Init() and Kill() is used (the Init() method is called when the Window is opened and Kill() is called when the Windows is closing).

    Load

    Load (string mediaFile)

    Description

    Loads the specified file into the Media Player control. The default behaviour is for the file to begin playback once it is loaded. This can also be the URL of a media file, or the URL of a media stream.

    Notes

    All additional parameters are deprecated, only the name of the media to load needs to be passed. The name can be a full path name or an URL that points to the media to be loaded by the player. The following version of this procedure are deprecated, additional parameters are simply ignored:

    Init procedure (long ParentControl, <string LoadPath>, long Handle1=0, long Handle2=0, byte SkipCallbacks=false), byte, proc
    Load procedure (string CurrentPath, <long CurrentControl>), byte, proc
    Load procedure (string CurrentPath, long CurrentControl, string TreatUnknownsAs, <byte ExplorerControl>)

    Update

    Update (string Property, string PropValue), byte, proc

    Description

    This Method is Deprecated. This method is deprecated, and should only be used when using the old Media Player interface for Windows Media Player 6.4 and earlier. The new methods to put the property values directly should be used for the new Media Player interface. For backward compatibility purposes this method will still work, but those properties that have no analogues in the new Media Player will cause the method to call ErrorTrap with a warning for those properties whose behaviour has changed, and an error for those properties that no longer exist and have no equivalents.

    Use this method to update various properties of the Media object. These properties should not get update directly by changing associated class properties, as this will have no effect on the Media Player.

    Parameters

    Property parameter can be one of the following values:

    Navigate

    Navigate (byte Location, <short PageNumber>, <string Optionals>), byte, proc

    Description

    This method is deprecated, This method is deprecated, and should only be used when using the old Media Player interface for Windows Media Player 6.4.

    With the new Media Player control use the put_currentPosition() method

    Use this method to navigate within a loaded file. The Location parameter can be one of the following:

    Notes

    If you are using location 2 or 3 for a Media Player object, the Navigate method will in effect take you to the previous or next frame of the loaded movie. In reality you actually jump forward or backward by a preset number of milliseconds, giving the impression that you are jumping frames. The default number of milliseconds is 100 (i.e. a tenth of a second). If you would rather use another time frame, you can pass the number of milliseconds as the Optionals third parameter. Example 3 shows how to jump forward to the next "frame", where the next frame is 50 milliseconds after the current frame, not the 100 millisecond default:

    Examples
    Example
    ThisViewer1.Navigate (1)   ! Goto first page
    ThisViewer1.Navigate (5, 3)  ! Goto page 3
    ThisViewer1.Navigate (3, 0, 50)

    LoadMedia

    LoadMedia (string CurrentPath, long CurrentControl)

    Description

    This method is deprecated, use the #Load() method.

    GetInfo

    GetInfo (<string pPropertyName>)

    Description

    This method is deprecated. This method is deprecated, and should only be used when using the old Media Player interface for Windows Media Player 6.4

    Use the specific method to access the property value that you need. For backward compatibility purposes this method returns the equivalent values for the new media player interface as much as possible, and where there is no equivilent ErrorTrap() will be called.

    This method retrieve the value for the requested property from the Media Player control. If you pass a property name in the optional pPropertyName parameter (see example), then only that property will be updated. If you do not pass a property name, then all properties will be updated.

    Supported values for pPropertyName:

    Reload

    Reload (<long CurrentControl>)

    Description

    This method reloads the last document which you loaded into the object. If you omit the CurrentControl parameter, the same control which you used in the Init method is used.

    ShowAboutBox

    ShowAboutBox ()

    Description

    This method is deprecated.

    This method is deprecated, and should only be used when using the old Media Player interface for Windows Media Player 6.4.

    This is not supported at all by the new interfaces, however the get_versionInfo() method can be used to retrieve the version information for Windows Media Player. In addition the .MpVersionNumber property of the class is set to 6 for the old version, and 7 (or greater) for the new interface. The Init() method sets this property based on the control that is initialised. Thereafter it can be tested as follows:

    if MediaPlayer.MpVersionNumber < 7
       
    ! The old version of Windows Media Player
    else
      
    ! The new version of Windows Media Player
    end

    TranslateEventID

    TranslateEventID (long EventID), string

    Description

    This method translates an event ID that was passed to the callback into a string that describes the event. The Eventcallback method can be used to trap and response to the events.

    _EventCallback

    _EventCallback (long EventID, string Parm1, string Parm2, string Parm3, string Parm4), long

    Description

    Internal event callback mechanism, should not be used or called directly. See the EventCallback method below.

    EventCallback

    EventCallback (long EventID, string Parm1, string Parm2, string Parm3, string Parm4), long

    Main Callback method for handling events. Can be used to trap and handle events.

    Parameters
    Parameter Description
    eventIDThe ID of the event. The TranslateEventID method can be used to convert an event ID into a string describing the event. See the Remarks section for all events provided.
    parm1, parm2, parm3, parm4The values of any parameters provided by the event.
    Returns

    Zero unless an internal error processing the event occured.

    Remarks

    See the How Do I use the callback section below for details on using this in your code

    The follow events are provided by the Media Player interface (See the Event Parameters section below for a description of common parameters):

    fe:WMPCOREEVENT_OPENSTATECHANGE 'Open Stated Changed'
    fe:WMPCOREEVENT_STATUSCHANGE 'Status Changed'
    fe:WMPCOREEVENT_PLAYSTATECHANGE 'Play State Changed'
    fe:WMPCOREEVENT_AUDIOLANGUAGECHANGE 'Audio Language Changed'
    fe:WMPCOREEVENT_SEEK_BASE 'Seek Based'
    fe:WMPCOREEVENT_ENDOFSTREAM 'End Of Stream'
    fe:WMPCOREEVENT_POSITIONCHANGE 'Position Changed'
    fe:WMPCOREEVENT_MARKERHIT 'Marker Hit'
    fe:WMPCOREEVENT_DURATIONUNITCHANGE 'Durantion Unit Changed'
    fe:WMPCOREEVENT_SCRIPTCOMMAND 'Script Command'
    fe:WMPCOREEVENT_DISCONNECT 'Disconnected'
    fe:WMPCOREEVENT_BUFFERING 'Buffering'
    fe:WMPCOREEVENT_NEWSTREAM 'New Stream'
    fe:WMPCOREEVENT_ERROR 'Error'
    fe:WMPCOREEVENT_WARNING 'Warning'
    fe:WMPCOREEVENT_CDROMMEDIACHANGE 'CD ROM Media Changed'
    fe:WMPCOREEVENT_PLAYLISTCHANGE 'Playlist Changed'
    fe:WMPCOREEVENT_MEDIACHANGE 'Media Changed'
    fe:WMPCOREEVENT_CURRENTMEDIAITEMAVAILABLE 'Current Media Item Available'
    fe:WMPCOREEVENT_CURRENTPLAYLISTCHANGE 'Current Playlist Changed'
    fe:WMPCOREEVENT_CURRENTPLAYLISTITEMAVAILABLE 'Current Playlist Item Available'
    fe:WMPCOREEVENT_CURRENTITEMCHANGE 'Curernt Item Changed'
    fe:WMPCOREEVENT_MEDIACOLLECTIONCHANGE 'Media Collection Changed'
    fe:WMPCOREEVENT_MEDIACOLLECTIONATTRIBUTESTRINGADDED 'Media Collection Attributes Changed'
    fe:WMPCOREEVENT_MEDIACOLLECTIONATTRIBUTESTRINGREMOVED 'Media Collection Attribute String Removed'
    fe:WMPCOREEVENT_PLAYLISTCOLLECTIONCHANGE 'Playlist Collection Changed'
    fe:WMPCOREEVENT_PLAYLISTCOLLECTIONPLAYLISTADDED 'Playlist Added'
    fe:WMPCOREEVENT_PLAYLISTCOLLECTIONPLAYLISTREMOVED 'Playlist Removed'
    fe:WMPCOREEVENT_MEDIACOLLECTIONCONTENTSCANADDEDITEM 'Content Scan Added Item'
    fe:WMPCOREEVENT_MEDIACOLLECTIONCONTENTSCANPROGRESS 'Content Scan Progress'
    fe:WMPCOREEVENT_MEDIACOLLECTIONSEARCHFOUNDITEM 'Search Found Item'
    fe:WMPCOREEVENT_MEDIACOLLECTIONSEARCHPROGRESS 'Search Progress'
    fe:WMPCOREEVENT_MEDIACOLLECTIONSEARCHCOMPLETE 'Search Complete'
    fe:WMPCOREEVENT_PLAYLISTCOLLECTIONPLAYLISTSETASDELETED 'Playlist Set As Deleted'
    fe:WMPCOREEVENT_MODECHANGE 'Mode Changed'
    fe:WMPCOREEVENT_MEDIACOLLECTIONATTRIBUTESTRINGCHANGED 'Attribute String Changed'
    fe:WMPCOREEVENT_MEDIAERROR 'Media Error'
    fe:WMPCOREEVENT_DOMAINCHANGE 'Domain Changed'
    fe:WMPCOREEVENT_OPENPLAYLISTSWITCH 'Open Playlist Switch'
    fe:WMPCOREEVENT_STRINGCOLLECTIONCHANGE 'String Collection Changed'
    fe:WMPCOREEVENT_MEDIACOLLECTIONMEDIAADDED 'Media Added'
    fe:WMPCOREEVENT_MEDIACOLLECTIONMEDIAREMOVED 'Media Removed'

    Event Parameters

    The following events provide parameters which contain additional information. The types listed below are converted to Clarion strings and passed as parm1, parm2, parm3 and parm4. Parameters listed below as BSTR types and bstrings, which are converted to standard Clarion strings.

    An event which has one parameter will pass that value in parm1, and the remaining passed parameters will be empty strings. Events with two parameters pass the values in parm1 and parm2, three values in parm1, parm2, parm3 and so on.

    fe:WMPCOREEVENT_OPENSTATECHANGE (long newState)

    The OpenStateChange event occurs when the Windows Media Player control changes state.

    newState is one of the following WMPPlayState values:
      wmppsUndefined     = 0,
      wmppsStopped       = 1,
      wmppsPaused        = 2,
      wmppsPlaying       = 3,
      wmppsScanForward   = 4,
      wmppsScanReverse   = 5,
      wmppsBuffering     = 6,
      wmppsWaiting       = 7,
      wmppsMediaEnded    = 8,
      wmppsTransitioning = 9,
      wmppsReady         = 10,
      wmppsReconnecting  = 11,
      wmppsLast          = 12


    fe:WMPCOREEVENT_PLAYSTATECHANGE    (long newState)

    The PlayStateChange event occurs when the play state of the Windows Media Player control changes.
    newState is one of the WMPPlayState values listed above.

    fe:WMPCOREEVENT_AUDIOLANGUAGECHANGE (long LangID)

    The AudioLanguageChange event occurs when the current audio language changes. A LangID uniquely identifies a particular language dialect, called a locale

    fe:WMPCOREEVENT_ENDOFSTREAM (long Result)

    The EndOfStream event is reserved for future use.

    of fe:WMPCOREEVENT_POSITIONCHANGE (double oldPosition, double newPosition)

    The PositionChange event occurs when the current playback position within the media item has been changed.

    oldPosition
    Specifies the original position.

    newPosition
    Specifies the new position.


    fe:WMPCOREEVENT_MARKERHIT (double oldPosition, double newPosition)

    The MarkerHit event occurs when a marker is reached.

    MarkerNum
    [in] Specifies the number of the marker that was hit.


    fe:WMPCOREEVENT_DURATIONUNITCHANGE (long NewDurationUnit)

    The DurationUnitChange event is reserved for future use

    fe:WMPCOREEVENT_SCRIPTCOMMAND (BSTR scType, BSTR Param)

    The ScriptCommand event occurs when a synchronized command or URL is received.

    scType
    Specifies the type of script command.

    Param
    Specifies the script command


    fe:WMPCOREEVENT_DISCONNECT (long Result)

    The Disconnect event is reserved for future use.

    fe:WMPCOREEVENT_BUFFERING (VARIANT_BOOL Start)

    The Buffering event occurs when the Windows Media Player control begins or ends buffering

    fe:WMPCOREEVENT_WARNING (long WarningType, long Param, BSTR Description)

    The Warning event is reserved for future use.

    fe:WMPCOREEVENT_CDROMMEDIACHANGE (long CdromNum)

    The CdromMediaChange event occurs when a CD or DVD is inserted into or ejected from a CD or DVD drive. CdromNum Specifies the index of the CD or DVD drive

    fe:WMPCOREEVENT_CURRENTMEDIAITEMAVAILABLE (BSTR bstrItemName)

    The CurrentMediaItemAvailable event occurs when the current media item becomes available.

    bstrItemName
    Specifies the item name.

    fe:WMPCOREEVENT_CURRENTPLAYLISTITEMAVAILABLE (BSTR bstrItemName)

    The CurrentPlaylistItemAvailable event occurs when the current playlist item becomes available.

    bstrItemName
    Specifies the item name.


    fe:WMPCOREEVENT_MEDIACOLLECTIONATTRIBUTESTRINGADDED (BSTR bstrAttribName, BSTR bstrAttribVal)

    The MediaCollectionAttributeStringAdded event occurs when an attribute is added to Media Library.

    bstrAttribName
    Specifies the attribute name. For information about the attributes supported by Windows Media Player, see the Windows Media Player Attribute Reference.

    bstrAttribVal
    Specifies the attribute value.


    fe:WMPCOREEVENT_MEDIACOLLECTIONATTRIBUTESTRINGREMOVED (BSTR bstrAttribName, BSTR bstrAttribVal)

    The MediaCollectionAttributeStringRemoved event occurs when an attribute is removed from Media Library. .

    bstrAttribName
    Specifies the attribute name. For information about the attributes supported by Windows Media Player, see the Windows Media Player Attribute Reference.

    bstrAttribVal
    Specifies the attribute value.


    fe:WMPCOREEVENT_PLAYLISTCOLLECTIONPLAYLISTADDED (BSTR bstrPlaylistName)

    The PlaylistCollectionPlaylistAdded event occurs when a playlist is added to the playlist collection.

    bstrPlaylistName
    Specifies the name of the playlist that was added.


    fe:WMPCOREEVENT_PLAYLISTCOLLECTIONPLAYLISTREMOVED (BSTR bstrPlaylistName)

    The PlaylistCollectionPlaylistRemoved event occurs when a playlist is removed from the playlist collection.

    bstrPlaylistName
    Specifies the name of the playlist that was removed.

    fe:WMPCOREEVENT_MODECHANGE (BSTR ModeName, VARIANT_BOOL NewValue)

    The ModeChange event occurs when a mode of the player is changed.

    ModeName
    Specifies the mode that was changed. Contains one of the following values.
    ValueDescription
    shuffleTracks are played in random order.
    loopThe entire sequence of tracks is played repeatedly

    fe:WMPCOREEVENT_MEDIACOLLECTIONATTRIBUTESTRINGCHANGED (BSTR bstrAttribName, BSTR bstrOldAttribVal, BSTR bstrNewAttribVal)

    The MediaCollectionAttributeStringChanged

    bstrAttribName
    Specifies the name of the attribute. For information about the attributes supported by Windows Media Player, see the Windows Media Player Attribute Reference.

    bstrOldAttribVal
    Specifies the original attribute value.

    bstrNewAttribVal
    Specifies the new attribute value.


    fe:WMPCOREEVENT_DOMAINCHANGE (BSTR strDomain)

    The DomainChange event occurs when the DVD domain changes.

    strDomain
    [in] Specifies the new domain. It can be one of the following values:
    StringDescription
    firstPlayPerforming default initialization of a DVD disc.
    videoManagerMenuDisplaying menus for whole disc. Also known as Root Menu or topMenu.
    videoTitleSetMenuDisplaying menus for current title set. Also known as titleMenu
    titleDisplaying the current title.
    stopThe DVD Navigator is in the DVD Stop domain.

    fe:WMPOCXEVENT_CLICK (short nButton, short nShiftState, long fX, long fY)
    nButton

    A bit field with bits corresponding to the left button (bit 0), right button (bit 1), and middle button (bit 2). These bits correspond to the values 1, 2, and 4, respectively. Only one of the bits is set, indicating the button that caused the event.
    nShiftState

    A bit field with the least significant bits corresponding to the SHIFT key (bit 0), the CTRL key (bit 1), and the ALT key (bit 2). These bits correspond to the values 1, 2, and 4, respectively. The shift argument indicates the state of these keys. Some, all, or none of the bits can be set, indicating that some, all, or none of the keys are pressed..

    fX
    The x coordinate of the mouse pointer relative to the upper-left corner of the control.

    fY
    The y coordinate of the mouse pointer relative to the upper-left corner of the control.

    fe:WMPOCXEVENT_DOUBLECLICK (short nButton, short nShiftState, long fX, long fY)

    See WMPOCXEVENT_CLICK above for a description of the parameters.


    fe:WMPOCXEVENT_KEYDOWN (short nKeyCode, short nShiftState)

    The KeyDown event occurs when a key is pressed.

    nKeyCode
    Specifies which physical key is pressed. For possible values, see the Remarks section.

    nShiftState
    A bit field with the least significant bits corresponding to the SHIFT key (bit 0), the CTRL key (bit 1), and the ALT key (bit 2). These bits correspond to the values 1, 2, and 4, respectively. The shift argument indicates the state of these keys. Some, all, or none of the bits can be set, indicating that some, all, or none of the keys are pressed.

    fe:WMPOCXEVENT_KEYPRESS (short nKeyAscii)

    The KeyPress event occurs when a key is pressed and then released.

    nKeyAscii
    Specifies the standard numeric ANSI code for the character.

    fe:WMPOCXEVENT_KEYUP (short nKeyCode, short nShiftState)

    The KeyUp event occurs when a key is released.
    nKeyCode

    Specifies which physical key is pressed. For possible values, see the Remarks section of the KeyDown event.
    nShiftState

    A bit field with the least significant bits corresponding to the SHIFT key (bit 0), the CTRL key (bit 1), and the ALT key (bit 2). These bits correspond to the values 1, 2, and 4, respectively. The shift argument indicates the state of these keys. Some, all, or none of the bits can be set, indicating that some, all, or none of the keys are pressed.

    fe:WMPOCXEVENT_MOUSEDOWN (short nButton, short nShiftState, long fX, long fY)

    The MouseDown event occurs when a mouse button is pressed.

    nButton
    [in] A bit field with bits corresponding to the left button (bit 0), right button (bit 1), and middle button (bit 2). These bits correspond to the values 1, 2, and 4, respectively. Only one of the bits is set, indicating the button that caused the event.

    nShiftState
    [in] A bit field with the least significant bits corresponding to the SHIFT key (bit 0), the CTRL key (bit 1), and the ALT key (bit 2). These bits correspond to the values 1, 2, and 4, respectively. The shift argument indicates the state of these keys. Some, all, or none of the bits can be set, indicating that some, all, or none of the keys are pressed.

    fX
    [in] The x coordinate of the mouse pointer relative to the upper-left corner of the control.

    fY
    [in] The y coordinate of the mouse pointer relative to the upper-left corner of the control.


    fe:WMPOCXEVENT_MOUSEMOVE (short nButton, short nShiftState, long fX, long fY)

    The MouseMove event occurs when the mouse pointer is moved.
    nButton

    [in] A bit field with bits corresponding to the left button (bit 0), right button (bit 1), and middle button (bit 2). These bits correspond to the values 1, 2, and 4, respectively. Some, all, or none of the bits can be set, indicating that some, all, or none of the buttons are pressed.

    nShiftState
    [in] A bit field with the least significant bits corresponding to the SHIFT key (bit 0), the CTRL key (bit 1), and the ALT key (bit 2). These bits correspond to the values 1, 2, and 4, respectively. The shift argument indicates the state of these keys. Some, all, or none of the bits can be set, indicating that some, all, or none of the keys are pressed.

    fX
    [in] The x coordinate of the mouse pointer relative to the upper-left corner of the control.

    fY
    [in] The y coordinate of the mouse pointer relative to the upper-left corner of the control.


    fe:WMPOCXEVENT_MOUSEUP (short nButton, short nShiftState, long fX, long fY)

    The MouseUp event occurs when a mouse button is released.

    nButton
    [in] A bit field with bits corresponding to the left button (bit 0), right button (bit 1), and middle button (bit 2). These bits correspond to the values 1, 2, and 4, respectively. Only one of the bits is set, indicating the button that caused the event.

    nShiftState
    [in] A bit field with the least significant bits corresponding to the SHIFT key (bit 0), the CTRL key (bit 1), and the ALT key (bit 2). These bits correspond to the values 1, 2, and 4, respectively. The shift argument indicates the state of these keys. Some, all, or none of the bits can be set, indicating that some, all, or none of the keys are pressed.

    fX
    [in] The x coordinate of the mouse pointer relative to the upper-left corner of the control.

    fY
    [in] The y coordinate of the mouse pointer relative to the upper-left corner of the control.

    How Do I use the callback

    You need to derive the EventCallback method in your source code editor of your FEControl procedure. This is shown in the MediaSoundEvents procedure of the feabc example application. Typically the events that you'd be interested in, is paused, stopped and ended, which can be trapped as follows:

    if EventID = fe:WMPCOREEVENT_PLAYSTATECHANGE
      case Parm1
      of 1  !Stopped
          !This is the event you're interested in if the user stops the track. It also occurs after the track is finished playing.
      of 2  !Paused
      of 3  !Started
      of 8  !Ended
          !This is the event you're interested in if the media finishes playing.
      of 9  !Transitioning
      end
    end



    HideControl

    HideControl ()

    Description

    Hides the File Explorer viewer control.

    Parameters

    None

    Return Value

    None

    Notes

    Setting the control to hidden using the Clarion PROP syntax will not work for example:
      ?feControl{prop:hide}
    = true
    will not hide the control.

    Examples
    Example
    ThisViewer.HideControl()

    UnhideControl

    UnhideControl ()

    Description

    Unhides (shows) the File Explorer viewer control if it has been hidden using the HideControl method.

    Parameters

    None

    Return Value

    None

    Notes

    Using the Clarion PROP syntax, such as: ?feControl{prop:hide} = false will not work.

    Examples
    Example
    ThisViewer.HideControl()

    New MediaPlayer 2 Methods

    Internal Methods

    These methods fetch the internal interfaces for each of the underlying Media Player objects. You should not typically call these methods in the normal course of use.

    GetControls

    GetControls (), long

    Description

    Retrieves the Controls interface

    GetCurrentMedia

    GetCurrentMedia (), long

    Description

    Retrieves the Media interface

    GetSettings

    GetSettings (), long

    Description

    Retrieves the Settings interface

    Media Player Methods

    Methods that relate to and control the Media Player object itself.

    close

    close (), long, proc

    Description

    Closes the current digital media file, not Windows Media Player.

    get_playState

    get_playState (), long

    Descriptions

    Returns a WMPPlayState enumeration

    put_URL

    put_URL (string URL), long, proc

    Description

    Play a clip

    get_openState

    get_openState (), long

    Description

    Retrieves an WMPOpenState enumeration value indicating the state of the content source.

    get_status

    get_status (), string

    Description

    Returns a value for the status of the control

    get_URL

    get_URL (), string

    Description

    Returns the URL of the current clip

    get_versionInfo

    get_versionInfo (), string

    Description

    Returns the version information for Media Player

    get_enableContextMenu

    get_enableContextMenu (), long

    Description

    Retrieves a value indicating whether to enable the context menu, which appears when the right mouse button is clicked.

    get_enabled

    get_enabled (), long

    Description

    Retrieves a value indicating whether the Windows Media Player control is enabled.

    get_fullScreen

    get_fullScreen (), long

    Description

    Retrieves a value indicating whether video content is played back in full-screen mode.

    get_uiMode

    get_uiMode (), string

    Description

    Retrieves a value indicating which controls are shown in the user interface when Windows Media Player is embedded in a Web page.

    put_enableContextMenu

    put_enableContextMenu (long enabled), long, proc

    Description

    Specifies a value indicating whether to enable the context menu, which appears when the right mouse button is clicked.

    put_enabled

    put_enabled (long enabled), long, proc

    Description

    Specifies a value indicating whether the Windows Media Player control is enabled.

    put_fullScreen

    put_fullScreen (long fullScreen), long, proc

    Description

    Specifies a value indicating whether video content is played back in full-screen mode.

    put_uiMode

    put_uiMode (string mode), long, proc

    Description

    Specifies a value indicating which controls are shown in the user interface when Windows Media Player is embedded in a Web page.

    IWMPPlayer2 methods

    get_stretchToFit

    get_stretchToFit (), long

    Description

    Retrieves a value indicating whether video will stretch to fit size of the Windows Media Player control video display.

    get_windowlessVideo

    get_windowlessVideo (), long

    Description

    Retrieves a value indicating whether the Windows Media Player control renders video in windowless mode.

    put_stretchToFit

    put_stretchToFit (), long, proc

    Description

    Specifies whether video will stretch to fit the size of the Windows Media Player control video display.

    put_windowlessVideo

    put_windowlessVideo (), long, proc

    Description

    Specifies whether the Windows Media Player control renders video in windowless mode.

    Control Methods

    These methods are members of the Control interface and provide control of Media Player and the loaded media, much the same as the actual controls on the standard Windows Media player do.

    fastForward

    fastForward (), long, proc

    Description

    Starts fast play of the media item in the forward direction.

    fastReverse

    fastReverse (), long, proc

    Description

    Starts fast play of the media item in the reverse direction.

    get_currentMarker

    get_currentMarker (), long

    Description

    Retrieves the current marker number.

    get_currentPosition

    get_currentPosition (), real

    Description

    Retrieves the current position in the media item in seconds from the beginning.

    get_currentPositionString

    get_currentPositionString (), string

    Description

    Retrieves the current position in the media item as a string.

    get_controlIsAvailable

    get_controlIsAvailable (string item), long

    Description

    Retrieves a value indicating whether a specified type of information is available or a given action can be performed.

    next

    next (), long, proc

    Description

    Sets the current item to the next item in the playlist.

    pause

    pause (), byte, proc

    Description

    Pauses the playback of the currently loaded media item

    play

    play (), byte, proc

    Description

    Begins playback of the currently loaded media item

    previous

    previous (), long, proc

    Description

    Sets the current item to the previous item in the playlist.

    put_currentMarker

    put_currentMarker (long marker), long, proc

    Description

    Specifies the current marker number.

    put_currentPosition

    put_currentPosition (real currentPosition), long, proc

    Description

    Specifies the current position in the media item in seconds from the beginning.

    stop

    stop (), byte, proc

    Description

    Stops playback of the currently loaded media item. Resets the media to the beginning (use Pause to halt playback and retain the position).

    Settings Methods

    The following methods control the Settings interface that related to the Media Player control.

    get_autoStart

    get_autoStart (), long

    Description

    Retrieves a value indicating whether the current media item begins playing automatically.

    get_balance

    get_balance (), long

    Description

    Retrieves the current stereo balance.

    get_baseURL

    get_baseURL (), string

    Description

    Retrieves the base URL used for relative path resolution with URL-type script commands embedded in digital media content.

    get_defaultFrame

    get_defaultFrame (), string

    Description

    Retrieves the name of the frame used to display a URL received in a scriptCommand event.

    get_enableErrorDialogs

    get_enableErrorDialogs (), long

    Description

    Retrieves a value indicating whether error dialog boxes are displayed automatically.

    get_invokeURLs

    get_invokeURLs (), long

    Description

    Retrieves a value indicating whether URL events should launch a Web browser.

    get_settingIsAvailable

    get_settingIsAvailable (string item), long

    Description

    Retrieves a value indicating whether a specified action can be performed.

    get_mute

    get_mute (), long

    Description

    Retrieves a value indicating whether audio is muted.

    get_playCount

    get_playCount (), long

    Description

    Retrieves the number of times a media item will play.

    get_rate

    get_rate (), real

    Description

    Retrieves the current playback rate.

    get_volume

    get_volume (), long

    Description

    Retrieves the current playback volume.

    getMode

    getMode (string mode), long

    Description

    Returns a value indicating whether loop mode or shuffle mode is active.

    put_autoStart

    put_autoStart (long autoStart), long, proc

    Description

    Specifies whether the current media item begins playing automatically.

    put_balance

    put_balance (long balance), long, proc

    Description

    Specifies the current stereo balance.

    put_baseURL

    put_baseURL (string baseURL), long, proc

    Description

    Specifies the base URL used for relative path resolution with URL script commands embedded in digital media files.

    put_defaultFrame

    put_defaultFrame (string defaultFrame), long, proc

    Description

    Specifies the name of the frame used to display a URL received in a scriptCommand event.

    put_enableErrorDialogs

    put_enableErrorDialogs (long enableDialogs), long, proc

    Description

    Specifies whether error dialog boxes are displayed automatically.

    put_invokeURLs

    put_invokeURLs (long invokeUrls), long, proc

    Description

    Specifies whether URL events should launch a Web browser.

    put_mute

    put_mute (long mute), long, proc

    Description

    Specifies whether audio is muted.

    put_playCount

    put_playCount (long pCount), long, proc

    Description

    Specifies the number of times a media item will play.

    put_rate

    put_rate (real rate), long, proc

    Description

    Specifies the current playback rate.

    put_volume

    put_volume (long volume), long, proc

    Description

    Specifies the current playback volume.

    setMode

    setMode (string mode, long enabled), long, proc

    Description

    Sets the loop, auto-rewind or shuffle mode to active or inactive.

    Parameters
    Parameter Description
    Mode Can be one of the following values

    'autoRewind': Tracks are restarted at the beginning after playing to the end. Default state is true.

    'loop' : The sequence of tracks repeats itself. Default state is false.

    'showFrame' : The nearest video keyframe is displayed when not playing. Default state is false. Has no effect on audio tracks.

    'shuffle' : Tracks are played in random order. Default state is false.
    enabledIf set to True (non zero) then the setting indicated by the mode parameter is enabled, otherwise if it disabled.
    Return Value

    Returns True (1) if successful or False (0) if it fails.

    Media Methods

    The following methods belong to the Media object and provide information and control for the currenly loaded Media item. If no media is loaded all of the methods return an error code and call ErrorTrap()

    get_attributeCount

    get_attributeCount (), long

    Description

    Retrieves the number of attributes that can be queried and/or set for the media item.

    get_duration (deprecated - no longer supported by WMP10)

    get_duration (), real

    Description

    Retrieves the duration in seconds of the current media item.

    get_durationString (deprecated - no longer supported by WMP10)

    get_durationString (), string

    Description

    Retrieves a value indicating the duration of the current media item in HH:MM:SS format.

    get_imageSourceHeight

    get_imageSourceHeight (), long

    Description

    Retrieves the height of the current media item in pixels.

    get_imageSourceWidth

    get_imageSourceWidth (), long

    Description

    Retrieves the width of the current media item in pixels.

    get_markerCount

    get_markerCount (), long

    Description

    Retrieves the number of markers in the media item.

    get_name

    get_name (), string

    Description

    Retrieves the name of the media item.

    get_sourceURL

    get_sourceURL (), string, proc

    Description

    Retrieves the URL of the media item.

    getAttributeName

    getAttributeName (long item), string

    Description

    Retrieves the name of the attribute corresponding to the specified index.

    getItemInfo

    getItemInfo (string itemName), string

    Description

    Retrieves the value of the specified attribute for the media item.

    getItemInfoByAtom

    getItemInfoByAtom (long itemNum), string

    Description

    Retrieves the value of the attribute with the specified index number.

    getMarkerName

    getMarkerName (long markerNum), string

    Description

    Retrieves the name of the marker at the specified index.

    getMarkerTime

    getMarkerTime (long markerNum), real

    Description

    Retrieves the time of the marker at the specified index.

    isReadOnlyItem

    isReadOnlyItem (string itemName), long

    Description

    Retrieves a value indicating whether the attributes of the specified media item can be edited.

    Parameters
    Parameter Description
    itemNameA string containing the item name.
    Return Value

    Returns True(1) for a read only item, False (0) if the item is not read only and -1 if an error occurs.

    put_name

    put_name (string pName), long, proc

    Description

    Sets the name of the media item.

    setItemInfo

    setItemInfo (string itemName, string pValue), long, proc

    Description

    Sets the value of the specified attribute for the media item.

    Copyright © Capesoft Software (Pty) Ltd