cc0428752b
Replace expo-notifications based TTS controls with a native NativeTTSMediaControl TurboModule using Android's MediaSessionCompat and MediaStyle notification. This provides proper media integration with lock screen controls, cover art display, and seekbar. - Add NativeTTSMediaControl Kotlin TurboModule with MediaSession - Support Prev, Rewind, Play/Pause, Next notification buttons - Show novel cover as notification album art - Add seekbar with seek-to-element support - Replace MMKV polling with NativeEventEmitter for instant response - Add rewind and seekTo methods to TTS in core.js - Clean up expo-notifications TTS setup from App.tsx Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
18 lines
528 B
TypeScript
18 lines
528 B
TypeScript
import { TurboModule, TurboModuleRegistry } from 'react-native';
|
|
|
|
export interface Spec extends TurboModule {
|
|
showMediaNotification(
|
|
title: string,
|
|
subtitle: string,
|
|
coverUri: string,
|
|
isPlaying: boolean,
|
|
): void;
|
|
updatePlaybackState(isPlaying: boolean): void;
|
|
updateProgress(current: number, total: number): void;
|
|
dismiss(): void;
|
|
addListener: (eventName: string) => void;
|
|
removeListeners: (count: number) => void;
|
|
}
|
|
|
|
export default TurboModuleRegistry.getEnforcing<Spec>('NativeTTSMediaControl');
|