Skip to content

Commit

Permalink
Merge pull request #21 from solodolo/video-js-captions
Browse files Browse the repository at this point in the history
Set video captions when using VideoJS media viewer
  • Loading branch information
collectiveaccess authored Oct 27, 2020
2 parents 01c31c3 + 6390eef commit 84e6703
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/lib/Media/MediaViewers/VideoJS.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,10 @@ public static function getViewerHTML($po_request, $ps_identifier, $pa_data=null,
$o_view->setVar('id', $vs_id = 'caMediaOverlayTimebased_'.$t_instance->getPrimaryKey().'_'.($vs_display_type = caGetOption('display_type', $pa_data, caGetOption('display_version', $pa_data['display'], ''))));

if (is_a($t_instance, "ca_object_representations")) {
$poster = $t_instance->getMediaUrl('media', caGetOption('viewer_poster_version', $pa_data['display'], 'small'));
$poster = $t_instance->getMediaUrl('media', caGetOption('viewer_poster_version', $pa_data['display'], 'small'));
$va_viewer_opts = [
'id' => $vs_id, 'viewer_width' => caGetOption('viewer_width', $pa_data['display'], '100%'), 'viewer_height' => caGetOption('viewer_height', $pa_data['display'], '100%'),
'poster_frame_url' => $poster
'poster_frame_url' => $poster, 'captions' => $t_instance->getCaptionFileList()
];

if (!$t_instance->hasMediaVersion('media', $vs_version = caGetOption('display_version', $pa_data['display'], 'original'))) {
Expand Down

0 comments on commit 84e6703

Please sign in to comment.