'fieldset', '#collapsible' => TRUE, '#collapsed' => TRUE, '#title' => t('Player file'), ); $form['flowplayer3_mediaplayer_file']['flowplayer3_mediaplayer_file'] = array( '#type' => 'textfield', '#default_value' => variable_get('flowplayer3_mediaplayer_file', FLOWPLAYER3_MEDIAPLAYER_FILE), '#title' => t('Player file'), '#description' => t('Specify the name of the player file - with FlowPlayer 3 this typically changes with each new release.'), '#size' => 20, ); // Initialise tree from this point forward as want to store arrays $form[FLOWPLAYER3_MEDIAPLAYER]['#tree'] = TRUE; // Clip settings $form[FLOWPLAYER3_MEDIAPLAYER]['clip'] = array( '#type' => 'fieldset', '#collapsible' => TRUE, '#collapsed' => TRUE, '#title' => t('Overall clip properties'), ); $form[FLOWPLAYER3_MEDIAPLAYER]['clip']['autoPlay'] = array( '#type' => 'select', '#options' => $options['bool'], '#default_value' => $saved_settings['clip']['autoPlay'], '#title' => t('Auto play'), '#description' => t('Flag indicating whether the player should start playback immediately upon loading.'), ); $form[FLOWPLAYER3_MEDIAPLAYER]['clip']['autoBuffering'] = array( '#type' => 'select', '#options' => $options['bool'], '#default_value' => $saved_settings['clip']['autoBuffering'], '#title' => t('Auto buffering'), '#description' => t('Flag indicating whether loading of clip into player\'s memory should begin straight away. '), ); $form[FLOWPLAYER3_MEDIAPLAYER]['clip']['scaling'] = array( '#type' => 'select', '#options' => $options['scaling'], '#default_value' => $saved_settings['clip']['scaling'], '#title' => t('Scaling'), '#description' => t('Specify how the clip should be scaled.'), ); $form[FLOWPLAYER3_MEDIAPLAYER]['clip']['start'] = array( '#type' => 'textfield', '#default_value' => $saved_settings['clip']['start'], '#title' => t('Start'), '#description' => t('Specify start point for playback (only works with a streaming server). Streaming support not yet in place for SWF Tools.'), '#size' => 8, ); $form[FLOWPLAYER3_MEDIAPLAYER]['clip']['duration'] = array( '#type' => 'textfield', '#default_value' => $saved_settings['clip']['duration'], '#title' => t('Duration'), '#description' => t('The time (in seconds) for which a video clip should be played until playback ceases.'), '#size' => 8, ); $form[FLOWPLAYER3_MEDIAPLAYER]['clip']['accelerated'] = array( '#type' => 'select', '#options' => $options['bool'], '#default_value' => $saved_settings['clip']['accelerated'], '#title' => t('Acceleration'), '#description' => t('Flag indicating whether Flash 9 (and above) hardware-accelerated full screen mode should be used.'), ); $form[FLOWPLAYER3_MEDIAPLAYER]['clip']['bufferLength'] = array( '#type' => 'textfield', '#default_value' => $saved_settings['clip']['bufferLength'], '#title' => t('Buffer length'), '#description' => t('The amount of video data (in seconds) which should be loaded into Flowplayer\'s memory in advance of playback commencing. '), '#size' => 8, ); $form[FLOWPLAYER3_MEDIAPLAYER]['clip']['provider'] = array( '#type' => 'textfield', '#default_value' => $saved_settings['clip']['provider'], '#title' => t('Provider'), '#description' => t('Not sure if this will be support in this module. Need to investigate.'), ); $form[FLOWPLAYER3_MEDIAPLAYER]['clip']['fadeInSpeed'] = array( '#type' => 'textfield', '#default_value' => $saved_settings['clip']['fadeInSpeed'], '#title' => t('Fade in speed'), '#description' => t('Time in milliseconds to fade from zero to full opacity upon commencement of video playback.'), '#size' => 8, ); $form[FLOWPLAYER3_MEDIAPLAYER]['clip']['fadeOutSpeed'] = array( '#type' => 'textfield', '#default_value' => $saved_settings['clip']['fadeOutSpeed'], '#title' => t('Fade out speed'), '#description' => t('Time in milliseconds to fade from full to zero opacity upon completion of video playback.'), '#size' => 8, ); $form[FLOWPLAYER3_MEDIAPLAYER]['clip']['linkUrl'] = array( '#type' => 'textfield', '#default_value' => $saved_settings['clip']['linkUrl'], '#title' => t('Link url'), '#description' => t('The URL to direct users to when clicking the video screen.'), ); $form[FLOWPLAYER3_MEDIAPLAYER]['clip']['linkWindow'] = array( '#type' => 'select', '#options' => $options['linkWindow'], '#default_value' => $saved_settings['clip']['linkWindow'], '#title' => t('Link window'), '#description' => t('Setting which defines where URL defined by linkUrl property is opened.'), ); $form[FLOWPLAYER3_MEDIAPLAYER]['clip']['live'] = array( '#type' => 'select', '#options' => $options['bool'], '#default_value' => $saved_settings['clip']['live'], '#title' => t('Live'), '#description' => t('RTMP streaming servers support live streaming, which means that it is possible to setup a video camera or other live video source to stream live video data to Flowplayer. If you have an RTMP server which is providing a live video stream, you should set this property to true. Streaming support not yet in place for SWF Tools.'), ); $form[FLOWPLAYER3_MEDIAPLAYER]['clip']['cuePointMultiplier'] = array( '#type' => 'textfield', '#default_value' => $saved_settings['clip']['cuePointMultiplier'], '#title' => t('Cue point multiplier'), '#description' => t('The times of embedded cuepoints are multiplied by this value before being used. Some encoding tools embed cuepoints in seconds but Flowplayer processes cuepoints in milliseconds. Note that the times are also rounded to the nearest 100 milliseconds. For example, if a file has a cuepoint at 5.535 seconds, the cuepoint is fired at 5500 milliseconds (assuming the default multiplier value of 1000).'), '#size' => 8, ); // Control bar settings $form[FLOWPLAYER3_MEDIAPLAYER]['controls'] = array( '#type' => 'fieldset', '#collapsible' => TRUE, '#collapsed' => TRUE, '#title' => t('Controlbar properties'), ); $form[FLOWPLAYER3_MEDIAPLAYER]['controls']['colorpicker'] = array( '#value' => '
', ); $form[FLOWPLAYER3_MEDIAPLAYER]['controls']['timeColor'] = array( '#type' => 'textfield', '#attributes' => array('class' => 'controls-colorpicker'), '#default_value' => $saved_settings['controls']['timeColor'], '#title' => t('Time color'), '#description' => t('Value for the font color in the time field. This is the running time.'), '#size' => 8, ); $form[FLOWPLAYER3_MEDIAPLAYER]['controls']['durationColor'] = array( '#type' => 'textfield', '#attributes' => array('class' => 'controls-colorpicker'), '#default_value' => $saved_settings['controls']['durationColor'], '#title' => t('Duration color'), '#description' => t('Value for the font color in the time field that specifies the total duration of the clip or "total time".'), '#size' => 8, ); $form[FLOWPLAYER3_MEDIAPLAYER]['controls']['progressColor'] = array( '#type' => 'textfield', '#attributes' => array('class' => 'controls-colorpicker'), '#default_value' => $saved_settings['controls']['progressColor'], '#title' => t('Progress color'), '#description' => t('Color of the progress bar. This is the bar in the timeline from zero time to the point where playback is at a given time.'), '#size' => 8, ); $form[FLOWPLAYER3_MEDIAPLAYER]['controls']['progressGradient'] = array( '#type' => 'select', '#options' => $options['gradient'], '#default_value' => $saved_settings['controls']['progressGradient'], '#title' => t('Progress gradient'), '#description' => t('Gradient setting for the progress bar.'), ); $form[FLOWPLAYER3_MEDIAPLAYER]['controls']['bufferColor'] = array( '#type' => 'textfield', '#attributes' => array('class' => 'controls-colorpicker'), '#default_value' => $saved_settings['controls']['bufferColor'], '#title' => t('Buffer color'), '#description' => t('Color of the buffer. The buffer is the bar that indicates how much video data has been read into the player\'s memory.'), '#size' => 8, ); $form[FLOWPLAYER3_MEDIAPLAYER]['controls']['bufferGradient'] = array( '#type' => 'select', '#options' => $options['gradient'], '#default_value' => $saved_settings['controls']['bufferGradient'], '#title' => t('Buffer gradient'), '#description' => t('Gradient setting for the buffer.'), ); $form[FLOWPLAYER3_MEDIAPLAYER]['controls']['sliderColor'] = array( '#type' => 'textfield', '#attributes' => array('class' => 'controls-colorpicker'), '#default_value' => $saved_settings['controls']['sliderColor'], '#title' => t('Slider color'), '#description' => t('Background color for the timeline before the buffer bar fills it. The same background color is also used in the volume slider.'), '#size' => 8, ); $form[FLOWPLAYER3_MEDIAPLAYER]['controls']['sliderGradient'] = array( '#type' => 'select', '#options' => $options['gradient'], '#default_value' => $saved_settings['controls']['sliderGradient'], '#title' => t('Slider gradient'), '#description' => t('Gradient setting for the sliders.'), ); $form[FLOWPLAYER3_MEDIAPLAYER]['controls']['buttonColor'] = array( '#type' => 'textfield', '#attributes' => array('class' => 'controls-colorpicker'), '#default_value' => $saved_settings['controls']['buttonColor'], '#title' => t('Button color'), '#description' => t('Color of the player buttons: stop, play, pause and fullscreen.'), '#size' => 8, ); $form[FLOWPLAYER3_MEDIAPLAYER]['controls']['buttonOverColor'] = array( '#type' => 'textfield', '#attributes' => array('class' => 'controls-colorpicker'), '#default_value' => $saved_settings['controls']['buttonOverColor'], '#title' => t('Button mouseover color'), '#description' => t('Button color when the mouse is positioned over them.'), '#size' => 8, ); $form[FLOWPLAYER3_MEDIAPLAYER]['controls']['autoHide'] = array( '#type' => 'select', '#options' => $options['autoHide'], '#default_value' => $saved_settings['controls']['autoHide'], '#title' => t('Hide control bar'), '#description' => t('Specifies whether the controlbar should be hidden when the user is not actively using the player.'), ); $form[FLOWPLAYER3_MEDIAPLAYER]['controls']['play'] = array( '#type' => 'select', '#options' => $options['bool'], '#default_value' => $saved_settings['controls']['play'], '#title' => t('Play button'), '#description' => t('Should the play/pause button be visible?'), ); $form[FLOWPLAYER3_MEDIAPLAYER]['controls']['volume'] = array( '#type' => 'select', '#options' => $options['bool'], '#default_value' => $saved_settings['controls']['volume'], '#title' => t('Volume button'), '#description' => t('Should the volume control be visible?'), ); $form[FLOWPLAYER3_MEDIAPLAYER]['controls']['mute'] = array( '#type' => 'select', '#options' => $options['bool'], '#default_value' => $saved_settings['controls']['mute'], '#title' => t('Mute button'), '#description' => t('Should the mute button be visible?'), ); $form[FLOWPLAYER3_MEDIAPLAYER]['controls']['time'] = array( '#type' => 'select', '#options' => $options['bool'], '#default_value' => $saved_settings['controls']['time'], '#title' => t('Time display'), '#description' => t('Should the time display be visible?'), ); $form[FLOWPLAYER3_MEDIAPLAYER]['controls']['stop'] = array( '#type' => 'select', '#options' => $options['bool'], '#default_value' => $saved_settings['controls']['stop'], '#title' => t('Stop button'), '#description' => t('Should the stop button be visible?'), ); $form[FLOWPLAYER3_MEDIAPLAYER]['controls']['playlist'] = array( '#type' => 'select', '#options' => $options['bool'], '#default_value' => $saved_settings['controls']['playlist'], '#title' => t('Playlist buttons'), '#description' => t('Should the playlist buttons be visible. These buttons will allow navigation through the playlist entries that have been configured for the player. These buttons are always hidden if there are less than two entries in the playlist.'), ); $form[FLOWPLAYER3_MEDIAPLAYER]['controls']['fullscreen'] = array( '#type' => 'select', '#options' => $options['bool'], '#default_value' => $saved_settings['controls']['fullscreen'], '#title' => t('Fullscreen button'), '#description' => t('Should the fullscreen button be visible?'), ); $form[FLOWPLAYER3_MEDIAPLAYER]['controls']['scrubber'] = array( '#type' => 'select', '#options' => $options['bool'], '#default_value' => $saved_settings['controls']['scrubber'], '#title' => t('Scrubber'), '#description' => t('The scrubber is a well known nickname for the timeline/playhead combination. This specifies whether it should be visible.'), ); // Canvas settings $form[FLOWPLAYER3_MEDIAPLAYER]['canvas'] = array( '#type' => 'fieldset', '#collapsible' => TRUE, '#collapsed' => TRUE, '#title' => t('Canvas properties'), ); $form[FLOWPLAYER3_MEDIAPLAYER]['canvas']['colorpicker'] = array( '#value' => '
', ); $form[FLOWPLAYER3_MEDIAPLAYER]['canvas']['backgroundColor'] = array( '#type' => 'textfield', '#attributes' => array('class' => 'canvas-colorpicker'), '#default_value' => $saved_settings['canvas']['backgroundColor'], '#title' => t('Background color'), '#description' => t('Background color as a hexadecimal value.'), '#size' => 8, ); $form[FLOWPLAYER3_MEDIAPLAYER]['canvas']['backgroundImage'] = array( '#type' => 'textfield', '#default_value' => $saved_settings['canvas']['backgroundImage'], '#title' => t('Background image'), '#description' => t('The absolute or relative path to the image that should be used as the background to this plugin. Supported formats are GIF, JPEG and PNG. The syntax is similar to CSS in that you must enclose your path inside a url() wrapper.'), '#size' => 24, ); $form[FLOWPLAYER3_MEDIAPLAYER]['canvas']['backgroundRepeat'] = array( '#type' => 'select', '#options' => $options['backgroundRepeat'], '#default_value' => $saved_settings['canvas']['backgroundRepeat'], '#title' => t('Background repeat'), '#description' => t('Default is "repeat", which makes the background image repeat both horizontally and vertically. "no-repeat" displays the background image only once from the top left-hand corner.'), ); $form[FLOWPLAYER3_MEDIAPLAYER]['canvas']['backgroundGradient'] = array( '#type' => 'select', '#options' => $options['gradient'], '#default_value' => $saved_settings['canvas']['backgroundGradient'], '#title' => t('Background gradient'), '#description' => t('Gradient setting for the canvas.'), ); $form[FLOWPLAYER3_MEDIAPLAYER]['canvas']['border'] = array( '#type' => 'textfield', '#default_value' => $saved_settings['canvas']['border'], '#title' => t('Border'), '#description' => t('Draws a border around a plugin\'s edges. The syntax follows the CSS standard: width style color. For example: "1px solid #cccccc". The only supported style currently is "solid", but the width and colour can be set to any valid value.'), '#size' => 24, ); $form[FLOWPLAYER3_MEDIAPLAYER]['canvas']['borderRadius'] = array( '#type' => 'textfield', '#default_value' => $saved_settings['canvas']['borderRadius'], '#title' => t('Border radius'), '#description' => t('Specifies the amount of rounding for each corner. Larger values mean more rounding.'), '#size' => 8, ); // Return finished form return system_settings_form($form); } /** * Options used to populate the select elements of the form above * Collect them here to make them easier to find and adjust! */ function _flowplayer3_options() { $options['bool'] = array('true' => 'true', 'false' => 'false'); $options['linkWindow'] = array('_blank' => '_blank', '_parent' => '_parent', '_self' => '_self', '_top' => '_top'); $options['scaling'] = array('fit' => 'fit', 'half' => 'half', 'orig' => 'orig', 'scale' => 'scale'); $options['gradient'] = array('none' => 'none', 'low' => 'low', 'medium' => 'medium', 'high' => 'high'); $options['autoHide'] = array('never' => 'never', 'always' => 'always', 'fullscreen' => 'fullscreen'); $options['backgroundRepeat'] = array('no-repeat' => 'no-repeat', 'repeat' => 'repeat'); return $options; }