mobileFX VHX
VHX Object / MediaPosition Property
In This Topic
    MediaPosition Property
    In This Topic
    Description
    The point in the media's lifetime that is currenty playing.
    Property type
    Read-write property
    Syntax
    Visual Basic
    Public Property MediaPosition As Single
    Return Type
    Set to 0 by default. The position the media has currently reached.
    Remarks
    We can also use MediaPosition to define the starting point of a media. If MediaLoop is set to true, it will affect just the first iteration.
    Example
    private void axVHX1_OnPlayerReady(object sender, EventArgs e)
    {
        // Set the starting point of the media.
        axVHX1.Open("file:///path-to-your-file");
        axVHX1.MediaPosition = 0.5f;
    }
    private void axVHX1_OnPlayerEvent(object sender, AxVHXLib.IVHXEvents_OnPlayerEventEvent e)
    {
        // Retrieve the point currently reached.
        Debug.WriteLine("MediaPosition: " + axVHX1.MediaPosition);
    }
    See Also