mirror of
https://github.com/readest/readest.git
synced 2026-04-30 04:20:53 +00:00
tts: add native tts plugin for Android (#1376)
This commit is contained in:
parent
69d418aa61
commit
f8ac30adf1
45 changed files with 2256 additions and 3 deletions
|
|
@ -0,0 +1,20 @@
|
|||
import SwiftRs
|
||||
import Tauri
|
||||
import UIKit
|
||||
import WebKit
|
||||
|
||||
class PingArgs: Decodable {
|
||||
let value: String?
|
||||
}
|
||||
|
||||
class NativeTTSPlugin: Plugin {
|
||||
@objc public func ping(_ invoke: Invoke) throws {
|
||||
let args = try invoke.parseArgs(PingArgs.self)
|
||||
invoke.resolve(["value": args.value ?? ""])
|
||||
}
|
||||
}
|
||||
|
||||
@_cdecl("init_plugin_native_tts")
|
||||
func initPlugin() -> Plugin {
|
||||
return NativeTTSPlugin()
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue