18 Commits
Author SHA1 Message Date
Antoine_Jaury_KSK 8276112a2a Merge pull request 'Create first production version (1.0.0)' (#5) from release/1.0.0 into develop
Reviewed-on: Antoine_Jaury_KSK/Chom-Bev-e-Brezhoneg#5
2026-11-10 17:50:19 +01:00
Antoine Jaury 524bedf663 chore: update dependencies 2026-11-02 14:09:39 +01:00
Antoine Jaury dbd899cde7 chore: bump app version to 1.0.0 2026-11-02 10:51:53 +01:00
Antoine Jaury 36a23d88c0 chore: update compose multiplatform to improve web accessibility 2026-10-23 16:15:26 +02:00
Antoine Jaury 471be37fe4 chore: update dependencies in libs.versions.toml 2026-10-23 15:36:23 +02:00
Antoine Jaury 2c1de5cf37 test: add accessibility tests for RecordsScreen and PlayerScreen 2026-10-23 15:04:57 +02:00
Antoine Jaury abeb484258 refactor: add dynamic font scaling support and integrate ProvideDynamicTypeFontScale across modules 2026-10-22 14:27:06 +02:00
Antoine Jaury df38936893 refactor: enhance playback behavior with screen reader support and delayed actions 2026-10-22 13:58:30 +02:00
Antoine Jaury 38c5d2678a chore: add PrivacyInfo.xcprivacy file for iOS app tracking and diagnostics declarations 2026-10-19 23:13:50 +02:00
Antoine Jaury 399b7964cf chore: add French localization for iOS app name and bundle display name 2026-10-19 23:13:18 +02:00
Antoine Jaury 70be7bf332 chore: bump app version to 1.0.0-beta06 2026-10-19 22:39:08 +02:00
Antoine Jaury e90d37c8e0 chore: update iOS app localization to French 2026-10-19 22:28:48 +02:00
Antoine Jaury b3fe80aad9 chore: update iOS app name, bundle display name, and app category 2026-10-19 19:36:37 +02:00
Antoine Jaury b7076a8b07 refactor: add KotlinMultiplatformLinkedPackage in iOS project dependencies 2026-10-19 19:35:29 +02:00
Antoine Jaury 6bdbc0467f chore: update iOS marketing version to 1.0.0 2026-10-19 19:33:13 +02:00
Antoine Jaury 82a2b9683d chore: disable non-exempt encryption in iOS app settings 2026-10-19 19:32:58 +02:00
Antoine Jaury 7a8b535a17 refactor: replace iOS app icon with new logo image 2026-10-19 19:32:58 +02:00
Antoine Jaury 073a1a6de0 chore: bump app version to 1.0.0-beta05 2026-10-19 15:55:38 +02:00
29 changed files with 603 additions and 98 deletions

No files matched your search

+23 -2
View File
@@ -11,11 +11,32 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed
### Fixed
## [1.0.0, 1.0.0-beta06] - 2026-10-19
### Added
- add iOS privacy manifest and export compliance declaration
- declare French as the iOS app language
### Changed
- link iOS SwiftPM dependencies through the Kotlin Multiplatform linkage package
### Fixed
- fix Sentry version conflict on iOS
- fix iOS marketing version and app icon for App Store submission
## [1.0.0-beta05] - 2026-10-16
### Changed
- improve accessibility globally in the app
- add scrollable support for subtitle preferences bottom sheet
- improve color contrast handling
### Fixed
- remove wrong breton translation for interface
## [1.0.0-beta04] - 2026-10-02
+13 -6
View File
@@ -34,10 +34,17 @@ dependencies {
android {
namespace = "bzh.ajaury.chombev"
compileSdk =
libs.versions.androidCompileSdk
.get()
.toInt()
compileSdk {
version = release(
libs.versions.androidCompileSdk
.get()
.toInt(),
) {
minorApiLevel = libs.versions.androidCompileSdkMinor
.get()
.toInt()
}
}
defaultConfig {
applicationId = "bzh.ksk.donemat"
@@ -49,8 +56,8 @@ android {
libs.versions.androidTargetSdk
.get()
.toInt()
versionCode = 5
versionName = "1.0.0-beta04"
versionCode = 8
versionName = "1.0.0"
}
packaging {
resources {
@@ -26,10 +26,11 @@ kotlin {
androidLibrary {
// namespace is set per module in the consuming build file
compileSdk =
libs.versions.androidCompileSdk
.get()
.toInt()
compileSdk {
version = release(libs.versions.androidCompileSdk.get().toInt()) {
minorApiLevel = libs.versions.androidCompileSdkMinor.get().toInt()
}
}
minSdk =
libs.versions.androidMinSdk
.get()
+9
View File
@@ -1,9 +1,18 @@
plugins {
id("gwenedeg.kmp.library")
id("gwenedeg.compose")
}
kotlin {
androidLibrary {
namespace = "bzh.ajaury.chombev.core.accessibility"
}
sourceSets {
commonMain.dependencies {
// UI - Compose
implementation(libs.compose.runtime)
implementation(libs.compose.ui)
}
}
}
@@ -0,0 +1,7 @@
package bzh.ajaury.chombev.core.accessibility.ui
import androidx.compose.runtime.Composable
/** No-op: the font scale already follows the system setting. */
@Composable
actual fun ProvideDynamicTypeFontScale(content: @Composable () -> Unit) = content()
@@ -0,0 +1,13 @@
package bzh.ajaury.chombev.core.accessibility.ui
import androidx.compose.runtime.Composable
/**
* Applies the system text size to [content] as soon as the user changes it.
*
* Only needed on iOS, see its implementation. Every Compose scene must be wrapped: the root one
* and each dialog or bottom sheet, which iOS renders in a scene of its own that does not inherit
* the font scale provided by the root one.
*/
@Composable
expect fun ProvideDynamicTypeFontScale(content: @Composable () -> Unit)
@@ -0,0 +1,80 @@
package bzh.ajaury.chombev.core.accessibility.ui
import androidx.compose.runtime.Composable
import androidx.compose.runtime.CompositionLocalProvider
import androidx.compose.runtime.DisposableEffect
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.remember
import androidx.compose.runtime.setValue
import androidx.compose.ui.platform.LocalDensity
import androidx.compose.ui.unit.Density
import platform.Foundation.NSNotificationCenter
import platform.Foundation.NSOperationQueue
import platform.UIKit.UIApplication
import platform.UIKit.UIContentSizeCategoryAccessibilityExtraExtraExtraLarge
import platform.UIKit.UIContentSizeCategoryAccessibilityExtraExtraLarge
import platform.UIKit.UIContentSizeCategoryAccessibilityExtraLarge
import platform.UIKit.UIContentSizeCategoryAccessibilityLarge
import platform.UIKit.UIContentSizeCategoryAccessibilityMedium
import platform.UIKit.UIContentSizeCategoryDidChangeNotification
import platform.UIKit.UIContentSizeCategoryExtraExtraExtraLarge
import platform.UIKit.UIContentSizeCategoryExtraExtraLarge
import platform.UIKit.UIContentSizeCategoryExtraLarge
import platform.UIKit.UIContentSizeCategoryExtraSmall
import platform.UIKit.UIContentSizeCategoryLarge
import platform.UIKit.UIContentSizeCategoryMedium
import platform.UIKit.UIContentSizeCategorySmall
/**
* Applies the system text size (Dynamic Type) to [content] as soon as the user changes it.
*
* Compose Multiplatform reads the font scale once, when the Compose scene is created, so a change
* made in the iOS settings only shows once the scene is created again: after the app restarts for
* the root scene, or when it is opened again for a dialog or bottom sheet. Workaround for CMP-10365
* (https://youtrack.jetbrains.com/issue/CMP-10365), fixed in Compose Multiplatform 1.13.0: remove
* it once the project is upgraded.
*/
@Composable
actual fun ProvideDynamicTypeFontScale(content: @Composable () -> Unit) {
var contentSizeCategory by remember {
mutableStateOf(UIApplication.sharedApplication.preferredContentSizeCategory)
}
DisposableEffect(Unit) {
val notificationCenter = NSNotificationCenter.defaultCenter
val observer = notificationCenter.addObserverForName(
name = UIContentSizeCategoryDidChangeNotification,
`object` = null,
queue = NSOperationQueue.mainQueue,
) { _ ->
contentSizeCategory = UIApplication.sharedApplication.preferredContentSizeCategory
}
onDispose { notificationCenter.removeObserver(observer) }
}
val density = LocalDensity.current
// Only the font scale is overridden: the pixel density stays the one Compose computed.
val fontScale = contentSizeCategoryToFontScale[contentSizeCategory] ?: density.fontScale
CompositionLocalProvider(
LocalDensity provides Density(density = density.density, fontScale = fontScale),
content = content,
)
}
// Same mapping as Compose Multiplatform (`uiContentSizeCategoryToFontScaleMap`, which is private),
// so that the font scale matches the one Compose computes when the scene is created.
private val contentSizeCategoryToFontScale = mapOf(
UIContentSizeCategoryExtraSmall to 0.8f,
UIContentSizeCategorySmall to 0.85f,
UIContentSizeCategoryMedium to 0.9f,
UIContentSizeCategoryLarge to 1f,
UIContentSizeCategoryExtraLarge to 1.1f,
UIContentSizeCategoryExtraExtraLarge to 1.2f,
UIContentSizeCategoryExtraExtraExtraLarge to 1.3f,
UIContentSizeCategoryAccessibilityMedium to 1.4f,
UIContentSizeCategoryAccessibilityLarge to 1.5f,
UIContentSizeCategoryAccessibilityExtraLarge to 1.6f,
UIContentSizeCategoryAccessibilityExtraExtraLarge to 1.7f,
UIContentSizeCategoryAccessibilityExtraExtraExtraLarge to 1.8f,
)
@@ -0,0 +1,7 @@
package bzh.ajaury.chombev.core.accessibility.ui
import androidx.compose.runtime.Composable
/** No-op: the font scale already follows the system setting. */
@Composable
actual fun ProvideDynamicTypeFontScale(content: @Composable () -> Unit) = content()
@@ -0,0 +1,7 @@
package bzh.ajaury.chombev.core.accessibility.ui
import androidx.compose.runtime.Composable
/** No-op: the font scale already follows the system setting. */
@Composable
actual fun ProvideDynamicTypeFontScale(content: @Composable () -> Unit) = content()
@@ -55,8 +55,11 @@ internal class IosAudioPlayer : AudioPlayer {
@OptIn(ExperimentalForeignApi::class)
override fun seekTo(position: Duration) {
val seconds = position.inWholeMilliseconds / 1000.0
// Resume after seeking (e.g. back from the end of the record), unless playback was paused
// on purpose: the caller may be holding it, for instance while a screen reader speaks.
val resume = _playbackState.value != PlaybackState.PAUSED
player?.seekToTime(CMTimeMakeWithSeconds(seconds, preferredTimescale = 1000)) {
play()
if (resume) play()
}
}
+3
View File
@@ -13,6 +13,9 @@ kotlin {
implementation(libs.compose.uiToolingPreview)
}
commonMain.dependencies {
// Core modules
implementation(projects.core.accessibility)
// Data modules
implementation(projects.data.preferences)
implementation(projects.data.resources)
@@ -33,6 +33,7 @@ import androidx.compose.ui.unit.dp
import androidx.compose.ui.window.Dialog
import androidx.compose.ui.window.DialogProperties
import androidx.lifecycle.compose.collectAsStateWithLifecycle
import bzh.ajaury.chombev.core.accessibility.ui.ProvideDynamicTypeFontScale
import bzh.ajaury.chombev.onboarding.model.OnboardingLevel
import bzh.ajaury.chombev.onboarding.ui.components.OnboardingInfoPage
import bzh.ajaury.chombev.onboarding.ui.components.OnboardingLevelPage
@@ -90,19 +91,21 @@ fun OnboardingScreen(
// The content sizes itself against the window rather than the platform default width.
properties = DialogProperties(usePlatformDefaultWidth = false),
) {
Surface(
modifier = Modifier
.sizeIn(maxWidth = DIALOG_MAX_WIDTH, maxHeight = DIALOG_MAX_HEIGHT)
.fillMaxSize(fraction = DIALOG_WINDOW_FRACTION),
shape = MaterialTheme.shapes.extraLarge,
color = MaterialTheme.colorScheme.surfaceContainerHigh,
) {
OnboardingContent(
uiState = uiState,
onLevelSelected = onLevelSelected,
onFinish = onFinish,
onClose = onDismiss,
)
ProvideDynamicTypeFontScale {
Surface(
modifier = Modifier
.sizeIn(maxWidth = DIALOG_MAX_WIDTH, maxHeight = DIALOG_MAX_HEIGHT)
.fillMaxSize(fraction = DIALOG_WINDOW_FRACTION),
shape = MaterialTheme.shapes.extraLarge,
color = MaterialTheme.colorScheme.surfaceContainerHigh,
) {
OnboardingContent(
uiState = uiState,
onLevelSelected = onLevelSelected,
onFinish = onFinish,
onClose = onDismiss,
)
}
}
}
} else {
+20
View File
@@ -6,6 +6,16 @@ plugins {
kotlin {
androidLibrary {
namespace = "bzh.ajaury.chombev.records"
// Packages the Compose resources (strings of the screens) into the device test APK.
androidResources {
enable = true
}
// Accessibility tests: they run the Accessibility Test Framework checks, which need an
// Android device or emulator on API 34+ (Robolectric does not support them).
withDeviceTestBuilder {}.configure {
instrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}
}
sourceSets {
@@ -45,6 +55,16 @@ kotlin {
implementation(libs.koin.core.viewmodel)
implementation(libs.koin.compose.viewmodel)
}
getByName("androidDeviceTest").dependencies {
implementation(libs.kotlin.test)
implementation(libs.androidx.testRunner)
// Espresso 3.5, which Compose UI tests depend on, breaks on API 37 (InputManager.getInstance).
implementation(libs.androidx.espressoCore)
implementation(libs.compose.uiTest)
implementation(libs.compose.uiTestAccessibility)
// Declares the activity the UI tests host their content in.
implementation(libs.compose.uiTestManifest)
}
}
}
@@ -0,0 +1,100 @@
package bzh.ajaury.chombev.player.ui
import androidx.compose.material3.MaterialTheme
import androidx.compose.ui.test.ExperimentalTestApi
import androidx.compose.ui.test.accessibility.enableAccessibilityChecks
import androidx.compose.ui.test.onRoot
import androidx.compose.ui.test.tryPerformAccessibilityChecks
import androidx.compose.ui.test.v2.runComposeUiTest
import androidx.test.filters.SdkSuppress
import bzh.ajaury.chombev.core.model.Phrase
import bzh.ajaury.chombev.core.model.Record
import bzh.ajaury.chombev.player.model.PlaybackState
import bzh.ajaury.chombev.player.model.PlaybackTiming
import bzh.ajaury.chombev.player.model.PlayerState
import bzh.ajaury.chombev.player.ui.viewmodel.PlayerUiState
import bzh.ajaury.chombev.subtitle.model.SubtitleLine
import kotlin.test.Test
import kotlin.time.Duration
import kotlin.time.Duration.Companion.seconds
/**
* Runs the Accessibility Test Framework checks (labels, touch targets, contrast, traversal order...)
* on the player, in each state that changes its controls.
*/
@OptIn(ExperimentalTestApi::class)
@SdkSuppress(minSdkVersion = 34)
class PlayerScreenAccessibilityTest {
@Test
fun playingPlayerPassesAccessibilityChecks() =
assertPassesAccessibilityChecks(uiState(playbackState = PlaybackState.PLAYING))
@Test
fun pausedPlayerPassesAccessibilityChecks() =
assertPassesAccessibilityChecks(uiState(playbackState = PlaybackState.PAUSED))
@Test
fun endedPlayerPassesAccessibilityChecks() =
assertPassesAccessibilityChecks(uiState(playbackState = PlaybackState.ENDED))
@Test
fun playerOnFirstSentencePassesAccessibilityChecks() =
assertPassesAccessibilityChecks(uiState(position = 0.seconds, currentSubtitleIndex = 0))
@Test
fun playerOnLastSentencePassesAccessibilityChecks() = assertPassesAccessibilityChecks(
uiState(position = 8.seconds, currentSubtitleIndex = subtitleLines.lastIndex),
)
private fun assertPassesAccessibilityChecks(uiState: PlayerUiState) = runComposeUiTest {
enableAccessibilityChecks()
setContent {
MaterialTheme {
PlayerScreen(uiState = uiState)
}
}
onRoot().tryPerformAccessibilityChecks()
}
private companion object {
val record = Record(
id = 1,
index = 1,
emoji = "🙏",
title = Phrase(transcription = "An onestiz", translation = "La politesse"),
audioResourcePath = "",
subtitleResourcePath = "",
)
val subtitleLines = listOf(
SubtitleLine(
startTime = 0.seconds,
phrase = Phrase(transcription = "Demat deoc'h !", translation = "Bonjour !"),
),
SubtitleLine(
startTime = 4.seconds,
phrase = Phrase(transcription = "Kenavo !", translation = "Au revoir !"),
),
SubtitleLine(
startTime = 7.seconds,
phrase = Phrase(transcription = "Kenavo emberr !", translation = "À ce soir !"),
),
)
fun uiState(
playbackState: PlaybackState = PlaybackState.PLAYING,
position: Duration = 5.seconds,
currentSubtitleIndex: Int = 1,
) = PlayerUiState(
record = record,
playerState = PlayerState(
playbackState = playbackState,
playbackTiming = PlaybackTiming(position = position, duration = 10.seconds),
subtitleLines = subtitleLines,
currentSubtitleIndex = currentSubtitleIndex,
),
)
}
}
@@ -0,0 +1,67 @@
package bzh.ajaury.chombev.records.ui
import androidx.compose.foundation.layout.PaddingValues
import androidx.compose.material3.MaterialTheme
import androidx.compose.ui.test.ExperimentalTestApi
import androidx.compose.ui.test.accessibility.enableAccessibilityChecks
import androidx.compose.ui.test.onRoot
import androidx.compose.ui.test.tryPerformAccessibilityChecks
import androidx.compose.ui.test.v2.runComposeUiTest
import androidx.test.filters.SdkSuppress
import bzh.ajaury.chombev.core.model.Phrase
import bzh.ajaury.chombev.core.model.Record
import kotlin.test.Test
/**
* Runs the Accessibility Test Framework checks (labels, touch targets, contrast, traversal order...)
* on the list of records.
*/
@OptIn(ExperimentalTestApi::class)
@SdkSuppress(minSdkVersion = 34)
class RecordsScreenAccessibilityTest {
@Test
fun recordsScreenPassesAccessibilityChecks() = runComposeUiTest {
enableAccessibilityChecks()
setContent {
MaterialTheme {
RecordsScreen(
records = records,
contentPadding = PaddingValues(),
onRecordClick = {},
)
}
}
onRoot().tryPerformAccessibilityChecks()
}
private companion object {
val records = listOf(
Record(
id = 1,
index = 1,
emoji = "🙏",
title = Phrase(transcription = "An onestiz", translation = "La politesse"),
audioResourcePath = "",
subtitleResourcePath = "",
),
Record(
id = 2,
index = 2,
emoji = "👋",
title = Phrase(transcription = "En em brezantiñ", translation = "Se présenter"),
audioResourcePath = "",
subtitleResourcePath = "",
),
Record(
id = 3,
index = 3,
emoji = "🌦️",
title = Phrase(transcription = "An amzer", translation = null),
audioResourcePath = "",
subtitleResourcePath = "",
),
)
}
}
@@ -14,6 +14,7 @@ import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
import bzh.ajaury.chombev.core.accessibility.ui.ProvideDynamicTypeFontScale
import bzh.ajaury.chombev.player.ui.components.LabeledSlider
import bzh.ajaury.chombev.preferences.model.PlaybackPreferences
import bzh.ajaury.chombev.preferences.ui.PreferenceToggle
@@ -50,14 +51,16 @@ fun PlaybackSpeedBottomSheet(
onDismissRequest = onDismiss,
sheetState = sheetState,
) {
PlaybackSpeedContent(
speed = speed,
breakSeconds = breakSeconds,
autoPause = autoPause,
onSpeedChange = onSpeedChange,
onBreakChange = onBreakChange,
onAutoPauseChange = onAutoPauseChange,
)
ProvideDynamicTypeFontScale {
PlaybackSpeedContent(
speed = speed,
breakSeconds = breakSeconds,
autoPause = autoPause,
onSpeedChange = onSpeedChange,
onBreakChange = onBreakChange,
onAutoPauseChange = onAutoPauseChange,
)
}
}
}
@@ -12,6 +12,8 @@ import bzh.ajaury.chombev.preferences.domain.PreferencesRepository
import bzh.ajaury.chombev.preferences.model.PlaybackPreferences
import bzh.ajaury.chombev.preferences.model.SubtitlePreferences
import bzh.ajaury.chombev.records.domain.RecordRepository
import kotlinx.coroutines.Job
import kotlinx.coroutines.delay
import kotlinx.coroutines.flow.MutableStateFlow
import kotlinx.coroutines.flow.SharingStarted
import kotlinx.coroutines.flow.StateFlow
@@ -21,6 +23,7 @@ import kotlinx.coroutines.flow.stateIn
import kotlinx.coroutines.launch
import kotlin.math.roundToInt
import kotlin.time.Duration
import kotlin.time.Duration.Companion.milliseconds
import kotlin.time.Duration.Companion.seconds
class PlayerViewModel(
@@ -34,6 +37,9 @@ class PlayerViewModel(
) : ViewModel() {
private val record = MutableStateFlow<Record?>(null)
// Playback held while the screen reader speaks the control that was just activated.
private var pendingPlaybackJob: Job? = null
val uiState: StateFlow<PlayerUiState> = combine(
record,
playbackRepository.playerState,
@@ -85,39 +91,75 @@ class PlayerViewModel(
}
fun performMainPlayAction() {
viewModelScope.launch {
when (uiState.value.playerState.playbackState) {
PlaybackState.PLAYING, PlaybackState.BREAKING -> playbackRepository.pause()
PlaybackState.ENDED -> playbackRepository.replay()
PlaybackState.PAUSED, PlaybackState.IDLE -> playbackRepository.play()
when (uiState.value.playerState.playbackState) {
PlaybackState.PLAYING, PlaybackState.BREAKING -> {
cancelPendingPlayback()
viewModelScope.launch { playbackRepository.pause() }
}
PlaybackState.ENDED -> playAfterScreenReader { playbackRepository.replay() }
PlaybackState.PAUSED, PlaybackState.IDLE -> playAfterScreenReader { playbackRepository.play() }
}
}
fun seekToTimePart(progress: Duration) {
viewModelScope.launch {
playbackRepository.seekTo(progress)
}
seekAfterScreenReader { playbackRepository.seekTo(progress) }
}
fun seekToSentence(sentenceIndex: Int) {
viewModelScope.launch {
playbackRepository.seekToSentence(sentenceIndex)
}
seekAfterScreenReader { playbackRepository.seekToSentence(sentenceIndex) }
}
fun goToPreviousSentence() {
viewModelScope.launch {
playbackRepository.goToPreviousSentence()
}
seekAfterScreenReader { playbackRepository.goToPreviousSentence() }
}
fun goToNextSentence() {
viewModelScope.launch {
playbackRepository.goToNextSentence()
seekAfterScreenReader { playbackRepository.goToNextSentence() }
}
/**
* Runs [play], which starts playback. A screen reader still speaks the control that was just
* activated: while one is running, [play] is delayed by [SCREEN_READER_PLAYBACK_DELAY] so that
* the audio does not play over it.
*/
private fun playAfterScreenReader(play: suspend () -> Unit) {
pendingPlaybackJob?.cancel()
pendingPlaybackJob = viewModelScope.launch {
if (accessibilityRepository.isScreenReaderEnabled()) delay(SCREEN_READER_PLAYBACK_DELAY)
play()
}
}
/**
* Runs [seek]. While a screen reader is running, ongoing playback is paused during the seek and
* only resumes after [SCREEN_READER_PLAYBACK_DELAY], like [playAfterScreenReader]. Successive
* seeks within the delay keep playback held until the delay of the last one has elapsed.
*/
private fun seekAfterScreenReader(seek: suspend () -> Unit) {
val isPlaybackPending = pendingPlaybackJob?.isActive == true
val playbackState = uiState.value.playerState.playbackState
val wasPlaying = isPlaybackPending || playbackState in PLAYING_STATES
pendingPlaybackJob?.cancel()
pendingPlaybackJob = viewModelScope.launch {
if (!wasPlaying || !accessibilityRepository.isScreenReaderEnabled()) {
seek()
return@launch
}
playbackRepository.pause()
seek()
delay(SCREEN_READER_PLAYBACK_DELAY)
playbackRepository.play()
}
}
private fun cancelPendingPlayback() {
pendingPlaybackJob?.cancel()
pendingPlaybackJob = null
}
fun setPlaybackSpeed(speed: Float) {
val steppedSpeed = (speed * 10).roundToInt() / 10f
val clampedSpeed = steppedSpeed.coerceIn(
@@ -181,6 +223,7 @@ class PlayerViewModel(
}
fun stop() {
cancelPendingPlayback()
viewModelScope.launch {
playbackRepository.stop()
}
@@ -190,4 +233,10 @@ class PlayerViewModel(
super.onCleared()
audioSessionManager.deactivate()
}
private companion object {
// Long enough for a screen reader to speak a short control label such as "Phrase suivante".
val SCREEN_READER_PLAYBACK_DELAY = 1500.milliseconds
val PLAYING_STATES = setOf(PlaybackState.PLAYING, PlaybackState.BREAKING)
}
}
@@ -32,6 +32,7 @@ import androidx.compose.ui.semantics.setProgress
import androidx.compose.ui.semantics.stateDescription
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
import bzh.ajaury.chombev.core.accessibility.ui.ProvideDynamicTypeFontScale
import bzh.ajaury.chombev.preferences.model.SubtitlePreferences
import bzh.ajaury.chombev.resources.generated.resources.Res
import bzh.ajaury.chombev.resources.generated.resources.subtitle_marked_letters_description
@@ -68,14 +69,16 @@ fun SubtitlePreferencesBottomSheet(
onDismissRequest = onDismiss,
sheetState = sheetState,
) {
SubtitlePreferencesContent(
subtitlePreferences = subtitlePreferences,
onShowTranscriptionChange = onShowTranscriptionChange,
onShowTranslationChange = onShowTranslationChange,
onShowMarkedLettersChange = onShowPhoneticMarkerChange,
onTextSizeDecrease = onTextSizeDecrease,
onTextSizeIncrease = onTextSizeIncrease,
)
ProvideDynamicTypeFontScale {
SubtitlePreferencesContent(
subtitlePreferences = subtitlePreferences,
onShowTranscriptionChange = onShowTranscriptionChange,
onShowTranslationChange = onShowTranslationChange,
onShowMarkedLettersChange = onShowPhoneticMarkerChange,
onTextSizeDecrease = onTextSizeDecrease,
onTextSizeIncrease = onTextSizeIncrease,
)
}
}
}
+18 -9
View File
@@ -1,29 +1,33 @@
[versions]
agp = "9.4.1" # https://developer.android.com/build/releases/gradle-plugin
agp = "9.5.0" # https://developer.android.com/build/releases/gradle-plugin
androidCompileSdk = "37" # https://developer.android.com/tools/releases/platforms
androidCompileSdkMinor = "1" # Compose 1.13 requires compileSdk 37.1
androidMinSdk = "24" # https://developer.android.com/tools/releases/platforms
androidTargetSdk = "37" # https://developer.android.com/tools/releases/platforms
androidxActivity = "1.13.0" # https://developer.android.com/jetpack/androidx/releases/activity
androidxComposeUi = "1.13.0-beta02" # https://developer.android.com/jetpack/androidx/releases/compose-ui
androidxEspresso = "3.7.0" # https://developer.android.com/jetpack/androidx/releases/test
androidxLifecycle = "2.11.0" # https://developer.android.com/jetpack/androidx/releases/lifecycle
androidxWebkit = "1.17.1" # https://developer.android.com/jetpack/androidx/releases/webkit
androidxTestRunner = "1.7.0" # https://developer.android.com/jetpack/androidx/releases/test
androidxWebkit = "1.18.0" # https://developer.android.com/jetpack/androidx/releases/webkit
composeIconsExtended = "1.7.3" # https://github.com/JetBrains/compose-multiplatform/releases
composeMultiplatform = "1.12.1" # https://github.com/JetBrains/compose-multiplatform/releases
datastore = "1.2.1" # https://developer.android.com/jetpack/androidx/releases/datastore
composeMultiplatform = "1.13.0-beta01" # https://github.com/JetBrains/compose-multiplatform/releases
datastore = "1.3.0" # https://developer.android.com/jetpack/androidx/releases/datastore
googleServices = "4.5.0" # https://developers.google.com/android/guides/releases
jaad = "0.9.4" # https://github.com/Tianscar/jaad/releases
kermit = "2.2.0" # https://github.com/touchlab/Kermit/releases
koin = "4.2.2" # https://github.com/InsertKoinIO/koin/releases
kotlin = "2.4.21" # https://github.com/JetBrains/kotlin/releases
kotlinSerialization = "2.4.21" # https://github.com/JetBrains/kotlin/releases
kotlinWrappers = "2026.10.0" # https://github.com/JetBrains/kotlin-wrappers/releases
kotlinWrappers = "2026.11.0" # https://github.com/JetBrains/kotlin-wrappers/releases
kotlinxBrowser = "0.5.0" # https://github.com/Kotlin/kotlinx-browser/releases
kotlinxCoroutines = "1.11.0" # https://github.com/Kotlin/kotlinx.coroutines/releases
kotlinxSerializationJson = "1.11.0" # https://github.com/Kotlin/kotlinx.serialization/releases
material3 = "1.12.0-alpha03" # https://developer.android.com/jetpack/androidx/releases/compose-material3
kotlinxSerializationJson = "1.12.0" # https://github.com/Kotlin/kotlinx.serialization/releases
material3 = "1.13.0-beta01" # https://developer.android.com/jetpack/androidx/releases/compose-material3
media3 = "1.11.1" # https://developer.android.com/jetpack/androidx/releases/media3
navigation3 = "1.1.2" # https://developer.android.com/jetpack/androidx/releases/navigation3
navigation3 = "1.2.0" # https://developer.android.com/jetpack/androidx/releases/navigation3
okio = "3.18.2" # https://square.github.io/okio/changelog/
sentry = "0.28.0" # https://github.com/getsentry/sentry-kotlin-multiplatform/releases
sentry = "0.29.0" # https://github.com/getsentry/sentry-kotlin-multiplatform/releases
[libraries]
# Gradle plugin artifacts, used by build-logic convention plugins only
@@ -34,6 +38,8 @@ composeCompiler-gradlePlugin = { module = "org.jetbrains.kotlin:compose-compiler
androidx-activity-compose = { module = "androidx.activity:activity-compose", version.ref = "androidxActivity" }
androidx-datastore-preferences-core = { module = "androidx.datastore:datastore-preferences-core", version.ref = "datastore" }
androidx-espressoCore = { module = "androidx.test.espresso:espresso-core", version.ref = "androidxEspresso" }
androidx-testRunner = { module = "androidx.test:runner", version.ref = "androidxTestRunner" }
androidx-webkit = { module = "androidx.webkit:webkit", version.ref = "androidxWebkit" }
okio = { module = "com.squareup.okio:okio", version.ref = "okio" }
compose-components-resources = { module = "org.jetbrains.compose.components:components-resources", version.ref = "composeMultiplatform" }
@@ -42,6 +48,9 @@ compose-material3 = { module = "org.jetbrains.compose.material3:material3", vers
compose-material-icons-extended = { module = "org.jetbrains.compose.material:material-icons-extended", version.ref = "composeIconsExtended" }
compose-runtime = { module = "org.jetbrains.compose.runtime:runtime", version.ref = "composeMultiplatform" }
compose-ui = { module = "org.jetbrains.compose.ui:ui", version.ref = "composeMultiplatform" }
compose-uiTest = { module = "org.jetbrains.compose.ui:ui-test", version.ref = "composeMultiplatform" }
compose-uiTestAccessibility = { module = "androidx.compose.ui:ui-test-accessibility", version.ref = "androidxComposeUi" }
compose-uiTestManifest = { module = "androidx.compose.ui:ui-test-manifest", version.ref = "androidxComposeUi" }
compose-uiTooling = { module = "org.jetbrains.compose.ui:ui-tooling", version.ref = "composeMultiplatform" }
compose-uiToolingPreview = { module = "org.jetbrains.compose.ui:ui-tooling-preview", version.ref = "composeMultiplatform" }
jaad = { module = "com.tianscar.javasound:jaad", version.ref = "jaad" }
+3 -3
View File
@@ -1,9 +1,9 @@
TEAM_ID=
PRODUCT_NAME=Donemat - Breton d'Auray
PRODUCT_NAME=Donemat
PRODUCT_BUNDLE_IDENTIFIER=bzh.ksk.donemat$(TEAM_ID)
// Keep in sync with androidApp versionName/versionCode and CHANGELOG.md.
// Apple only accepts numeric versions, so pre-release suffixes (e.g. -alpha01) are dropped here.
CURRENT_PROJECT_VERSION=5
MARKETING_VERSION=1.0.0.4
CURRENT_PROJECT_VERSION=8
MARKETING_VERSION=1.0.0
+42 -25
View File
@@ -7,15 +7,15 @@
objects = {
/* Begin PBXBuildFile section */
F36B7319302CAEC900B3E490 /* Sentry in Frameworks */ = {isa = PBXBuildFile; productRef = F36B7318302CAEC900B3E490 /* Sentry */; };
49231CBE6031106FDA386B1B /* KotlinMultiplatformLinkedPackage in Frameworks */ = {isa = PBXBuildFile; productRef = BF1E7FC8A3BBAFF25B00CB9D /* KotlinMultiplatformLinkedPackage */; };
/* End PBXBuildFile section */
/* Begin PBXFileReference section */
9DA43AABF87DF46F5E794E72 /* Donemat.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Chom Bev.app"; sourceTree = BUILT_PRODUCTS_DIR; };
9DA43AABF87DF46F5E794E72 /* Donemat.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Donemat.app; sourceTree = BUILT_PRODUCTS_DIR; };
/* End PBXFileReference section */
/* Begin PBXFileSystemSynchronizedBuildFileExceptionSet section */
95ABF2C8EE96D87C60CB4B62 /* Exceptions for "iosApp" folder in "iosApp" target */ = {
95ABF2C8EE96D87C60CB4B62 /* PBXFileSystemSynchronizedBuildFileExceptionSet */ = {
isa = PBXFileSystemSynchronizedBuildFileExceptionSet;
membershipExceptions = (
Info.plist,
@@ -28,13 +28,21 @@
89B7F8019E767C8CDD8E9E81 /* iosApp */ = {
isa = PBXFileSystemSynchronizedRootGroup;
exceptions = (
95ABF2C8EE96D87C60CB4B62 /* Exceptions for "iosApp" folder in "iosApp" target */,
95ABF2C8EE96D87C60CB4B62 /* PBXFileSystemSynchronizedBuildFileExceptionSet */,
);
explicitFileTypes = {
};
explicitFolders = (
);
path = iosApp;
sourceTree = "<group>";
};
D8035B75140A5CBF147B4F8A /* Configuration */ = {
isa = PBXFileSystemSynchronizedRootGroup;
explicitFileTypes = {
};
explicitFolders = (
);
path = Configuration;
sourceTree = "<group>";
};
@@ -45,7 +53,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
F36B7319302CAEC900B3E490 /* Sentry in Frameworks */,
49231CBE6031106FDA386B1B /* KotlinMultiplatformLinkedPackage in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -90,7 +98,7 @@
);
name = iosApp;
packageProductDependencies = (
F36B7318302CAEC900B3E490 /* Sentry */,
BF1E7FC8A3BBAFF25B00CB9D /* KotlinMultiplatformLinkedPackage */,
);
productName = iosApp;
productReference = 9DA43AABF87DF46F5E794E72 /* Donemat.app */;
@@ -112,16 +120,16 @@
};
};
buildConfigurationList = 7D7378CC21ADE468E3035338 /* Build configuration list for PBXProject "iosApp" */;
developmentRegion = en;
developmentRegion = fr;
hasScannedForEncodings = 0;
knownRegions = (
en,
fr,
Base,
);
mainGroup = A562F15E4A0F12F420BB5B12;
minimizedProjectReferenceProxies = 1;
packageReferences = (
F36B7317302CAEC900B3E490 /* XCRemoteSwiftPackageReference "sentry-cocoa" */,
E9D3AD5E9D18D87B871B00C0 /* XCLocalSwiftPackageReference "KotlinMultiplatformLinkedPackage" */,
);
preferredProjectObjectVersion = 77;
productRefGroup = 47B0C8770C82BEADFE13EF77 /* Products */;
@@ -183,21 +191,28 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CODE_SIGN_STYLE = Manual;
DEVELOPMENT_ASSET_PATHS = "\"iosApp/Preview Content\"";
DEVELOPMENT_TEAM = 492RZGQ5SU;
DEVELOPMENT_TEAM = "";
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = UXC58NXTGL;
ENABLE_PREVIEWS = YES;
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_FILE = iosApp/Info.plist;
INFOPLIST_KEY_CFBundleDisplayName = Donemat;
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.education";
INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES;
INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
INFOPLIST_KEY_UILaunchScreen_Generation = YES;
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
IPHONEOS_DEPLOYMENT_TARGET = "$(RECOMMENDED_IPHONEOS_DEPLOYMENT_TARGET)";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
PROVISIONING_PROFILE_SPECIFIER = "";
"PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = Antoine;
SWIFT_EMIT_LOC_STRINGS = YES;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
@@ -276,21 +291,28 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CODE_SIGN_STYLE = Manual;
DEVELOPMENT_ASSET_PATHS = "\"iosApp/Preview Content\"";
DEVELOPMENT_TEAM = 492RZGQ5SU;
DEVELOPMENT_TEAM = "";
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = UXC58NXTGL;
ENABLE_PREVIEWS = YES;
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_FILE = iosApp/Info.plist;
INFOPLIST_KEY_CFBundleDisplayName = Donemat;
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.education";
INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES;
INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
INFOPLIST_KEY_UILaunchScreen_Generation = YES;
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
IPHONEOS_DEPLOYMENT_TARGET = "$(RECOMMENDED_IPHONEOS_DEPLOYMENT_TARGET)";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
PROVISIONING_PROFILE_SPECIFIER = "";
"PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = Antoine;
SWIFT_EMIT_LOC_STRINGS = YES;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
@@ -378,22 +400,17 @@
};
/* End XCConfigurationList section */
/* Begin XCRemoteSwiftPackageReference section */
F36B7317302CAEC900B3E490 /* XCRemoteSwiftPackageReference "sentry-cocoa" */ = {
isa = XCRemoteSwiftPackageReference;
repositoryURL = "https://github.com/getsentry/sentry-cocoa";
requirement = {
kind = exactVersion;
version = 8.58.2;
};
/* Begin XCLocalSwiftPackageReference section */
E9D3AD5E9D18D87B871B00C0 /* XCLocalSwiftPackageReference "KotlinMultiplatformLinkedPackage" */ = {
isa = XCLocalSwiftPackageReference;
relativePath = KotlinMultiplatformLinkedPackage;
};
/* End XCRemoteSwiftPackageReference section */
/* End XCLocalSwiftPackageReference section */
/* Begin XCSwiftPackageProductDependency section */
F36B7318302CAEC900B3E490 /* Sentry */ = {
BF1E7FC8A3BBAFF25B00CB9D /* KotlinMultiplatformLinkedPackage */ = {
isa = XCSwiftPackageProductDependency;
package = F36B7317302CAEC900B3E490 /* XCRemoteSwiftPackageReference "sentry-cocoa" */;
productName = Sentry;
productName = KotlinMultiplatformLinkedPackage;
};
/* End XCSwiftPackageProductDependency section */
};
@@ -1,7 +1,7 @@
{
"images" : [
{
"filename" : "app-icon-1024.png",
"filename" : "logo_ios.jpg",
"idiom" : "universal",
"platform" : "ios",
"size" : "1024x1024"
@@ -33,4 +33,4 @@
"author" : "xcode",
"version" : 1
}
}
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 66 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 72 KiB

+6
View File
@@ -4,6 +4,12 @@
<dict>
<key>CADisableMinimumFrameDurationOnPhone</key>
<true/>
<key>CFBundleLocalizations</key>
<array>
<string>fr</string>
</array>
<key>ITSAppUsesNonExemptEncryption</key>
<false/>
<key>UIBackgroundModes</key>
<array>
<string>audio</string>
+29
View File
@@ -0,0 +1,29 @@
{
"sourceLanguage" : "fr",
"strings" : {
"CFBundleDisplayName" : {
"comment" : "Bundle display name",
"localizations" : {
"fr" : {
"stringUnit" : {
"state" : "translated",
"value" : "Donemat"
}
}
}
},
"CFBundleName" : {
"comment" : "Bundle name",
"extractionState" : "extracted_with_value",
"localizations" : {
"fr" : {
"stringUnit" : {
"state" : "new",
"value" : "Donemat"
}
}
}
}
},
"version" : "1.0"
}
+34
View File
@@ -0,0 +1,34 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>NSPrivacyTracking</key>
<false/>
<key>NSPrivacyTrackingDomains</key>
<array/>
<!-- Crash and diagnostic data collected by GlitchTip are declared by Sentry.framework's own manifest. -->
<key>NSPrivacyCollectedDataTypes</key>
<array/>
<key>NSPrivacyAccessedAPITypes</key>
<array>
<!-- stat/fstat/lstat, NSFileCreationDate: DataStore (okio) and Compose resources reading files in the app container. -->
<dict>
<key>NSPrivacyAccessedAPIType</key>
<string>NSPrivacyAccessedAPICategoryFileTimestamp</string>
<key>NSPrivacyAccessedAPITypeReasons</key>
<array>
<string>C617.1</string>
</array>
</dict>
<!-- NSProcessInfo.systemUptime: measuring elapsed time (Kotlin/Native runtime, coroutines). -->
<dict>
<key>NSPrivacyAccessedAPIType</key>
<string>NSPrivacyAccessedAPICategorySystemBootTime</string>
<key>NSPrivacyAccessedAPITypeReasons</key>
<array>
<string>35F9.1</string>
</array>
</dict>
</array>
</dict>
</plist>
+1
View File
@@ -35,6 +35,7 @@ kotlin {
}
commonMain.dependencies {
// Core modules
implementation(projects.core.accessibility)
implementation(projects.core.coroutines)
implementation(projects.core.logging)
implementation(projects.core.model)
@@ -1,6 +1,12 @@
package bzh.ajaury.chombev
import androidx.compose.ui.window.ComposeUIViewController
import bzh.ajaury.chombev.core.accessibility.ui.ProvideDynamicTypeFontScale
@Suppress("ktlint:standard:function-naming")
fun MainViewController() = ComposeUIViewController { App() }
fun MainViewController() =
ComposeUIViewController {
ProvideDynamicTypeFontScale {
App()
}
}