mirror of
https://github.com/Dispatcharr/Dispatcharr.git
synced 2026-07-18 00:55:50 +00:00
Enhancement: Include channelId in video playback parameters for better tracking
This commit is contained in:
parent
a80af16e6a
commit
01e356c156
2 changed files with 12 additions and 5 deletions
|
|
@ -575,12 +575,19 @@ const ChannelStreams = ({ channel }) => {
|
|||
if (wasVisible && !isVideoVisible) {
|
||||
const meta = lastPreviewMetaRef.current;
|
||||
lastPreviewMetaRef.current = null;
|
||||
const streamId = meta && meta.streamId;
|
||||
const channelId = channelRef.current?.id;
|
||||
const previewedStreamId = meta && meta.streamId;
|
||||
const previewedChannelId = meta && meta.channelId;
|
||||
if (
|
||||
streamId != null &&
|
||||
(dataRef.current || []).some((s) => s.id === streamId)
|
||||
previewedStreamId != null &&
|
||||
(dataRef.current || []).some((s) => s.id === previewedStreamId)
|
||||
) {
|
||||
refreshStats({ ids: [streamId] });
|
||||
refreshStats({ ids: [previewedStreamId] });
|
||||
} else if (
|
||||
previewedChannelId != null &&
|
||||
previewedChannelId === channelId
|
||||
) {
|
||||
refreshStats();
|
||||
}
|
||||
}
|
||||
}, [isVideoVisible, refreshStats]);
|
||||
|
|
|
|||
|
|
@ -689,7 +689,7 @@ const ChannelsTable = ({ onReady }) => {
|
|||
const handleWatchStream = useCallback(
|
||||
(channel) => {
|
||||
const url = getChannelURL(channel);
|
||||
showVideo(url, 'live', { name: channel.name });
|
||||
showVideo(url, 'live', { name: channel.name, channelId: channel.id });
|
||||
},
|
||||
[getChannelURL, showVideo]
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue