}
///监听到一句话结束,自动结束当前录音
- if (model.definite == true) {
- toolBar.stopRecord(.phone)
- stopPhoneRecord()
- }
+// if (model.definite == true) {
+// toolBar.stopRecord(.phone)
+// stopPhoneRecord()
+// }
guard let model = dataList.last else {
return
}
///监听到一句话结束,自动结束当前录音
- if (model.definite == true) {
- toolBar.stopRecord(.earphone)
- stopEarRecord()
- }
+// if (model.definite == true) {
+// toolBar.stopRecord(.earphone)
+// stopEarRecord()
+// }
guard let model = dataList.last else {
return
func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) {
let model = DeviceVM.shared.dataList[indexPath.row]
App.shared.goToPage(JoyAiFunctionVC(device: model))
+
}
func collectionView(_ collectionView: UICollectionView, viewForSupplementaryElementOfKind kind: String, at indexPath: IndexPath) -> UICollectionReusableView{
"scale" : "1x"
},
{
- "filename" : "Frame@2x(4).png",
+ "filename" : "Frame@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
- "filename" : "Frame@3x(5).png",
+ "filename" : "Frame@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
tmpList[msg!] = (model.text,model.index)
}
- ///监听到一句话结束,自动结束当前录音
- if (model.definite == true) {
- toolBar.stopRecord(.phone)
- stopPhoneRecord()
- }
+// ///监听到一句话结束,自动结束当前录音
+// if (model.definite == true) {
+// toolBar.stopRecord(.phone)
+// stopPhoneRecord()
+// }
guard let model = dataList.last else {
return
tmpList[msg!] = (model.text,model.index)
}
- ///监听到一句话结束,自动结束当前录音
- if (model.definite == true) {
- toolBar.stopRecord(.earphone)
- stopEarRecord()
- }
+// ///监听到一句话结束,自动结束当前录音
+// if (model.definite == true) {
+// toolBar.stopRecord(.earphone)
+// stopEarRecord()
+// }
guard let model = dataList.last else {
return
}
@objc func leftRecordBtnAction(){
- if self.isBusy {
+ if rightItem.recordItem.activeView.animating || rightItem.recordItem.loadView.animating || leftItem.recordItem.loadView.animating{
+ return
+ }
+ if leftItem.recordItem.activeView.animating{
+ delegate?.recordBar(self, device: .earphone,stateChange: .stop)
+ stopRecord(.earphone)
return
}
}
}
@objc func rightRecordBtnAction(){
- if self.isBusy{
+ if leftItem.recordItem.activeView.animating || leftItem.recordItem.loadView.animating || rightItem.recordItem.loadView.animating{
+ return
+ }
+ if rightItem.recordItem.activeView.animating{
+ stopRecord(.phone)
+ delegate?.recordBar(self, device: .phone,stateChange: .stop)
return
}
loadView.isHidden = false
loadView.startAnimating()
- DispatchQueue.main.asyncAfter(deadline:.now() + 2) { [weak self] in
+ DispatchQueue.main.asyncAfter(deadline:.now() + 0.3) { [weak self] in
self?.loadView.stopAnimating()
finished()
}