mirror of
https://github.com/4gray/iptvnator.git
synced 2026-10-12 12:06:16 -08:00
feat: add experimental vlc player support
This commit is contained in:
1 parent
70675f98e9
commit
2a9123781f
6 files changed
+98
-11
No files matched your search
@@ -110,6 +110,26 @@
|
||||
</div>
|
||||
</div>
|
||||
<mat-divider></mat-divider>
|
||||
<div class="row" *ngIf="settingsForm.value.player === 'vlc'">
|
||||
<div class="column">
|
||||
{{ 'SETTINGS.VLC_PLAYER_PATH_LABEL' | translate }}
|
||||
<p>{{ 'SETTINGS.VLC_PLAYER_PATH_DESCRIPTION' | translate }}</p>
|
||||
</div>
|
||||
<div class="column">
|
||||
<mat-form-field appearance="outline">
|
||||
<mat-label for="vlcPlayerPath">{{
|
||||
'SETTINGS.VLC_PLAYER_PATH' | translate
|
||||
}}</mat-label>
|
||||
<input
|
||||
matInput
|
||||
type="text"
|
||||
id="vlcPlayerPath"
|
||||
formControlName="vlcPlayerPath"
|
||||
/>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
</div>
|
||||
<mat-divider></mat-divider>
|
||||
<div class="row">
|
||||
<div class="column">
|
||||
{{ 'SETTINGS.LANGUAGE' | translate }}
|
||||
|
||||
@@ -15,6 +15,7 @@ import * as semver from 'semver';
|
||||
import {
|
||||
EPG_FORCE_FETCH,
|
||||
SET_MPV_PLAYER_PATH,
|
||||
SET_VLC_PLAYER_PATH,
|
||||
} from '../../../shared/ipc-commands';
|
||||
import { Playlist } from '../../../shared/playlist.interface';
|
||||
import { DataService } from '../services/data.service';
|
||||
@@ -43,6 +44,17 @@ export class SettingsComponent implements OnInit {
|
||||
/** Flag that indicates whether the app runs in electron environment */
|
||||
isElectron = this.electronService.isElectron;
|
||||
|
||||
electronPlayers = [
|
||||
{
|
||||
id: VideoPlayer.MPV,
|
||||
label: 'MPV Player',
|
||||
},
|
||||
{
|
||||
id: VideoPlayer.VLC,
|
||||
label: 'VLC',
|
||||
},
|
||||
];
|
||||
|
||||
/** Player options */
|
||||
players = [
|
||||
{
|
||||
@@ -53,15 +65,7 @@ export class SettingsComponent implements OnInit {
|
||||
id: VideoPlayer.VideoJs,
|
||||
label: 'VideoJs Player',
|
||||
},
|
||||
...(this.isElectron
|
||||
?
|
||||
[
|
||||
{
|
||||
id: VideoPlayer.MPV,
|
||||
label: 'MPV Player',
|
||||
},
|
||||
]
|
||||
: []),
|
||||
...(this.isElectron ? this.electronPlayers : []),
|
||||
];
|
||||
|
||||
/** Current version of the app */
|
||||
@@ -84,6 +88,7 @@ export class SettingsComponent implements OnInit {
|
||||
showCaptions: false,
|
||||
theme: Theme.LightTheme,
|
||||
mpvPlayerPath: '',
|
||||
vlcPlayerPath: '',
|
||||
});
|
||||
|
||||
/** Form array with epg sources */
|
||||
@@ -138,6 +143,7 @@ export class SettingsComponent implements OnInit {
|
||||
? settings.theme
|
||||
: Theme.LightTheme,
|
||||
mpvPlayerPath: settings.mpvPlayerPath,
|
||||
vlcPlayerPath: settings.vlcPlayerPath,
|
||||
});
|
||||
|
||||
if (this.isElectron) {
|
||||
@@ -230,6 +236,11 @@ export class SettingsComponent implements OnInit {
|
||||
SET_MPV_PLAYER_PATH,
|
||||
this.settingsForm.value.mpvPlayerPath
|
||||
);
|
||||
|
||||
this.electronService.sendIpcEvent(
|
||||
SET_VLC_PLAYER_PATH,
|
||||
this.settingsForm.value.mpvPlayerPath
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -9,6 +9,7 @@ export enum VideoPlayer {
|
||||
VideoJs = 'videojs',
|
||||
Html5Player = 'html5',
|
||||
MPV = 'mpv',
|
||||
VLC = 'vlc',
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -21,4 +22,5 @@ export interface Settings {
|
||||
showCaptions: boolean;
|
||||
theme: Theme;
|
||||
mpvPlayerPath: string;
|
||||
vlcPlayerPath: string;
|
||||
}
|
||||
@@ -8,7 +8,8 @@
|
||||
"FILE_UPLOAD": "Add via file upload",
|
||||
"URL_UPLOAD": "Add via URL",
|
||||
"TEXT_IMPORT": "Import as text",
|
||||
"XTREME_IMPORT": "Import xtreme code"
|
||||
"XTREME_IMPORT": "Import xtreme code",
|
||||
"STALKER_PORTAL_IMPORT": "Add Stalker Portal"
|
||||
},
|
||||
"PLAYLISTS": {
|
||||
"NO_PLAYLISTS": "No playlists were added",
|
||||
@@ -119,7 +120,10 @@
|
||||
"PLAYLISTS_REMOVED": "All playlists were removed.",
|
||||
"MPV_PLAYER_PATH_LABEL": "mpv path",
|
||||
"MPV_PLAYER_PATH_DESCRIPTION": "Set path to mpv player in your system. It will use the provided path to a mpv binary instead of using the one found in $PATH.",
|
||||
"MPV_PLAYER_PATH": "mpv player path"
|
||||
"MPV_PLAYER_PATH": "mpv player path",
|
||||
"VLC_PLAYER_PATH_LABEL": "VLC path",
|
||||
"VLC_PLAYER_PATH_DESCRIPTION": "Set path to VLC player in your system. It will use the provided path to a VLC binary instead of the default path for our system.",
|
||||
"VLC_PLAYER_PATH": "VLC player path"
|
||||
},
|
||||
"THEMES": {
|
||||
"DARK_THEME": "Dark theme",
|
||||
|
||||
Reference in new issue
Block a user