mirror of
https://github.com/blakeblackshear/frigate.git
synced 2024-11-21 19:07:46 +01:00
UI Fixes (#9177)
* Fix mobile crash * Reduce tap timeout * Fix selection * Try to fix safari empty frame * Fix config editor
This commit is contained in:
parent
d2ab44ce72
commit
6dd9d54f70
@ -186,8 +186,8 @@ function PreviewContent({
|
|||||||
|
|
||||||
const touchEnd = new Date().getTime();
|
const touchEnd = new Date().getTime();
|
||||||
|
|
||||||
// consider tap less than 300 ms
|
// consider tap less than 100 ms
|
||||||
if (touchEnd - touchStart < 300) {
|
if (touchEnd - touchStart < 100) {
|
||||||
onClick();
|
onClick();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -122,7 +122,7 @@ function ConfigEditor() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="absolute h-[70%] w-[96%] md:h-[85%] md:w-[88%]">
|
<div className="absolute top-24 bottom-16 right-0 left-0 md:left-24 lg:left-40">
|
||||||
<div className="lg:flex justify-between mr-1">
|
<div className="lg:flex justify-between mr-1">
|
||||||
<Heading as="h2">Config</Heading>
|
<Heading as="h2">Config</Heading>
|
||||||
<div>
|
<div>
|
||||||
|
@ -203,7 +203,7 @@ export default function MobileTimelineView({
|
|||||||
<VideoPlayer
|
<VideoPlayer
|
||||||
options={{
|
options={{
|
||||||
preload: "auto",
|
preload: "auto",
|
||||||
autoplay: false,
|
autoplay: true,
|
||||||
controls: false,
|
controls: false,
|
||||||
muted: true,
|
muted: true,
|
||||||
loadingSpinner: false,
|
loadingSpinner: false,
|
||||||
@ -217,6 +217,7 @@ export default function MobileTimelineView({
|
|||||||
seekOptions={{}}
|
seekOptions={{}}
|
||||||
onReady={(player) => {
|
onReady={(player) => {
|
||||||
previewRef.current = player;
|
previewRef.current = player;
|
||||||
|
player.pause();
|
||||||
player.on("seeked", () => setSeeking(false));
|
player.on("seeked", () => setSeeking(false));
|
||||||
}}
|
}}
|
||||||
onDispose={() => {
|
onDispose={() => {
|
||||||
@ -251,7 +252,8 @@ export default function MobileTimelineView({
|
|||||||
timechangedHandler={onStopScrubbing}
|
timechangedHandler={onStopScrubbing}
|
||||||
selectHandler={(data) => {
|
selectHandler={(data) => {
|
||||||
if (data.items.length > 0) {
|
if (data.items.length > 0) {
|
||||||
const selected = data.items[0];
|
const selected = parseFloat(data.items[0].split("-")[0]);
|
||||||
|
|
||||||
onSelectItem(
|
onSelectItem(
|
||||||
playback.timelineItems.find(
|
playback.timelineItems.find(
|
||||||
(timeline) => timeline.timestamp == selected
|
(timeline) => timeline.timestamp == selected
|
||||||
@ -267,9 +269,9 @@ export default function MobileTimelineView({
|
|||||||
}
|
}
|
||||||
|
|
||||||
function timelineItemsToScrubber(items: Timeline[]): ScrubberItem[] {
|
function timelineItemsToScrubber(items: Timeline[]): ScrubberItem[] {
|
||||||
return items.map((item) => {
|
return items.map((item, idx) => {
|
||||||
return {
|
return {
|
||||||
id: item.timestamp,
|
id: `${item.timestamp}-${idx}`,
|
||||||
content: getTimelineContentElement(item),
|
content: getTimelineContentElement(item),
|
||||||
start: new Date(item.timestamp * 1000),
|
start: new Date(item.timestamp * 1000),
|
||||||
end: new Date(item.timestamp * 1000),
|
end: new Date(item.timestamp * 1000),
|
||||||
|
Loading…
Reference in New Issue
Block a user