Skip to content

ActivityPub-federated video streaming platform using P2P directly in your web browser

Fix 00:00 player timestamp

Chocobozzzfc4188746340
diff --git a/client/angular.json b/client/angular.json
index 5ecc335cbb..cf92c7ade2 100644
--- a/client/angular.json
+++ b/client/angular.json
@@ -150,6 +150,7 @@
"linkifyjs/html",
"linkifyjs",
"markdown-it",
+ "markdown-it-emoji/light",
"sanitize-html",
"socket.io-client",
"socket.io-parser",
diff --git a/client/src/assets/player/utils.ts b/client/src/assets/player/utils.ts
index 280f721bdb..6767459ce9 100644
--- a/client/src/assets/player/utils.ts
+++ b/client/src/assets/player/utils.ts
@@ -68,7 +68,7 @@ function buildVideoLink (options: {
const params = generateParams(window.location.search)
- if (options.startTime) {
+ if (options.startTime !== undefined && options.startTime !== null) {
const startTimeInt = Math.floor(options.startTime)
params.set('start', secondsToTime(startTimeInt))
}
@@ -146,6 +146,8 @@ function timeToInt (time: number | string) {
function secondsToTime (seconds: number, full = false, symbol?: string) {
let time = ''
+ if (seconds === 0 && !full) return '0s'
+
const hourSymbol = (symbol || 'h')
const minuteSymbol = (symbol || 'm')
const secondsSymbol = full ? '' : 's'