Files
Rajarshee Chatterjee 74808f086e feat: Replace Legacy Media Controls with Nitro-Powered Playback (#1896)
* feat: Replace Legacy Media Controls with Nitro-Powered Playback

* feat: Add TTS Engine Selection

* chore: Remove User-Facing Error Reporting

* refactor: Combine `Tts` and `TtsSession` Imports from `nitro-tts` Module

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-07-24 23:42:17 +05:30

57 lines
1.2 KiB
Swift
Generated

///
/// TtsPlaybackState.swift
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
/// https://github.com/mrousavy/nitro
/// Copyright © Marc Rousavy @ Margelo
///
/**
* Represents the JS union `TtsPlaybackState`, backed by a C++ enum.
*/
public typealias TtsPlaybackState = margelo.nitro.nitrotts.TtsPlaybackState
public extension TtsPlaybackState {
/**
* Get a TtsPlaybackState for the given String value, or
* return `nil` if the given value was invalid/unknown.
*/
init?(fromString string: String) {
switch string {
case "idle":
self = .idle
case "loading":
self = .loading
case "playing":
self = .playing
case "paused":
self = .paused
case "completed":
self = .completed
case "error":
self = .error
default:
return nil
}
}
/**
* Get the String value this TtsPlaybackState represents.
*/
var stringValue: String {
switch self {
case .idle:
return "idle"
case .loading:
return "loading"
case .playing:
return "playing"
case .paused:
return "paused"
case .completed:
return "completed"
case .error:
return "error"
}
}
}