|
@@ -24,7 +24,6 @@
|
|
import Foundation
|
|
import Foundation
|
|
import NextcloudKit
|
|
import NextcloudKit
|
|
import UIKit
|
|
import UIKit
|
|
-import MediaPlayer
|
|
|
|
import MobileVLCKit
|
|
import MobileVLCKit
|
|
|
|
|
|
class NCPlayer: NSObject {
|
|
class NCPlayer: NSObject {
|
|
@@ -296,12 +295,12 @@ extension NCPlayer: VLCMediaThumbnailerDelegate {
|
|
do {
|
|
do {
|
|
image = UIImage(cgImage: thumbnail)
|
|
image = UIImage(cgImage: thumbnail)
|
|
// Update Playing Info Center
|
|
// Update Playing Info Center
|
|
- let mediaItemPropertyTitle = MPNowPlayingInfoCenter.default().nowPlayingInfo?[MPMediaItemPropertyTitle] as? String
|
|
|
|
- if let image = image, mediaItemPropertyTitle == metadata.fileNameView {
|
|
|
|
- MPNowPlayingInfoCenter.default().nowPlayingInfo?[MPMediaItemPropertyArtwork] = MPMediaItemArtwork(boundsSize: image.size) { _ in
|
|
|
|
- return image
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
|
|
+ // let mediaItemPropertyTitle = MPNowPlayingInfoCenter.default().nowPlayingInfo?[MPMediaItemPropertyTitle] as? String
|
|
|
|
+ // if let image = image, mediaItemPropertyTitle == metadata.fileNameView {
|
|
|
|
+ // MPNowPlayingInfoCenter.default().nowPlayingInfo?[MPMediaItemPropertyArtwork] = MPMediaItemArtwork(boundsSize: image.size) { _ in
|
|
|
|
+ // return image
|
|
|
|
+ // }
|
|
|
|
+ // }
|
|
// Preview
|
|
// Preview
|
|
if let data = image?.jpegData(compressionQuality: 0.5) {
|
|
if let data = image?.jpegData(compressionQuality: 0.5) {
|
|
try data.write(to: URL(fileURLWithPath: fileNamePreviewLocalPath), options: .atomic)
|
|
try data.write(to: URL(fileURLWithPath: fileNamePreviewLocalPath), options: .atomic)
|