@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 ? "Playing" : "Paused"
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: "Progress \(progressPercent)%",
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: "Previous Lesson",
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 ? "Pause" : "Play",
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
- if self.config.isPlaying {
148
- self.pauseAudio()
149
- self.config.onPause?()
150
- } else {
151
- self.resumeAudio()
152
- self.config.onPlay?()
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: "Next Lesson",
160
+ text: "Sonraki Bolum",
159
161
  detailText: nil,
160
162
  image: UIImage(systemName: "forward.fill"),
161
163
  accessoryImage: nil,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@neoskola/auto-play",
3
- "version": "0.3.20",
3
+ "version": "0.3.22",
4
4
  "description": "Android Auto and Apple CarPlay for react-native",
5
5
  "main": "lib/index",
6
6
  "module": "lib/index",