diff --git a/build-templates/jsb-default/frameworks/runtime-src/proj.ios_mac/JMKA.xcodeproj/project.xcworkspace/xcuserdata/jianmiau.xcuserdatad/UserInterfaceState.xcuserstate b/build-templates/jsb-default/frameworks/runtime-src/proj.ios_mac/JMKA.xcodeproj/project.xcworkspace/xcuserdata/jianmiau.xcuserdatad/UserInterfaceState.xcuserstate index ac34ce8..7f68aae 100644 Binary files a/build-templates/jsb-default/frameworks/runtime-src/proj.ios_mac/JMKA.xcodeproj/project.xcworkspace/xcuserdata/jianmiau.xcuserdatad/UserInterfaceState.xcuserstate and b/build-templates/jsb-default/frameworks/runtime-src/proj.ios_mac/JMKA.xcodeproj/project.xcworkspace/xcuserdata/jianmiau.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/build-templates/jsb-default/frameworks/runtime-src/proj.ios_mac/JMKA.xcodeproj/xcuserdata/jianmiau.xcuserdatad/xcschemes/xcschememanagement.plist b/build-templates/jsb-default/frameworks/runtime-src/proj.ios_mac/JMKA.xcodeproj/xcuserdata/jianmiau.xcuserdatad/xcschemes/xcschememanagement.plist index 9ca1bc6..23605bc 100644 --- a/build-templates/jsb-default/frameworks/runtime-src/proj.ios_mac/JMKA.xcodeproj/xcuserdata/jianmiau.xcuserdatad/xcschemes/xcschememanagement.plist +++ b/build-templates/jsb-default/frameworks/runtime-src/proj.ios_mac/JMKA.xcodeproj/xcuserdata/jianmiau.xcuserdatad/xcschemes/xcschememanagement.plist @@ -7,7 +7,7 @@ JMKA-desktop.xcscheme_^#shared#^_ orderHint - 3 + 2 JMKA-mobile.xcscheme_^#shared#^_ diff --git a/build-templates/jsb-default/frameworks/runtime-src/proj.ios_mac/ios/TTS_S.swift b/build-templates/jsb-default/frameworks/runtime-src/proj.ios_mac/ios/TTS_S.swift index ff6cf79..2909db4 100644 --- a/build-templates/jsb-default/frameworks/runtime-src/proj.ios_mac/ios/TTS_S.swift +++ b/build-templates/jsb-default/frameworks/runtime-src/proj.ios_mac/ios/TTS_S.swift @@ -13,16 +13,28 @@ class TTS_S: NSObject { let synth = AVSpeechSynthesizer() + // 播放 @IBAction func play(msg: String) { - let myUtterance = AVSpeechUtterance(string: msg) myUtterance.voice = AVSpeechSynthesisVoice(language: "zh-TW") myUtterance.rate = 0.5 synth.speak(myUtterance) } - @IBAction func endHandler(_ sender: UIButton) { - synth.stopSpeaking(at: .word) + // 暂停 + @IBAction func pause() { + synth.pauseSpeaking(at: .immediate) + } + + // 继续 + @IBAction func continuePlay() { + synth.continueSpeaking() + + } + + // 停止 + @IBAction func stopPlay() { + synth.stopSpeaking(at: .immediate) } }