tangled
alpha
login
or
join now
stream.place
/
streamplace
79
fork
atom
Live video on the AT Protocol
79
fork
atom
overview
issues
pulls
pipelines
bugfix: add offline setting and fix timestamp parsing
seiso.moe
11 months ago
2b4e6478
4e64346c
+7
-3
1 changed file
expand all
collapse all
unified
split
js
app
components
livestream
livestream.tsx
+7
-3
js/app/components/livestream/livestream.tsx
reviewed
···
72
72
const streamerProfile = streamerDID ? profiles[streamerDID] : undefined;
73
73
const streamerHandle = streamerProfile?.handle;
74
74
const startTime = player.livestream?.record?.createdAt
75
75
-
? new Date(player.livestream?.record?.createdAt) : undefined;
75
75
+
? new Date(player.livestream?.record?.createdAt)
76
76
+
: undefined;
76
77
77
78
// this would all be really easy if i had library that would give me the
78
79
// safe area view height and width but i don't. so let's measure
···
112
113
const cuttOffDate = new Date(Date.now() - 10 * 1000);
113
114
// 15 second cut off if segment start time not found
114
115
const startTime = player.segment?.startTime
115
115
-
? new Date(player.segment?.startTime) : new Date(Date.now() - 15 * 1000);
116
116
+
? new Date(player.segment?.startTime)
117
117
+
: new Date(Date.now() - 15 * 1000);
116
118
117
119
if (startTime > cuttOffDate) {
118
120
setOffline(false);
···
278
280
)}
279
281
</View>
280
282
<View flexDirection="row" alignItems="center" gap="$2">
281
281
-
{(startTime instanceof Date) && !offline && <Timer start={startTime} />}
283
283
+
{startTime instanceof Date && !offline && (
284
284
+
<Timer start={startTime} />
285
285
+
)}
282
286
<Viewers viewers={player.viewers ?? 0} />
283
287
<Button
284
288
backgroundColor="transparent"