|
@@ -94,8 +94,10 @@ class NCPlayerToolBar: UIView {
|
|
playButton.setImage(NCUtility.shared.loadImage(named: "play.fill", color: .white, symbolConfiguration: UIImage.SymbolConfiguration(pointSize: 30)), for: .normal)
|
|
playButton.setImage(NCUtility.shared.loadImage(named: "play.fill", color: .white, symbolConfiguration: UIImage.SymbolConfiguration(pointSize: 30)), for: .normal)
|
|
|
|
|
|
subtitleButton.setImage(NCUtility.shared.loadImage(named: "captions.bubble", color: .white), for: .normal)
|
|
subtitleButton.setImage(NCUtility.shared.loadImage(named: "captions.bubble", color: .white), for: .normal)
|
|
-
|
|
|
|
|
|
+ subtitleButton.isEnabled = false
|
|
|
|
+
|
|
audioButton.setImage(NCUtility.shared.loadImage(named: "speaker.zzz", color: .white), for: .normal)
|
|
audioButton.setImage(NCUtility.shared.loadImage(named: "speaker.zzz", color: .white), for: .normal)
|
|
|
|
+ audioButton.isEnabled = false
|
|
|
|
|
|
backButton.setImage(NCUtility.shared.loadImage(named: "gobackward.10", color: .white), for: .normal)
|
|
backButton.setImage(NCUtility.shared.loadImage(named: "gobackward.10", color: .white), for: .normal)
|
|
|
|
|
|
@@ -164,6 +166,12 @@ class NCPlayerToolBar: UIView {
|
|
MPNowPlayingInfoCenter.default().nowPlayingInfo?[MPNowPlayingInfoPropertyElapsedPlaybackTime] = positionInSecond
|
|
MPNowPlayingInfoCenter.default().nowPlayingInfo?[MPNowPlayingInfoPropertyElapsedPlaybackTime] = positionInSecond
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ public func updateTopToolBar(videoSubTitlesIndexes: [Any], audioTrackIndexes: [Any]) {
|
|
|
|
+
|
|
|
|
+ self.subtitleButton.isEnabled = !videoSubTitlesIndexes.isEmpty
|
|
|
|
+ self.audioButton.isEnabled = !audioTrackIndexes.isEmpty
|
|
|
|
+ }
|
|
|
|
+
|
|
// MARK: -
|
|
// MARK: -
|
|
|
|
|
|
public func show() {
|
|
public func show() {
|