1HJ2M3S for 1 hour, 2 minutes and 3 seconds. 5M for 5 minutes.', ARVE_SLUG ),
),
array(
'attr' => 'autoplay',
'label' => esc_html__('Autoplay', ARVE_SLUG ),
'type' => 'select',
'options' => array(
'' => sprintf(
__( 'Default (current setting: %s)', ARVE_SLUG ),
( $options['autoplay'] ) ? esc_html__( 'Yes', ARVE_SLUG ) : esc_html__( 'No', ARVE_SLUG )
),
'yes' => esc_html__( 'Yes', ARVE_SLUG ),
'no' => esc_html__( 'No', ARVE_SLUG ),
),
'description' => esc_html__( 'Autoplay videos in normal mode, has no effect on lazyload modes.', ARVE_SLUG ),
),
array(
'hide_from_sc' => true,
'attr' => 'video_maxwidth',
'label' => esc_html__('Maximal Width', ARVE_SLUG),
'type' => 'number',
'description' => esc_html__( 'Optional, if not set your videos will be the maximum size of the container they are in. If your content area has a big width you might want to set this. Must be 100+ to work.', ARVE_SLUG ),
),
array(
'hide_from_settings' => true,
'attr' => 'maxwidth',
'label' => esc_html__('Maximal Width', ARVE_SLUG),
'type' => 'number',
'meta' => array(
'placeholder' => esc_attr__( 'in px - leave empty to use settings', ARVE_SLUG),
),
),
array(
'hide_from_sc' => true,
'attr' => 'align_maxwidth',
'label' => esc_html__('Align Maximal Width', ARVE_SLUG),
'type' => 'number',
'description' => esc_attr__( 'In px, Needed! Must be 100+ to work.', ARVE_SLUG ),
),
array(
'hide_from_settings' => true,
'attr' => 'aspect_ratio',
'label' => __('Aspect Ratio', ARVE_SLUG),
'type' => 'text',
'meta' => array(
'placeholder' => __( 'Custom aspect ratio like 4:3, 21:9 ... Leave empty for default.', ARVE_SLUG),
),
),
array(
'hide_from_settings' => true,
'attr' => 'parameters',
'label' => esc_html__('Parameters', ARVE_SLUG ),
'type' => 'text',
'meta' => array(
'placeholder' => __( 'provider specific parameters', ARVE_SLUG ),
),
'description' => sprintf(
__(
'Note this values get merged with values set on the ARVE setting page. Example for YouTube fs=0&start=30. For reference: Youtube Parameters, Dailymotion Parameters, Vimeo Parameters.',
ARVE_SLUG
),
admin_url( 'admin.php?page=advanced-responsive-video-embedder' ),
'https://developers.google.com/youtube/player_parameters',
'http://www.dailymotion.com/doc/api/player.html#parameters',
'https://developer.vimeo.com/player/embedding',
'TODO settings page link'
),
),
array(
'hide_from_sc' => true,
'attr' => 'wp_image_cache_time',
'label' => esc_html__('Image Cache Time', ARVE_SLUG),
'type' => 'number',
'description' => __( '(seconds) This plugin uses WordPress transients to cache video thumbnail URLS. This setting defines how long image URLs from the media Gallery are being stored before running WPs fuctions again to request them. For example: hour - 3600, day - 86400, week - 604800.', ARVE_SLUG ),
),
array(
'hide_from_sc' => true,
'attr' => 'wp_video_override',
'label' => esc_html__( 'Use ARVE for HTML5 video embeds', ARVE_SLUG ),
'type' => 'select',
'options' => array(
'yes' => esc_html__( 'Yes', ARVE_SLUG ),
'no' => esc_html__( 'No', ARVE_SLUG ),
),
'description' => esc_html__( "Use ARVE to embed HTML5 video files. ARVE uses the browsers players instead of loading the mediaelement player that WP uses.", ARVE_SLUG ),
),
array(
'attr' => 'controlslist',
'label' => esc_html__( 'Chrome HTML5 Player controls', ARVE_SLUG ),
'type' => 'text',
'description' => __( "controlsList attribute on <video> for example use nodownload nofullscreen noremoteplayback to hide the download and the fullscreen button on the chrome HTML5 video player and disable remote playback.", ARVE_SLUG ),
),
array(
'hide_from_settings' => true,
'attr' => 'mp4',
'label' => esc_html__('mp4 file', ARVE_SLUG),
'type' => 'url',
#'type' => 'attachment',
#'libraryType' => array( 'video' ),
#'addButton' => esc_html__( 'Select .mp4 file', ARVE_SLUG ),
#'frameTitle' => esc_html__( 'Select .mp4 file', ARVE_SLUG ),
'meta' => array(
'placeholder' => __( '.mp4 file url for HTML5 video', ARVE_SLUG ),
),
),
array(
'hide_from_settings' => true,
'attr' => 'webm',
'label' => esc_html__('webm file', ARVE_SLUG),
'type' => 'url',
#'type' => 'attachment',
#'libraryType' => array( 'video' ),
#'addButton' => esc_html__( 'Select .webm file', ARVE_SLUG ),
#'frameTitle' => esc_html__( 'Select .webm file', ARVE_SLUG ),
'meta' => array(
'placeholder' => __( '.webm file url for HTML5 video', ARVE_SLUG ),
),
),
array(
'hide_from_settings' => true,
'attr' => 'ogv',
'label' => esc_html__('ogv file', ARVE_SLUG),
'type' => 'url',
#'type' => 'attachment',
#'libraryType' => array( 'video' ),
#'addButton' => esc_html__( 'Select .ogv file', ARVE_SLUG ),
#'frameTitle' => esc_html__( 'Select .ogv file', ARVE_SLUG ),
'meta' => array(
'placeholder' => __( '.ogv file url for HTML5 video', ARVE_SLUG ),
),
),
array(
'hide_from_settings' => true,
'attr' => 'controls',
'label' => esc_html__( 'Show Controls?', ARVE_SLUG ),
'type' => 'select',
'options' => array(
'' => esc_html__( 'Yes', ARVE_SLUG ),
'no' => esc_html__( 'No', ARVE_SLUG ),
),
'description' => esc_html__( 'Show controls on HTML5 video.', ARVE_SLUG ),
),
array(
'hide_from_settings' => true,
'attr' => 'loop',
'label' => esc_html__( 'Loop?', ARVE_SLUG ),
'type' => 'select',
'options' => array(
'' => esc_html__( 'No', ARVE_SLUG ),
'yes' => esc_html__( 'Yes', ARVE_SLUG ),
),
'description' => esc_html__( 'Loop HTML5 video.', ARVE_SLUG ),
),
array(
'hide_from_settings' => true,
'attr' => 'muted',
'label' => esc_html__( 'Mute?', ARVE_SLUG ),
'type' => 'select',
'options' => array(
'' => esc_html__( 'No', ARVE_SLUG ),
'yes' => esc_html__( 'Yes', ARVE_SLUG ),
),
'description' => esc_html__( 'Mute HTML5 video.', ARVE_SLUG ),
),
array(
'hide_from_sc' => true,
'attr' => 'iframe_flash',
'label' => esc_html__( 'Allow Flash for general iframe?', ARVE_SLUG ),
'type' => 'select',
'options' => array(
'yes' => esc_html__( 'Allow Flash', ARVE_SLUG ),
'no' => esc_html__( 'Do not allow Flash', ARVE_SLUG ),
),
'description' => sprintf(
__( 'It is recommented to have this disabled if you not embed videos from a not listed provider that still requires flash and is not listed here. Disable flash will make general iframe embeds more secure, prevents evil redirection from within the iframe. This also makes the Pro Addon\'s \'Disable Links\' feature possible for unlisted providers. Note you can still put disable_flash="yes/no" on individual shortcodes to overwrite this if needed.', ARVE_SLUG ),
'https://nextgenthemes.com/plugins/arve-pro/#support-table'
),
),
array(
'hide_from_sc' => true,
'attr' => 'always_enqueue_assets',
'label' => esc_html__( 'Assent loading', ARVE_SLUG ),
'type' => 'select',
'options' => array(
'no' => esc_html__( 'When ARVE video is detected', ARVE_SLUG ),
'yes' => esc_html__( 'Always', ARVE_SLUG ),
),
'description' => sprintf(
__( 'Usually ARVE will loads its scripts and styles only on pages what need them. In case your content is loaded via AJAX or the styles are not loaded for another reason you may have to enable this option', ARVE_SLUG ),
'https://nextgenthemes.com/plugins/arve-pro/#support-table'
),
),
array(
'hide_from_sc' => true,
'attr' => 'vimeo_api_token',
'label' => esc_html__( 'Video API Token', ARVE_SLUG ),
'type' => 'text',
'description' => esc_html__( 'Leave blank for now.', ARVE_SLUG ),
),
);
}
/**
*
*
* @since 5.4.0
*/
function arve_get_mode_options( $selected ) {
$modes = arve_get_supported_modes();
$out = '';
foreach( $modes as $mode => $desc ) {
$out .= sprintf(
'',
esc_attr( $mode ),
selected( $selected, $mode, false ),
$desc
);
}
return $out;
}
function arve_get_supported_modes() {
return apply_filters( 'arve_modes', array( 'normal' => __( 'Normal', ARVE_SLUG ) ) );
}
function arve_get_iframe_providers() {
}
function arve_get_host_properties() {
$s = 'https?://(www\.)?';
$properties = array(
'allmyvideos' => array(
'name' => 'allmyvideos.net',
'regex' => $s . 'allmyvideos\.net/(embed-)?(?House of Lies Season 5 Premiere from Showtime on Myspace.
'regex' => $s . 'myspace\.com/.+/(?