mirror of
https://github.com/advplyr/audiobookshelf-app.git
synced 2026-08-06 20:08:48 +02:00
Added basic player methods
This commit is contained in:
@@ -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)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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"
|
||||
}
|
||||
Reference in New Issue
Block a user