-
If a video has both an auto generated transcript that is not active and a manually uploaded transcript that is active, the plugin will use the first text track provided by the Vimeo API regardless of whether it is set active or not.
The API result returns an “active” flag according to their documentation which can be used to determine which is the correct track to use for transcripts.
Suggested fix:
fv-vimeo-ajax.php – line 158, add:
$new->active = $subtitles['active'];
vimeo.class.php – line 400, add:
$new->active = $subtitles['active'];
transcript.class.php – starting on line 186, change to:
$objVideo = FV_Player_Pro_Vimeo()->get_vimeo( $src ); if ( $objVideo && ! empty( $objVideo->request->text_tracks ) ) { $active_track = array_filter( $objVideo->request->text_tracks, function ( $track ) { return $track->active; } ); $found_track = ( ! empty( $active_track ) ) ? array_values( $active_track )[0] : $objVideo->request->text_tracks[0]; if ( $found_track && ! empty( $found_track->url ) ) { $transcriptUrl = $found_track->url; if ( stripos( $transcriptUrl, 'http://' ) !== 0 && stripos( $transcriptUrl, 'https://' ) !== 0 ) { $transcriptUrl = 'https://vimeo.com' . $transcriptUrl; } } }