Skip to content
Permalink
Browse files

Fixed the french captions in the YouTube player

Fixes #6718
  • Loading branch information...
LaurentGoderre committed Apr 24, 2015
1 parent 2766e01 commit a39f316a0867107352b0561a0e37413a8e3bae16
Showing with 7 additions and 2 deletions.
  1. +7 −2 src/plugins/multimedia/multimedia.js
@@ -460,8 +460,13 @@ var componentName = "wb-mltmd",
case "setCaptionsVisible":
if ( args ) {
$( this ).addClass( captionClass );
this.object.loadModule( "cc" );
this.object.loadModule( "captions" );
try {
this.object.loadModule( "cc" );
this.object.setOption( "cc", "track", { languageCode: this.object.getOption( "cc", "tracklist" )[ 0 ].languageCode } );
} catch ( e ) {
this.object.loadModule( "captions" );
this.object.setOption( "captions", "track", { languageCode: this.object.getOption( "captions", "tracklist" )[ 0 ].languageCode } );
}
} else {
$( this ).removeClass( captionClass );
this.object.unloadModule( "cc" );

0 comments on commit a39f316

Please sign in to comment.
You can’t perform that action at this time.