Skip to content
This repository has been archived by the owner on Jan 16, 2023. It is now read-only.

Commit

Permalink
Fix some problems when there are no thumbnails in stream (Dash-Indust…
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremco authored and jeffcunat committed Jul 6, 2020
1 parent 31ac759 commit 7b58838
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion contrib/akamai/controlbar/ControlBar.js
Expand Up @@ -581,7 +581,7 @@ var ControlBar = function (dashjsMediaPlayer, displayUTCTimeCodes) {
el = createMenuContent(el, getMenuContent(menuType, info.audio, contentFunc), 'audio', 'audio-' + menuType + '-list');
setMenuItemsState(getMenuInitialIndex(info.audio, menuType, 'audio'), 'audio-' + menuType + '-list');
}
if (info.images.length > 1) {
if (info.images && info.images.length > 1) {
el.appendChild(createMediaTypeMenu('image'));
el = createMenuContent(el, getMenuContent(menuType, info.images, contentFunc, false), 'image', 'image-' + menuType + '-list');
setMenuItemsState(getMenuInitialIndex(info.images, menuType, 'image'), 'image-' + menuType + '-list');
Expand Down
3 changes: 3 additions & 0 deletions src/streaming/MediaPlayer.js
Expand Up @@ -1665,16 +1665,19 @@ function MediaPlayer() {
}
if (time < 0) {
callback(null);
return;
}
const s = playbackController.getIsDynamic() ? getDVRSeekOffset(time) : time;
const stream = streamController.getStreamForTime(s);
if (stream === null) {
callback(null);
return;
}

const thumbnailController = stream.getThumbnailController();
if (!thumbnailController) {
callback(null);
return;
}

const timeInPeriod = streamController.getTimeRelativeToStreamId(s, stream.getId());
Expand Down

0 comments on commit 7b58838

Please sign in to comment.