How to Perform Auto Repeat as Media Player Does

Last reviewed: May 25, 1995
Article ID: Q124185
The information in this article applies to:
  • Microsoft Windows Software Development Kit (SDK) for Windows version 3.1
  • Microsoft Win32 SDK, versions 3.1, 3.5, 3.51, and 4.0
  • Microsoft Video for Windows Development Kit (DK) version 1.1

The Media Player (MPLAYER.EXE) included with Microsoft Windows and Microsoft Windows NT (MPLAY32.EXE) provides an auto-repeat option that automatically repeats the playback of a multimedia file. You can incorporate this functionality into your application on Digital Video devices by using an extension to the standard Media Control Interface (MCI) commands as follows:

  • When calling the mciSendString() function, add the word "repeat" to the play command, as in this example:

          mciSendString("play mov notify repeat", NULL, 0, hWnd);
    
  • When calling the mciSendCommand() function, set the play flag MCI_DGV_PLAY_REPEAT. For example, to add auto repeat functionality to the MOVPLAY sample included with the Video for Windows DK, add the following line to the playMovie() function in MOVPLAY1.C, right before the mciSendCommand() function call:

          dwFlags |= MCI_DGV_PLAY_REPEAT;
    

"Digital Video Command Set for the Media Control Interface" documents the Digital Video MCI extensions. It is available on the Microsoft Developer Network (MSDN) CD. Look for it in the Specifications section of the CD contents, under "Digital Video MCI Specification." You can also search the CD using the word MCI_DGV_PLAY_REPEAT for more information about that flag.


Additional reference words: 3.10 3.50 4.00 95 Video for Windows MCIAVI
MCI_PLAY AVI loop continuous play
KBCategory: kbmm kbprg kbdocerr
KBSubcategory: MMVideo


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: May 25, 1995
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.