@neoskola/auto-play 0.3.20 → 0.3.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -81,7 +81,7 @@ class NowPlayingTemplate: AutoPlayTemplate {
|
|
|
81
81
|
let subtitleText = config.subtitle.flatMap { Parser.parseText(text: $0) } ?? ""
|
|
82
82
|
let elapsedText = formatTime(currentElapsedTime)
|
|
83
83
|
let totalText = currentDuration > 0 ? formatTime(currentDuration) : "--:--"
|
|
84
|
-
let stateText = config.isPlaying ? "
|
|
84
|
+
let stateText = config.isPlaying ? "Oynatiliyor" : "Duraklatildi"
|
|
85
85
|
let stateIcon = config.isPlaying ? "play.circle.fill" : "pause.circle.fill"
|
|
86
86
|
|
|
87
87
|
let infoItem = CPListItem(
|
|
@@ -110,7 +110,7 @@ class NowPlayingTemplate: AutoPlayTemplate {
|
|
|
110
110
|
progressPercent = 0
|
|
111
111
|
}
|
|
112
112
|
let progressItem = CPListItem(
|
|
113
|
-
text: "
|
|
113
|
+
text: "Ilerleme \(progressPercent)%",
|
|
114
114
|
detailText: progressBarText(elapsed: currentElapsedTime, duration: currentDuration),
|
|
115
115
|
image: UIImage(systemName: "waveform.path.ecg"),
|
|
116
116
|
accessoryImage: nil,
|
|
@@ -119,7 +119,7 @@ class NowPlayingTemplate: AutoPlayTemplate {
|
|
|
119
119
|
progressItem.isEnabled = false
|
|
120
120
|
|
|
121
121
|
let previousItem = CPListItem(
|
|
122
|
-
text: "
|
|
122
|
+
text: "Onceki Bolum",
|
|
123
123
|
detailText: nil,
|
|
124
124
|
image: UIImage(systemName: "backward.fill"),
|
|
125
125
|
accessoryImage: nil,
|
|
@@ -132,7 +132,7 @@ class NowPlayingTemplate: AutoPlayTemplate {
|
|
|
132
132
|
}
|
|
133
133
|
|
|
134
134
|
let playPauseItem = CPListItem(
|
|
135
|
-
text: config.isPlaying ? "
|
|
135
|
+
text: config.isPlaying ? "Duraklat" : "Oynat",
|
|
136
136
|
detailText: nil,
|
|
137
137
|
image: UIImage(systemName: config.isPlaying ? "pause.fill" : "play.fill"),
|
|
138
138
|
accessoryImage: nil,
|
|
@@ -144,18 +144,20 @@ class NowPlayingTemplate: AutoPlayTemplate {
|
|
|
144
144
|
return
|
|
145
145
|
}
|
|
146
146
|
|
|
147
|
-
|
|
148
|
-
self.
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
147
|
+
Task { @MainActor in
|
|
148
|
+
if self.config.isPlaying {
|
|
149
|
+
self.pauseAudio()
|
|
150
|
+
self.config.onPause?()
|
|
151
|
+
} else {
|
|
152
|
+
self.resumeAudio()
|
|
153
|
+
self.config.onPlay?()
|
|
154
|
+
}
|
|
155
|
+
completion()
|
|
153
156
|
}
|
|
154
|
-
completion()
|
|
155
157
|
}
|
|
156
158
|
|
|
157
159
|
let nextItem = CPListItem(
|
|
158
|
-
text: "
|
|
160
|
+
text: "Sonraki Bolum",
|
|
159
161
|
detailText: nil,
|
|
160
162
|
image: UIImage(systemName: "forward.fill"),
|
|
161
163
|
accessoryImage: nil,
|