From decfc56d65741aff41cccd17daf2abad6d44647a Mon Sep 17 00:00:00 2001 From: Tat Dat Duong Date: Tue, 10 Oct 2023 10:36:04 +0200 Subject: [PATCH] Upgrade to hls.js --- package.json | 2 +- src/components/LogStream.tsx | 7 +++++-- yarn.lock | 7 ++++++- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 8875000..6a5555c 100644 --- a/package.json +++ b/package.json @@ -32,7 +32,7 @@ "cors": "^2.8.5", "dayjs": "^1.11.7", "fluent-ffmpeg": "^2.1.2", - "hls.js": "1.1.2", + "hls.js": "^1.4.12", "knex": "^0.95.5", "mkdirp": "^1.0.4", "mysql2": "^2.3.3", diff --git a/src/components/LogStream.tsx b/src/components/LogStream.tsx index e35105a..a3f1705 100644 --- a/src/components/LogStream.tsx +++ b/src/components/LogStream.tsx @@ -62,7 +62,7 @@ export function LogStream(props: { "playing" in playback ? now.add(playback.playing, "millisecond") : playback.paused - ).add(serverDiff, "millisecond") + ).add?.(serverDiff, "millisecond") const currentItem = log.data?.find( ({ timestamp }) => dayjs(timestamp).valueOf() <= displayDate.valueOf() @@ -125,7 +125,10 @@ export function LogStream(props: { })} {sum !== 0 &&
Celkem: ... {sum} Kč
} {currentItem.data.paid !== 0 && ( -
Vrátit: ... {currentItem.data.paid} Kč
+ <> +
Zaplaceno: ... {currentItem.data.paid} Kč
+
Vrátit: ... {currentItem.data.paid - sum} Kč
+ )} )} diff --git a/yarn.lock b/yarn.lock index 99f1284..3f6da8f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2513,11 +2513,16 @@ has@^1.0.3: dependencies: function-bind "^1.1.1" -hls.js@*, hls.js@1.1.2: +hls.js@*: version "1.1.2" resolved "https://registry.yarnpkg.com/hls.js/-/hls.js-1.1.2.tgz#71691e11928e54ead9696bc64b88c1b9914c394d" integrity sha512-ujditC4vvBmZd00RRNfNPLgFVlqEeUX4sAFv5lGhBHuql8iAZodOdlZTD3em/1zo7vyjQp12up/lCVqQk8dvxA== +hls.js@^1.4.12: + version "1.4.12" + resolved "https://registry.yarnpkg.com/hls.js/-/hls.js-1.4.12.tgz#2022daa29d10c662387d80a5297f8330f8ef5ee2" + integrity sha512-1RBpx2VihibzE3WE9kGoVCtrhhDWTzydzElk/kyRbEOLnb1WIE+3ZabM/L8BqKFTCL3pUy4QzhXgD1Q6Igr1JA== + hoist-non-react-statics@^3.3.1, hoist-non-react-statics@^3.3.2: version "3.3.2" resolved "https://registry.yarnpkg.com/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz#ece0acaf71d62c2969c2ec59feff42a4b1a85b45"