Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/common/CONSTANTS.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ const EXTERNAL_PLAYERS = [
{
label: 'VLC',
value: 'vlc',
platforms: ['ios', 'visionos', 'android'],
platforms: ['ios', 'visionos', 'android', 'windows', 'linux', 'macos'],
},
{
label: 'MPV',
Expand Down
17 changes: 16 additions & 1 deletion src/routes/MetaDetails/StreamsList/Stream/Stream.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ const Stream = ({ className, videoId, videoReleased, addonName, name, descriptio
const popupMenuOnKeyDown = React.useCallback((event) => {
event.nativeEvent.buttonClickPrevented = true;
}, []);

const href = React.useMemo(() => {
return deepLinks ?
deepLinks.externalPlayer ?
Expand Down Expand Up @@ -101,6 +100,10 @@ const Stream = ({ className, videoId, videoReleased, addonName, name, descriptio
}
}, [videoId, videoReleased]);

const streamingUrl = React.useMemo(() => {
return deepLinks?.externalPlayer?.streaming;
}, [deepLinks]);

const onClick = React.useCallback((event) => {
if (profile.settings.playerType !== null) {
markVideoAsWatched();
Expand All @@ -109,6 +112,18 @@ const Stream = ({ className, videoId, videoReleased, addonName, name, descriptio
title: 'Stream opened in external player',
timeout: 4000
});
if (profile.settings.playerType === 'vlc' && streamingUrl) {
core.transport.dispatch({
action: 'StreamingServer',
args: {
action: 'PlayOnDevice',
args: {
device: 'vlc',
source: streamingUrl,
}
}
});
}
}

if (typeof props.onClick === 'function') {
Expand Down