WMFP.GetDuration
----------------

Queries duration.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [WMFP](component_WMFP.md) | [10.0](newinversion100.md) | ❌ No | ✅ Yes | ❌ No | ✅ Yes, on Windows | ❌ No |

MBS( "WMFP.GetDuration"; Player ) 

**MBS**( **"WMFP.GetDuration"** /\* Queries duration. \*/  
**$Player**) /\* The reference number for the Windows Media Foundation Player object. e.g. $$Player \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| Player | The reference number for the Windows Media Foundation Player object. | $$Player |

### Result

Returns number or error.

### Description

Queries duration.  
Returns duration of the video in seconds.  
### Examples

Show position, duration and state:

 Show Custom Dialog \[ "Position" ; Round(MBS ("[WMFP.GetPosition](WMFPGetPosition.md)"; $$player );1) &amp;   
" of " &amp;   
Round(MBS ("WMFP.GetDuration"; $$player );1) &amp;   
¶ &amp;   
MBS ("[WMFP.GetState](WMFPGetState.md)"; $$player ) \]  
### See also

- [WMFP.GetPosition](WMFPGetPosition.md)
- [WMFP.GetState](WMFPGetState.md)

### Example Databases

- [Win Only/Windows Player](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/Win%20Only/Windows%20Player.shtml#7ScriptAnchor_)

This function checks for a license.

Created 25th December 2019 , last changed 25th December 2019

  
[WMFP.GetBalance](WMFPGetBalance.md) - [WMFP.GetIdealVideoSize](WMFPGetIdealVideoSize.md)

[HTML Version](WMFPGetDuration.shtml)