File tree Expand file tree Collapse file tree
iOS/APIExample/APIExample/Examples/Advanced/VideoProcess
macOS/APIExample/Examples/Advanced/VideoProcess Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -636,7 +636,7 @@ extension VideoProcessMain {
636636 }
637637
638638 private func updateMakeup( ) {
639- guard let json = try ? JSONSerialization . data ( withJSONObject: makeupParams, options: . prettyPrinted ) ,
639+ guard let json = try ? JSONSerialization . data ( withJSONObject: makeupParams, options: [ ] ) ,
640640 let jsonString = String ( data: json, encoding: . utf8) else {
641641 print ( " updateMakeup fail " )
642642 return
Original file line number Diff line number Diff line change @@ -726,10 +726,10 @@ extension VideoProcess {
726726 if type == " slider " {
727727 let value = makeupList [ i] [ " value " ] as? [ Float ] ?? [ ]
728728 let sliderView = NSSlider ( )
729- sliderView. doubleValue = Double ( makeupParams [ key] as? Float ?? 0 )
730729 label. stringValue = String ( format: " %@[%.3f] " , label. stringValue, sliderView. doubleValue)
731730 sliderView. minValue = Double ( value. first ?? 0 )
732731 sliderView. maxValue = Double ( value. last ?? 1 )
732+ sliderView. doubleValue = Double ( makeupParams [ key] as? Double ?? 0 )
733733 sliderView. target = self
734734 sliderView. action = #selector( makeupSliderAction ( _: ) )
735735 valueView = sliderView
@@ -797,7 +797,7 @@ extension VideoProcess {
797797 }
798798
799799 private func updateMakeup( ) {
800- guard let json = try ? JSONSerialization . data ( withJSONObject: makeupParams, options: . prettyPrinted ) ,
800+ guard let json = try ? JSONSerialization . data ( withJSONObject: makeupParams, options: [ ] ) ,
801801 let jsonString = String ( data: json, encoding: . utf8) else {
802802 print ( " updateMakeup fail " )
803803 return
You can’t perform that action at this time.
0 commit comments