diff --git a/plugin.xml b/plugin.xml
index 6cc065d..c73a790 100644
--- a/plugin.xml
+++ b/plugin.xml
@@ -54,6 +54,7 @@
+
diff --git a/src/ios/Assets.xcassets/AppIcon.appiconset/Contents.json b/src/ios/Assets.xcassets/AppIcon.appiconset/Contents.json
new file mode 100644
index 0000000..8121323
--- /dev/null
+++ b/src/ios/Assets.xcassets/AppIcon.appiconset/Contents.json
@@ -0,0 +1,53 @@
+{
+ "images" : [
+ {
+ "idiom" : "iphone",
+ "scale" : "2x",
+ "size" : "20x20"
+ },
+ {
+ "idiom" : "iphone",
+ "scale" : "3x",
+ "size" : "20x20"
+ },
+ {
+ "idiom" : "iphone",
+ "scale" : "2x",
+ "size" : "29x29"
+ },
+ {
+ "idiom" : "iphone",
+ "scale" : "3x",
+ "size" : "29x29"
+ },
+ {
+ "idiom" : "iphone",
+ "scale" : "2x",
+ "size" : "40x40"
+ },
+ {
+ "idiom" : "iphone",
+ "scale" : "3x",
+ "size" : "40x40"
+ },
+ {
+ "idiom" : "iphone",
+ "scale" : "2x",
+ "size" : "60x60"
+ },
+ {
+ "idiom" : "iphone",
+ "scale" : "3x",
+ "size" : "60x60"
+ },
+ {
+ "idiom" : "ios-marketing",
+ "scale" : "1x",
+ "size" : "1024x1024"
+ }
+ ],
+ "info" : {
+ "author" : "xcode",
+ "version" : 1
+ }
+}
diff --git a/src/ios/Assets.xcassets/Contents.json b/src/ios/Assets.xcassets/Contents.json
new file mode 100644
index 0000000..da4a164
--- /dev/null
+++ b/src/ios/Assets.xcassets/Contents.json
@@ -0,0 +1,6 @@
+{
+ "info" : {
+ "version" : 1,
+ "author" : "xcode"
+ }
+}
\ No newline at end of file
diff --git a/src/ios/Assets.xcassets/相机图标/Contents.json b/src/ios/Assets.xcassets/相机图标/Contents.json
new file mode 100644
index 0000000..da4a164
--- /dev/null
+++ b/src/ios/Assets.xcassets/相机图标/Contents.json
@@ -0,0 +1,6 @@
+{
+ "info" : {
+ "version" : 1,
+ "author" : "xcode"
+ }
+}
\ No newline at end of file
diff --git a/src/ios/Assets.xcassets/相机图标/btn_cancel_a.imageset/Contents.json b/src/ios/Assets.xcassets/相机图标/btn_cancel_a.imageset/Contents.json
new file mode 100644
index 0000000..5241de8
--- /dev/null
+++ b/src/ios/Assets.xcassets/相机图标/btn_cancel_a.imageset/Contents.json
@@ -0,0 +1,22 @@
+{
+ "images" : [
+ {
+ "idiom" : "universal",
+ "filename" : "btn_cancel_a.png",
+ "scale" : "1x"
+ },
+ {
+ "idiom" : "universal",
+ "filename" : "btn_cancel_a@2x.png",
+ "scale" : "2x"
+ },
+ {
+ "idiom" : "universal",
+ "scale" : "3x"
+ }
+ ],
+ "info" : {
+ "version" : 1,
+ "author" : "xcode"
+ }
+}
\ No newline at end of file
diff --git a/src/ios/Assets.xcassets/相机图标/btn_cancel_a.imageset/btn_cancel_a.png b/src/ios/Assets.xcassets/相机图标/btn_cancel_a.imageset/btn_cancel_a.png
new file mode 100644
index 0000000..2dd06e4
Binary files /dev/null and b/src/ios/Assets.xcassets/相机图标/btn_cancel_a.imageset/btn_cancel_a.png differ
diff --git a/src/ios/Assets.xcassets/相机图标/btn_cancel_a.imageset/btn_cancel_a@2x.png b/src/ios/Assets.xcassets/相机图标/btn_cancel_a.imageset/btn_cancel_a@2x.png
new file mode 100644
index 0000000..609de37
Binary files /dev/null and b/src/ios/Assets.xcassets/相机图标/btn_cancel_a.imageset/btn_cancel_a@2x.png differ
diff --git a/src/ios/Assets.xcassets/相机图标/btn_video_flash_close.imageset/Contents.json b/src/ios/Assets.xcassets/相机图标/btn_video_flash_close.imageset/Contents.json
new file mode 100644
index 0000000..423a0f3
--- /dev/null
+++ b/src/ios/Assets.xcassets/相机图标/btn_video_flash_close.imageset/Contents.json
@@ -0,0 +1,22 @@
+{
+ "images" : [
+ {
+ "idiom" : "universal",
+ "filename" : "btn_video_flash_close.png",
+ "scale" : "1x"
+ },
+ {
+ "idiom" : "universal",
+ "filename" : "btn_video_flash_close@2x.png",
+ "scale" : "2x"
+ },
+ {
+ "idiom" : "universal",
+ "scale" : "3x"
+ }
+ ],
+ "info" : {
+ "version" : 1,
+ "author" : "xcode"
+ }
+}
\ No newline at end of file
diff --git a/src/ios/Assets.xcassets/相机图标/btn_video_flash_close.imageset/btn_video_flash_close.png b/src/ios/Assets.xcassets/相机图标/btn_video_flash_close.imageset/btn_video_flash_close.png
new file mode 100644
index 0000000..3e10bac
Binary files /dev/null and b/src/ios/Assets.xcassets/相机图标/btn_video_flash_close.imageset/btn_video_flash_close.png differ
diff --git a/src/ios/Assets.xcassets/相机图标/btn_video_flash_close.imageset/btn_video_flash_close@2x.png b/src/ios/Assets.xcassets/相机图标/btn_video_flash_close.imageset/btn_video_flash_close@2x.png
new file mode 100644
index 0000000..95ff055
Binary files /dev/null and b/src/ios/Assets.xcassets/相机图标/btn_video_flash_close.imageset/btn_video_flash_close@2x.png differ
diff --git a/src/ios/Assets.xcassets/相机图标/btn_video_flash_open.imageset/Contents.json b/src/ios/Assets.xcassets/相机图标/btn_video_flash_open.imageset/Contents.json
new file mode 100644
index 0000000..b2d3f86
--- /dev/null
+++ b/src/ios/Assets.xcassets/相机图标/btn_video_flash_open.imageset/Contents.json
@@ -0,0 +1,22 @@
+{
+ "images" : [
+ {
+ "idiom" : "universal",
+ "filename" : "btn_video_flash_open.png",
+ "scale" : "1x"
+ },
+ {
+ "idiom" : "universal",
+ "filename" : "btn_video_flash_open@2x.png",
+ "scale" : "2x"
+ },
+ {
+ "idiom" : "universal",
+ "scale" : "3x"
+ }
+ ],
+ "info" : {
+ "version" : 1,
+ "author" : "xcode"
+ }
+}
\ No newline at end of file
diff --git a/src/ios/Assets.xcassets/相机图标/btn_video_flash_open.imageset/btn_video_flash_open.png b/src/ios/Assets.xcassets/相机图标/btn_video_flash_open.imageset/btn_video_flash_open.png
new file mode 100644
index 0000000..df177c6
Binary files /dev/null and b/src/ios/Assets.xcassets/相机图标/btn_video_flash_open.imageset/btn_video_flash_open.png differ
diff --git a/src/ios/Assets.xcassets/相机图标/btn_video_flash_open.imageset/btn_video_flash_open@2x.png b/src/ios/Assets.xcassets/相机图标/btn_video_flash_open.imageset/btn_video_flash_open@2x.png
new file mode 100644
index 0000000..e90a032
Binary files /dev/null and b/src/ios/Assets.xcassets/相机图标/btn_video_flash_open.imageset/btn_video_flash_open@2x.png differ
diff --git a/src/ios/Assets.xcassets/相机图标/btn_video_flip_camera.imageset/Contents.json b/src/ios/Assets.xcassets/相机图标/btn_video_flip_camera.imageset/Contents.json
new file mode 100644
index 0000000..c8a59f6
--- /dev/null
+++ b/src/ios/Assets.xcassets/相机图标/btn_video_flip_camera.imageset/Contents.json
@@ -0,0 +1,22 @@
+{
+ "images" : [
+ {
+ "idiom" : "universal",
+ "filename" : "btn_video_flip_camera.png",
+ "scale" : "1x"
+ },
+ {
+ "idiom" : "universal",
+ "filename" : "btn_video_flip_camera@2x.png",
+ "scale" : "2x"
+ },
+ {
+ "idiom" : "universal",
+ "scale" : "3x"
+ }
+ ],
+ "info" : {
+ "version" : 1,
+ "author" : "xcode"
+ }
+}
\ No newline at end of file
diff --git a/src/ios/Assets.xcassets/相机图标/btn_video_flip_camera.imageset/btn_video_flip_camera.png b/src/ios/Assets.xcassets/相机图标/btn_video_flip_camera.imageset/btn_video_flip_camera.png
new file mode 100644
index 0000000..c8af68f
Binary files /dev/null and b/src/ios/Assets.xcassets/相机图标/btn_video_flip_camera.imageset/btn_video_flip_camera.png differ
diff --git a/src/ios/Assets.xcassets/相机图标/btn_video_flip_camera.imageset/btn_video_flip_camera@2x.png b/src/ios/Assets.xcassets/相机图标/btn_video_flip_camera.imageset/btn_video_flip_camera@2x.png
new file mode 100644
index 0000000..fb6e9cd
Binary files /dev/null and b/src/ios/Assets.xcassets/相机图标/btn_video_flip_camera.imageset/btn_video_flip_camera@2x.png differ
diff --git a/src/ios/Assets.xcassets/相机图标/camera_focus_red.imageset/Contents.json b/src/ios/Assets.xcassets/相机图标/camera_focus_red.imageset/Contents.json
new file mode 100644
index 0000000..942af7f
--- /dev/null
+++ b/src/ios/Assets.xcassets/相机图标/camera_focus_red.imageset/Contents.json
@@ -0,0 +1,22 @@
+{
+ "images" : [
+ {
+ "idiom" : "universal",
+ "filename" : "camera_focus_red.png",
+ "scale" : "1x"
+ },
+ {
+ "idiom" : "universal",
+ "filename" : "camera_focus_red@2x.png",
+ "scale" : "2x"
+ },
+ {
+ "idiom" : "universal",
+ "scale" : "3x"
+ }
+ ],
+ "info" : {
+ "version" : 1,
+ "author" : "xcode"
+ }
+}
\ No newline at end of file
diff --git a/src/ios/Assets.xcassets/相机图标/camera_focus_red.imageset/camera_focus_red.png b/src/ios/Assets.xcassets/相机图标/camera_focus_red.imageset/camera_focus_red.png
new file mode 100644
index 0000000..5aa9817
Binary files /dev/null and b/src/ios/Assets.xcassets/相机图标/camera_focus_red.imageset/camera_focus_red.png differ
diff --git a/src/ios/Assets.xcassets/相机图标/camera_focus_red.imageset/camera_focus_red@2x.png b/src/ios/Assets.xcassets/相机图标/camera_focus_red.imageset/camera_focus_red@2x.png
new file mode 100644
index 0000000..8770879
Binary files /dev/null and b/src/ios/Assets.xcassets/相机图标/camera_focus_red.imageset/camera_focus_red@2x.png differ
diff --git a/src/ios/Assets.xcassets/相机图标/icon_btn_camera_flash_auto.imageset/Contents.json b/src/ios/Assets.xcassets/相机图标/icon_btn_camera_flash_auto.imageset/Contents.json
new file mode 100644
index 0000000..9817593
--- /dev/null
+++ b/src/ios/Assets.xcassets/相机图标/icon_btn_camera_flash_auto.imageset/Contents.json
@@ -0,0 +1,22 @@
+{
+ "images" : [
+ {
+ "idiom" : "universal",
+ "filename" : "icon_btn_camera_flash_auto.png",
+ "scale" : "1x"
+ },
+ {
+ "idiom" : "universal",
+ "filename" : "icon_btn_camera_flash_auto@2x.png",
+ "scale" : "2x"
+ },
+ {
+ "idiom" : "universal",
+ "scale" : "3x"
+ }
+ ],
+ "info" : {
+ "version" : 1,
+ "author" : "xcode"
+ }
+}
\ No newline at end of file
diff --git a/src/ios/Assets.xcassets/相机图标/icon_btn_camera_flash_auto.imageset/icon_btn_camera_flash_auto.png b/src/ios/Assets.xcassets/相机图标/icon_btn_camera_flash_auto.imageset/icon_btn_camera_flash_auto.png
new file mode 100644
index 0000000..efcd0b3
Binary files /dev/null and b/src/ios/Assets.xcassets/相机图标/icon_btn_camera_flash_auto.imageset/icon_btn_camera_flash_auto.png differ
diff --git a/src/ios/Assets.xcassets/相机图标/icon_btn_camera_flash_auto.imageset/icon_btn_camera_flash_auto@2x.png b/src/ios/Assets.xcassets/相机图标/icon_btn_camera_flash_auto.imageset/icon_btn_camera_flash_auto@2x.png
new file mode 100644
index 0000000..39f07dc
Binary files /dev/null and b/src/ios/Assets.xcassets/相机图标/icon_btn_camera_flash_auto.imageset/icon_btn_camera_flash_auto@2x.png differ
diff --git a/src/ios/Assets.xcassets/相机图标/icon_btn_camera_flash_off.imageset/Contents.json b/src/ios/Assets.xcassets/相机图标/icon_btn_camera_flash_off.imageset/Contents.json
new file mode 100644
index 0000000..cd3cdeb
--- /dev/null
+++ b/src/ios/Assets.xcassets/相机图标/icon_btn_camera_flash_off.imageset/Contents.json
@@ -0,0 +1,22 @@
+{
+ "images" : [
+ {
+ "idiom" : "universal",
+ "filename" : "icon_btn_camera_flash_off.png",
+ "scale" : "1x"
+ },
+ {
+ "idiom" : "universal",
+ "filename" : "icon_btn_camera_flash_off@2x.png",
+ "scale" : "2x"
+ },
+ {
+ "idiom" : "universal",
+ "scale" : "3x"
+ }
+ ],
+ "info" : {
+ "version" : 1,
+ "author" : "xcode"
+ }
+}
\ No newline at end of file
diff --git a/src/ios/Assets.xcassets/相机图标/icon_btn_camera_flash_off.imageset/icon_btn_camera_flash_off.png b/src/ios/Assets.xcassets/相机图标/icon_btn_camera_flash_off.imageset/icon_btn_camera_flash_off.png
new file mode 100644
index 0000000..f9434b5
Binary files /dev/null and b/src/ios/Assets.xcassets/相机图标/icon_btn_camera_flash_off.imageset/icon_btn_camera_flash_off.png differ
diff --git a/src/ios/Assets.xcassets/相机图标/icon_btn_camera_flash_off.imageset/icon_btn_camera_flash_off@2x.png b/src/ios/Assets.xcassets/相机图标/icon_btn_camera_flash_off.imageset/icon_btn_camera_flash_off@2x.png
new file mode 100644
index 0000000..21cb96a
Binary files /dev/null and b/src/ios/Assets.xcassets/相机图标/icon_btn_camera_flash_off.imageset/icon_btn_camera_flash_off@2x.png differ
diff --git a/src/ios/Assets.xcassets/相机图标/icon_btn_camera_flash_on.imageset/Contents.json b/src/ios/Assets.xcassets/相机图标/icon_btn_camera_flash_on.imageset/Contents.json
new file mode 100644
index 0000000..6de933b
--- /dev/null
+++ b/src/ios/Assets.xcassets/相机图标/icon_btn_camera_flash_on.imageset/Contents.json
@@ -0,0 +1,22 @@
+{
+ "images" : [
+ {
+ "idiom" : "universal",
+ "filename" : "icon_btn_camera_flash_on.png",
+ "scale" : "1x"
+ },
+ {
+ "idiom" : "universal",
+ "filename" : "icon_btn_camera_flash_on@2x.png",
+ "scale" : "2x"
+ },
+ {
+ "idiom" : "universal",
+ "scale" : "3x"
+ }
+ ],
+ "info" : {
+ "version" : 1,
+ "author" : "xcode"
+ }
+}
\ No newline at end of file
diff --git a/src/ios/Assets.xcassets/相机图标/icon_btn_camera_flash_on.imageset/icon_btn_camera_flash_on.png b/src/ios/Assets.xcassets/相机图标/icon_btn_camera_flash_on.imageset/icon_btn_camera_flash_on.png
new file mode 100644
index 0000000..f8fcd00
Binary files /dev/null and b/src/ios/Assets.xcassets/相机图标/icon_btn_camera_flash_on.imageset/icon_btn_camera_flash_on.png differ
diff --git a/src/ios/Assets.xcassets/相机图标/icon_btn_camera_flash_on.imageset/icon_btn_camera_flash_on@2x.png b/src/ios/Assets.xcassets/相机图标/icon_btn_camera_flash_on.imageset/icon_btn_camera_flash_on@2x.png
new file mode 100644
index 0000000..f5ad684
Binary files /dev/null and b/src/ios/Assets.xcassets/相机图标/icon_btn_camera_flash_on.imageset/icon_btn_camera_flash_on@2x.png differ
diff --git a/src/ios/Assets.xcassets/相机图标/sc_btn_take.imageset/Contents.json b/src/ios/Assets.xcassets/相机图标/sc_btn_take.imageset/Contents.json
new file mode 100644
index 0000000..eaa51cd
--- /dev/null
+++ b/src/ios/Assets.xcassets/相机图标/sc_btn_take.imageset/Contents.json
@@ -0,0 +1,22 @@
+{
+ "images" : [
+ {
+ "idiom" : "universal",
+ "filename" : "sc_btn_take.png",
+ "scale" : "1x"
+ },
+ {
+ "idiom" : "universal",
+ "filename" : "sc_btn_take@2x.png",
+ "scale" : "2x"
+ },
+ {
+ "idiom" : "universal",
+ "scale" : "3x"
+ }
+ ],
+ "info" : {
+ "version" : 1,
+ "author" : "xcode"
+ }
+}
\ No newline at end of file
diff --git a/src/ios/Assets.xcassets/相机图标/sc_btn_take.imageset/sc_btn_take.png b/src/ios/Assets.xcassets/相机图标/sc_btn_take.imageset/sc_btn_take.png
new file mode 100644
index 0000000..3a030bc
Binary files /dev/null and b/src/ios/Assets.xcassets/相机图标/sc_btn_take.imageset/sc_btn_take.png differ
diff --git a/src/ios/Assets.xcassets/相机图标/sc_btn_take.imageset/sc_btn_take@2x.png b/src/ios/Assets.xcassets/相机图标/sc_btn_take.imageset/sc_btn_take@2x.png
new file mode 100644
index 0000000..f2a4ae7
Binary files /dev/null and b/src/ios/Assets.xcassets/相机图标/sc_btn_take.imageset/sc_btn_take@2x.png differ
diff --git a/src/ios/Assets.xcassets/短视频/Contents.json b/src/ios/Assets.xcassets/短视频/Contents.json
new file mode 100644
index 0000000..da4a164
--- /dev/null
+++ b/src/ios/Assets.xcassets/短视频/Contents.json
@@ -0,0 +1,6 @@
+{
+ "info" : {
+ "version" : 1,
+ "author" : "xcode"
+ }
+}
\ No newline at end of file
diff --git a/src/ios/Assets.xcassets/短视频/短视频_关闭.imageset/Contents.json b/src/ios/Assets.xcassets/短视频/短视频_关闭.imageset/Contents.json
new file mode 100644
index 0000000..1fe9e99
--- /dev/null
+++ b/src/ios/Assets.xcassets/短视频/短视频_关闭.imageset/Contents.json
@@ -0,0 +1,21 @@
+{
+ "images" : [
+ {
+ "idiom" : "universal",
+ "scale" : "1x"
+ },
+ {
+ "idiom" : "universal",
+ "filename" : "短视频_关闭@2x.png",
+ "scale" : "2x"
+ },
+ {
+ "idiom" : "universal",
+ "scale" : "3x"
+ }
+ ],
+ "info" : {
+ "version" : 1,
+ "author" : "xcode"
+ }
+}
\ No newline at end of file
diff --git a/src/ios/Assets.xcassets/短视频/短视频_关闭.imageset/短视频_关闭@2x.png b/src/ios/Assets.xcassets/短视频/短视频_关闭.imageset/短视频_关闭@2x.png
new file mode 100644
index 0000000..08648bb
Binary files /dev/null and b/src/ios/Assets.xcassets/短视频/短视频_关闭.imageset/短视频_关闭@2x.png differ
diff --git a/src/ios/Assets.xcassets/短视频/短视频_完成.imageset/Contents.json b/src/ios/Assets.xcassets/短视频/短视频_完成.imageset/Contents.json
new file mode 100644
index 0000000..9756f5b
--- /dev/null
+++ b/src/ios/Assets.xcassets/短视频/短视频_完成.imageset/Contents.json
@@ -0,0 +1,21 @@
+{
+ "images" : [
+ {
+ "idiom" : "universal",
+ "scale" : "1x"
+ },
+ {
+ "idiom" : "universal",
+ "filename" : "短视频_完成@2x.png",
+ "scale" : "2x"
+ },
+ {
+ "idiom" : "universal",
+ "scale" : "3x"
+ }
+ ],
+ "info" : {
+ "version" : 1,
+ "author" : "xcode"
+ }
+}
\ No newline at end of file
diff --git a/src/ios/Assets.xcassets/短视频/短视频_完成.imageset/短视频_完成@2x.png b/src/ios/Assets.xcassets/短视频/短视频_完成.imageset/短视频_完成@2x.png
new file mode 100644
index 0000000..d14083f
Binary files /dev/null and b/src/ios/Assets.xcassets/短视频/短视频_完成.imageset/短视频_完成@2x.png differ
diff --git a/src/ios/Assets.xcassets/短视频/短视频_翻转.imageset/Contents.json b/src/ios/Assets.xcassets/短视频/短视频_翻转.imageset/Contents.json
new file mode 100644
index 0000000..57f9968
--- /dev/null
+++ b/src/ios/Assets.xcassets/短视频/短视频_翻转.imageset/Contents.json
@@ -0,0 +1,21 @@
+{
+ "images" : [
+ {
+ "idiom" : "universal",
+ "scale" : "1x"
+ },
+ {
+ "idiom" : "universal",
+ "filename" : "短视频_翻转@2x.png",
+ "scale" : "2x"
+ },
+ {
+ "idiom" : "universal",
+ "scale" : "3x"
+ }
+ ],
+ "info" : {
+ "version" : 1,
+ "author" : "xcode"
+ }
+}
\ No newline at end of file
diff --git a/src/ios/Assets.xcassets/短视频/短视频_翻转.imageset/短视频_翻转@2x.png b/src/ios/Assets.xcassets/短视频/短视频_翻转.imageset/短视频_翻转@2x.png
new file mode 100644
index 0000000..92ad22a
Binary files /dev/null and b/src/ios/Assets.xcassets/短视频/短视频_翻转.imageset/短视频_翻转@2x.png differ
diff --git a/src/ios/Assets.xcassets/短视频/短视频_重拍.imageset/Contents.json b/src/ios/Assets.xcassets/短视频/短视频_重拍.imageset/Contents.json
new file mode 100644
index 0000000..91bbe14
--- /dev/null
+++ b/src/ios/Assets.xcassets/短视频/短视频_重拍.imageset/Contents.json
@@ -0,0 +1,21 @@
+{
+ "images" : [
+ {
+ "idiom" : "universal",
+ "scale" : "1x"
+ },
+ {
+ "idiom" : "universal",
+ "filename" : "短视频_重拍@2x.png",
+ "scale" : "2x"
+ },
+ {
+ "idiom" : "universal",
+ "scale" : "3x"
+ }
+ ],
+ "info" : {
+ "version" : 1,
+ "author" : "xcode"
+ }
+}
\ No newline at end of file
diff --git a/src/ios/Assets.xcassets/短视频/短视频_重拍.imageset/短视频_重拍@2x.png b/src/ios/Assets.xcassets/短视频/短视频_重拍.imageset/短视频_重拍@2x.png
new file mode 100644
index 0000000..c45da7f
Binary files /dev/null and b/src/ios/Assets.xcassets/短视频/短视频_重拍.imageset/短视频_重拍@2x.png differ
diff --git a/src/ios/CapturePlugin.m b/src/ios/CapturePlugin.m
index 6b1a628..c6e634a 100644
--- a/src/ios/CapturePlugin.m
+++ b/src/ios/CapturePlugin.m
@@ -1,6 +1,7 @@
/********* Capture Plugin.m Cordova Plugin Implementation *******/
#import
+#import "SGRecordViewController.h"
@interface CapturePlugin : CDVPlugin {
// Member variables go here.
@@ -14,13 +15,12 @@
- (void)capture:(CDVInvokedUrlCommand*)command
{
CDVPluginResult* pluginResult = nil;
- NSString* echo = [command.arguments objectAtIndex:0];
-
- if (echo != nil && [echo length] > 0) {
- pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsString:echo];
- } else {
- pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR];
- }
+ SGRecordViewController *vc = [[SGRecordViewController alloc]init];
+ vc.view.frame = CGRectMake(0, 0,vc.view.frame.size.width,vc.view.frame.size.height);
+ // Run later to avoid the "took a long time" log message.
+ dispatch_async(dispatch_get_main_queue(), ^{
+ [self.viewController presentViewController:vc animated:YES completion:nil];
+ });
[self.commandDelegate sendPluginResult:pluginResult callbackId:command.callbackId];
}