mirror of
https://github.com/advplyr/audiobookshelf-app.git
synced 2025-08-05 18:45:47 +02:00
Added basic player methods
This commit is contained in:
parent
6c65c8a33e
commit
7a9f6ff2ca
7 changed files with 198 additions and 2 deletions
|
@ -47,6 +47,13 @@ class ApiClient {
|
|||
ApiClient.postResource(endpoint: endpoint, parameters: [
|
||||
"forceTranscode": "true", // TODO: direct play
|
||||
"mediaPlayer": "AVPlayer",
|
||||
], decodable: PlaybackSession.self, callback: callback)
|
||||
], decodable: PlaybackSession.self) { obj in
|
||||
var session = obj
|
||||
|
||||
session.serverConnectionConfigId = Store.serverConfig.id
|
||||
session.serverAddress = Store.serverConfig.address
|
||||
|
||||
callback(session)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
13
ios/App/Shared/util/PlayerEvents.swift
Normal file
13
ios/App/Shared/util/PlayerEvents.swift
Normal file
|
@ -0,0 +1,13 @@
|
|||
//
|
||||
// PlayerEvents.swift
|
||||
// App
|
||||
//
|
||||
// Created by Rasmus Krämer on 14.04.22.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
|
||||
enum PlayerEvents: String {
|
||||
case update = "com.audiobookshelf.app.player.update"
|
||||
case closed = "com.audiobookshelf.app.player.closed"
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue