fix videojs bug when switching cameras, support recording delay, fix navigation highlight

This commit is contained in:
Jason Hunter
2021-06-02 23:20:07 -04:00
committed by Blake Blackshear
parent ca20c735f7
commit 9822d614e2
6 changed files with 108 additions and 28 deletions

View File

@@ -44,7 +44,7 @@ export default function Recording({ camera, date, hour, seconds }) {
const selectedHour = hours.indexOf(hour);
if (this.player !== undefined) {
if (this.player) {
this.player.playlist([]);
this.player.playlist(playlist);
this.player.playlist.autoadvance(0);
@@ -74,8 +74,11 @@ export default function Recording({ camera, date, hour, seconds }) {
this.player = player;
}
}}
onDispose={() => {
this.player = null;
}}
>
<RecordingPlaylist camera={camera} recordings={data} selectedDate={selectedKey} />
<RecordingPlaylist camera={camera} recordings={data} selectedDate={selectedKey} selectedHour={hour} />
</VideoPlayer>
</div>
);