Viewing 1 replies (of 1 total)
  • Thread Starter m.ambrosy

    (@mambrosy)

    Ok I found how to make this.

    In file mediaelement-js-wp.php :

    Replace :

    // captions
    		'captions' => '',
    		'captionslang' => 'en'

    by :

    // captions
    		'captions' => '',
    		'captionsdefault' => '',
    		'captionslang' => 'en'

    Add :

    if ($captionsdefault) {
    		$captionsdefault_source = 'startLanguage: "'.$captionsdefault.'"';
    	}

    Replace :

    {$loop_option}
    		{$controls_option}
    		{$audio_size}

    By :

    {$loop_option}
    		{$controls_option}
    		{$audio_size}
    		,{$captionsdefault_source}

    Now, you can use the new tag captionsdefault like this :
    [video src="XXX" captions="XXX" captionslang="fr" captionsdefault="fr"]

Viewing 1 replies (of 1 total)
  • The topic ‘How to define a captions language by default ?’ is closed to new replies.