Match media direction to timeline.

This commit is contained in:
Dermot Duffy
2023-02-08 19:51:57 -08:00
parent 1d4cb3f9ff
commit 479671ab6c
8 changed files with 77 additions and 56 deletions
+3 -2
View File
@@ -198,8 +198,9 @@ const executeMediaQueryForView = async (
if (!mediaArray) {
return null;
}
const queryResults = new MediaQueriesResults(mediaArray);
// Select the last item by default (which is the most recent).
const selectedIndex = mediaArray.length ? mediaArray.length - 1 : undefined;
const queryResults = new MediaQueriesResults(mediaArray, selectedIndex);
let viewerContext: ViewContext | undefined = {};
if (options?.targetTime && options.cameraIDs) {