mirror of
https://github.com/HenkKalkwater/harbour-sailfin.git
synced 2025-09-04 01:42:44 +00:00
Added Direct Play and websocket improvements
* [backend]: Websocket now automatically tries to reconnect if connection was lost, up to 3 times. * [backend]: Move more playback and resume logic to the backend, to avoid having it in multiple places within the QML. Regression: pausing playback sometimes halts the video player for an unknown reason. * [playback]: Sailfin will try to play without the server transcoding, if possible. * [ui]: added a debug page in the settings
This commit is contained in:
parent
a244c27b1a
commit
7e77abc173
13 changed files with 204 additions and 45 deletions
|
@ -33,12 +33,16 @@ ApplicationWindow {
|
|||
property bool _hasInitialized: false
|
||||
// The global mediaPlayer instance
|
||||
readonly property MediaPlayer mediaPlayer: _mediaPlayer
|
||||
readonly property PlaybackManager playbackManager: _playbackManager
|
||||
|
||||
// Data of the currently selected item. For use on the cover.
|
||||
property JellyfinItem itemData
|
||||
// Id of the collection currently browsing. For use on the cover.
|
||||
property string collectionId
|
||||
|
||||
// Bad way to implement settings, but it'll do for now.
|
||||
property bool showDebugInfo: false
|
||||
|
||||
//FIXME: proper error handling
|
||||
Connections {
|
||||
target: ApiClient
|
||||
|
@ -98,6 +102,14 @@ ApplicationWindow {
|
|||
autoPlay: true
|
||||
}
|
||||
|
||||
PlaybackManager {
|
||||
id: _playbackManager
|
||||
apiClient: ApiClient
|
||||
mediaPlayer: _mediaPlayer
|
||||
audioIndex: 0
|
||||
autoOpen: true
|
||||
}
|
||||
|
||||
// Keep the sytem alive while playing media
|
||||
KeepAlive {
|
||||
enabled: _mediaPlayer.playbackState == MediaPlayer.PlayingState
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue