You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: out_figure_movie.m
    path of file: ./repos/brainstorm3/toolbox/io
    
    the code of the file until where you have to start completion: function out_figure_movie( hFig, defaultFile, movieType, OPTIONS )
% OUT_FIGURE_MOVIE: Build a movie of the temporal evolution of the target figure.
% 
% USAGE:  out_figure_movie( hFig, defaultFile, movieType [, OPTIONS] )
%
% INPUT:
%     - hFig        : handle to figure to capture
%     - defaultFile : file name or default directory 
%     - movieType   : {'time', 'horizontal', 'vertical', 'allfig'}
%     - OPTIONS     : optional structure 
%          |- Duration    : number of seconds of video
%          |- FrameRate   : movie frame rate in fps
%          |- Quality     : [0,100]
%          |- TimeRange   : [tStart,tStop], time window to extract (all time defin
    
function instead
catch
    isVideoWriter = 0;
    % Display warning message
    disp(['BST> Warning: The VideoWriter function is not available in this version of Matlab.' 10 ...
          'BST>          Using the older avifile function instead (no compression).' 10 ...
          'BST>          For compressing your video files, you must run Windows 7 or MacOS 10.7 (or newer),' 10 ...
          'BST>          and Matlab R2010b (or newer) or the compiled version of Brainstorm.']);
    % Create file
    try 
        hMovie = avifile(MovieFile, ...
            'compression', 'none', ...
            'fps',         OPTIONS.FrameRate, ...
            'quality',     100);
    catch
        bst_error(['Cannot create new file: ' MovieFile], 'Video');
        return
    end