MSMEDIAPLAYER Microsoft Media Player application This application embeds a Microsoft Media Player into a MATLAB figure window. This is achieved using the ActiveX control for the media player This application is also intended as a simple tutorial for how to include ActiveX controls in applications developed with GUIDE. MSMEDIAPLAYER Opens the Microsoft Media Player in a MATLAB figure window. MSMEDIAPLAYER('file','filename') Loads filename into the player. filename must be a valid file - if it isn't on your MATLAB path, specify the complete path. Note that 'file' is a keyword, and must be entered as shown. Example: msmediaplayer('file','H:\Documents\SimpsonsClip.mov'); MP = MSMEDIAPLAYER Returns a handle to the media player object, allowing command-line interaction with the object. Available methods can be viewed with METHODSVIEW(MP) mp = msmediaplayer; methodsview(mp); Open(mp,'MyMovie.avi'); Play(mp) Since GUIDE does not yet support drag-and-drop placement of ActiveX controls, we need to add the controls from within the application m-file (this file). I do this during the opening function (msmediaplayer_OpeningFcn), so that the control is initialized before the figure is opened. There isn't much else to this simple application, other than the figure resize function that resizes the ActiveX control, too. This uses the following ActiveX control: Description: ActiveMovieControl Object ProgID: AMOVIE.ActiveMovieControl.2 File Name: msdxm.ocx Download: http://activex.microsoft.com/activex/controls/mplayer/en/mplayer.asp Documentation: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmplay/mmp_sdk/windowsmediaplayeractivexcontrol.asp Standard GUIDE help follows: MSMEDIAPLAYER, by itself, creates a new MSMEDIAPLAYER or raises the existing singleton*. H = MSMEDIAPLAYER returns the handle to a new MSMEDIAPLAYER or the handle to the existing singleton*. MSMEDIAPLAYER('CALLBACK',hObject,eventData,handles,...) calls the local function named CALLBACK in MSMEDIAPLAYER.M with the given input arguments. MSMEDIAPLAYER('Property','Value',...) creates a new MSMEDIAPLAYER or raises the existing singleton*. Starting from the left, property value pairs are applied to the GUI before msmediaplayer_OpeningFunction gets called. An unrecognized property name or invalid value makes property application stop. All inputs are passed to msmediaplayer_OpeningFcn via varargin. *See GUI Options on GUIDE's Tools menu. Choose "GUI allows only one instance to run (singleton)". See also: GUIDE, GUIDATA, GUIHANDLES