[jira] [Commented] (CB-12882) captureVideo doesn't close camera picker and doesn't show alert message about prohibited camera usage

2017-06-10 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CB-12882?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16045574#comment-16045574
 ] 

ASF GitHub Bot commented on CB-12882:
-

Github user asfgit closed the pull request at:

https://github.com/apache/cordova-plugin-media-capture/pull/79


> captureVideo doesn't close camera picker and doesn't show alert message about 
> prohibited camera usage
> -
>
> Key: CB-12882
> URL: https://issues.apache.org/jira/browse/CB-12882
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: cordova-plugin-media-capture
>Affects Versions: 1.4.2
>Reporter: Sergii Stotskyi
>  Labels: ios
>
> *Steps to reproduce*:
> # Create a simple application which calls `captureVideo()` method
> # Deploy application to real device
> # Click on button which starts video capturing
> # Click "No" when it asks permissions for camera
> *Expected result*:
> camera picker is animated out. And every time when user clicks on capture 
> video alert is shown as in `cordova-plugin-camera`: Access to the camera has 
> been prohibited, please enable it in the Settings app to continue. And 2 
> buttons are shown: OK, Settings
> *Actual result*:
> camera picker is not hidden. It's possible to click on record button and 
> record black screen. Eventually video is saved and viewed



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Commented] (CB-12882) captureVideo doesn't close camera picker and doesn't show alert message about prohibited camera usage

2017-06-10 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/CB-12882?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16045573#comment-16045573
 ] 

ASF subversion and git services commented on CB-12882:
--

Commit d19be5be1fa5dfbc30fbd997f5e780a056616138 in 
cordova-plugin-media-capture's branch refs/heads/master from [~sergii.stotskyi]
[ 
https://git-wip-us.apache.org/repos/asf?p=cordova-plugin-media-capture.git;h=d19be5b
 ]

CB-12882: (ios): adds support for permissions checks for captureVideo and 
captureImage methods


> captureVideo doesn't close camera picker and doesn't show alert message about 
> prohibited camera usage
> -
>
> Key: CB-12882
> URL: https://issues.apache.org/jira/browse/CB-12882
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: cordova-plugin-media-capture
>Affects Versions: 1.4.2
>Reporter: Sergii Stotskyi
>  Labels: ios
>
> *Steps to reproduce*:
> # Create a simple application which calls `captureVideo()` method
> # Deploy application to real device
> # Click on button which starts video capturing
> # Click "No" when it asks permissions for camera
> *Expected result*:
> camera picker is animated out. And every time when user clicks on capture 
> video alert is shown as in `cordova-plugin-camera`: Access to the camera has 
> been prohibited, please enable it in the Settings app to continue. And 2 
> buttons are shown: OK, Settings
> *Actual result*:
> camera picker is not hidden. It's possible to click on record button and 
> record black screen. Eventually video is saved and viewed



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Commented] (CB-12882) captureVideo doesn't close camera picker and doesn't show alert message about prohibited camera usage

2017-06-10 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CB-12882?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16045575#comment-16045575
 ] 

ASF GitHub Bot commented on CB-12882:
-

Github user filmaj commented on the issue:

https://github.com/apache/cordova-plugin-media-capture/pull/79
  
Awesome, thanks for the PR @stalniy and thanks @shazron for the review!


> captureVideo doesn't close camera picker and doesn't show alert message about 
> prohibited camera usage
> -
>
> Key: CB-12882
> URL: https://issues.apache.org/jira/browse/CB-12882
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: cordova-plugin-media-capture
>Affects Versions: 1.4.2
>Reporter: Sergii Stotskyi
>  Labels: ios
>
> *Steps to reproduce*:
> # Create a simple application which calls `captureVideo()` method
> # Deploy application to real device
> # Click on button which starts video capturing
> # Click "No" when it asks permissions for camera
> *Expected result*:
> camera picker is animated out. And every time when user clicks on capture 
> video alert is shown as in `cordova-plugin-camera`: Access to the camera has 
> been prohibited, please enable it in the Settings app to continue. And 2 
> buttons are shown: OK, Settings
> *Actual result*:
> camera picker is not hidden. It's possible to click on record button and 
> record black screen. Eventually video is saved and viewed



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Commented] (CB-12882) captureVideo doesn't close camera picker and doesn't show alert message about prohibited camera usage

2017-06-09 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CB-12882?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16045418#comment-16045418
 ] 

ASF GitHub Bot commented on CB-12882:
-

Github user stalniy commented on the issue:

https://github.com/apache/cordova-plugin-media-capture/pull/79
  
@filmaj could you please merge this if everything looks good?


> captureVideo doesn't close camera picker and doesn't show alert message about 
> prohibited camera usage
> -
>
> Key: CB-12882
> URL: https://issues.apache.org/jira/browse/CB-12882
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: cordova-plugin-media-capture
>Affects Versions: 1.4.2
>Reporter: Sergii Stotskyi
>  Labels: ios
>
> *Steps to reproduce*:
> # Create a simple application which calls `captureVideo()` method
> # Deploy application to real device
> # Click on button which starts video capturing
> # Click "No" when it asks permissions for camera
> *Expected result*:
> camera picker is animated out. And every time when user clicks on capture 
> video alert is shown as in `cordova-plugin-camera`: Access to the camera has 
> been prohibited, please enable it in the Settings app to continue. And 2 
> buttons are shown: OK, Settings
> *Actual result*:
> camera picker is not hidden. It's possible to click on record button and 
> record black screen. Eventually video is saved and viewed



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Commented] (CB-12882) captureVideo doesn't close camera picker and doesn't show alert message about prohibited camera usage

2017-06-08 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CB-12882?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16043115#comment-16043115
 ] 

ASF GitHub Bot commented on CB-12882:
-

Github user stalniy commented on the issue:

https://github.com/apache/cordova-plugin-media-capture/pull/79
  
@shazron could you please provide a feedback?


> captureVideo doesn't close camera picker and doesn't show alert message about 
> prohibited camera usage
> -
>
> Key: CB-12882
> URL: https://issues.apache.org/jira/browse/CB-12882
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: cordova-plugin-media-capture
>Affects Versions: 1.4.2
>Reporter: Sergii Stotskyi
>  Labels: ios
>
> *Steps to reproduce*:
> # Create a simple application which calls `captureVideo()` method
> # Deploy application to real device
> # Click on button which starts video capturing
> # Click "No" when it asks permissions for camera
> *Expected result*:
> camera picker is animated out. And every time when user clicks on capture 
> video alert is shown as in `cordova-plugin-camera`: Access to the camera has 
> been prohibited, please enable it in the Settings app to continue. And 2 
> buttons are shown: OK, Settings
> *Actual result*:
> camera picker is not hidden. It's possible to click on record button and 
> record black screen. Eventually video is saved and viewed



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Commented] (CB-12882) captureVideo doesn't close camera picker and doesn't show alert message about prohibited camera usage

2017-06-07 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CB-12882?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16040735#comment-16040735
 ] 

ASF GitHub Bot commented on CB-12882:
-

Github user cordova-qa commented on the issue:

https://github.com/apache/cordova-plugin-media-capture/pull/79
  
Cordova CI Build has completed successfully.

**Commit** - 
[Link](https://github.com/apache/cordova-plugin-media-capture/pull/79/commits/d19be5be1fa5dfbc30fbd997f5e780a056616138)
**Dashboard** - 
[Link](http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-media-capture-pr/43/)

 72 tests run, 0 skipped, 0 failed.



> captureVideo doesn't close camera picker and doesn't show alert message about 
> prohibited camera usage
> -
>
> Key: CB-12882
> URL: https://issues.apache.org/jira/browse/CB-12882
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: cordova-plugin-media-capture
>Affects Versions: 1.4.2
>Reporter: Sergii Stotskyi
>  Labels: ios
>
> *Steps to reproduce*:
> # Create a simple application which calls `captureVideo()` method
> # Deploy application to real device
> # Click on button which starts video capturing
> # Click "No" when it asks permissions for camera
> *Expected result*:
> camera picker is animated out. And every time when user clicks on capture 
> video alert is shown as in `cordova-plugin-camera`: Access to the camera has 
> been prohibited, please enable it in the Settings app to continue. And 2 
> buttons are shown: OK, Settings
> *Actual result*:
> camera picker is not hidden. It's possible to click on record button and 
> record black screen. Eventually video is saved and viewed



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Commented] (CB-12882) captureVideo doesn't close camera picker and doesn't show alert message about prohibited camera usage

2017-06-07 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CB-12882?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16040709#comment-16040709
 ] 

ASF GitHub Bot commented on CB-12882:
-

Github user stalniy commented on a diff in the pull request:


https://github.com/apache/cordova-plugin-media-capture/pull/79#discussion_r120596224
  
--- Diff: src/ios/CDVCapture.m ---
@@ -292,6 +295,65 @@ - (CDVPluginResult*)processVideo:(NSString*)moviePath 
forCallbackId:(NSString*)c
 return [CDVPluginResult resultWithStatus:CDVCommandStatus_OK 
messageAsArray:fileArray];
 }
 
+- (void)showAlertIfAccessProhibeted
+{
+if (![self hasCameraAccess]) {
+[self showPermissionsAlert];
+}
+}
+
+- (BOOL)hasCameraAccess
+{
+if (![AVCaptureDevice 
respondsToSelector:@selector(authorizationStatusForMediaType:)]) {
+return YES;
+}
--- End diff --

Fixed, please check whether I put cordova-ios dependency correctly


> captureVideo doesn't close camera picker and doesn't show alert message about 
> prohibited camera usage
> -
>
> Key: CB-12882
> URL: https://issues.apache.org/jira/browse/CB-12882
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: cordova-plugin-media-capture
>Affects Versions: 1.4.2
>Reporter: Sergii Stotskyi
>  Labels: ios
>
> *Steps to reproduce*:
> # Create a simple application which calls `captureVideo()` method
> # Deploy application to real device
> # Click on button which starts video capturing
> # Click "No" when it asks permissions for camera
> *Expected result*:
> camera picker is animated out. And every time when user clicks on capture 
> video alert is shown as in `cordova-plugin-camera`: Access to the camera has 
> been prohibited, please enable it in the Settings app to continue. And 2 
> buttons are shown: OK, Settings
> *Actual result*:
> camera picker is not hidden. It's possible to click on record button and 
> record black screen. Eventually video is saved and viewed



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Commented] (CB-12882) captureVideo doesn't close camera picker and doesn't show alert message about prohibited camera usage

2017-06-06 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CB-12882?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16040192#comment-16040192
 ] 

ASF GitHub Bot commented on CB-12882:
-

Github user cordova-qa commented on the issue:

https://github.com/apache/cordova-plugin-media-capture/pull/79
  
Cordova CI Build has completed successfully.

**Commit** - 
[Link](https://github.com/apache/cordova-plugin-media-capture/pull/79/commits/ba868e27f3ab2bae523a61700943ae512e461107)
**Dashboard** - 
[Link](http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-media-capture-pr/42/)

 72 tests run, 0 skipped, 0 failed.



> captureVideo doesn't close camera picker and doesn't show alert message about 
> prohibited camera usage
> -
>
> Key: CB-12882
> URL: https://issues.apache.org/jira/browse/CB-12882
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: cordova-plugin-media-capture
>Affects Versions: 1.4.2
>Reporter: Sergii Stotskyi
>  Labels: ios
>
> *Steps to reproduce*:
> # Create a simple application which calls `captureVideo()` method
> # Deploy application to real device
> # Click on button which starts video capturing
> # Click "No" when it asks permissions for camera
> *Expected result*:
> camera picker is animated out. And every time when user clicks on capture 
> video alert is shown as in `cordova-plugin-camera`: Access to the camera has 
> been prohibited, please enable it in the Settings app to continue. And 2 
> buttons are shown: OK, Settings
> *Actual result*:
> camera picker is not hidden. It's possible to click on record button and 
> record black screen. Eventually video is saved and viewed



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Commented] (CB-12882) captureVideo doesn't close camera picker and doesn't show alert message about prohibited camera usage

2017-06-06 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CB-12882?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16040166#comment-16040166
 ] 

ASF GitHub Bot commented on CB-12882:
-

Github user stalniy commented on a diff in the pull request:


https://github.com/apache/cordova-plugin-media-capture/pull/79#discussion_r120534419
  
--- Diff: src/ios/CDVCapture.m ---
@@ -292,6 +295,65 @@ - (CDVPluginResult*)processVideo:(NSString*)moviePath 
forCallbackId:(NSString*)c
 return [CDVPluginResult resultWithStatus:CDVCommandStatus_OK 
messageAsArray:fileArray];
 }
 
+- (void)showAlertIfAccessProhibeted
+{
+if (![self hasCameraAccess]) {
+[self showPermissionsAlert];
+}
+}
+
+- (BOOL)hasCameraAccess
+{
+if (![AVCaptureDevice 
respondsToSelector:@selector(authorizationStatusForMediaType:)]) {
+return YES;
+}
--- End diff --

I'm ok with that. Actually all iOS <= 10.0 currently are not available for 
installation on phones. So, it makes sense. 
Initially I tried to keep support line the same as `cordova-plugin-camera` 
does.

So, just to double check: 
1. I remove all `#pragma` statements
2. I remove all `&UIApplicationOpenSettingsURLString != NULL` checks
3. I add `ios` version restriction to be iOS 8+


> captureVideo doesn't close camera picker and doesn't show alert message about 
> prohibited camera usage
> -
>
> Key: CB-12882
> URL: https://issues.apache.org/jira/browse/CB-12882
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: cordova-plugin-media-capture
>Affects Versions: 1.4.2
>Reporter: Sergii Stotskyi
>  Labels: ios
>
> *Steps to reproduce*:
> # Create a simple application which calls `captureVideo()` method
> # Deploy application to real device
> # Click on button which starts video capturing
> # Click "No" when it asks permissions for camera
> *Expected result*:
> camera picker is animated out. And every time when user clicks on capture 
> video alert is shown as in `cordova-plugin-camera`: Access to the camera has 
> been prohibited, please enable it in the Settings app to continue. And 2 
> buttons are shown: OK, Settings
> *Actual result*:
> camera picker is not hidden. It's possible to click on record button and 
> record black screen. Eventually video is saved and viewed



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Commented] (CB-12882) captureVideo doesn't close camera picker and doesn't show alert message about prohibited camera usage

2017-06-06 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CB-12882?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16040162#comment-16040162
 ] 

ASF GitHub Bot commented on CB-12882:
-

Github user stalniy commented on a diff in the pull request:


https://github.com/apache/cordova-plugin-media-capture/pull/79#discussion_r120533655
  
--- Diff: src/ios/CDVCapture.m ---
@@ -292,6 +295,65 @@ - (CDVPluginResult*)processVideo:(NSString*)moviePath 
forCallbackId:(NSString*)c
 return [CDVPluginResult resultWithStatus:CDVCommandStatus_OK 
messageAsArray:fileArray];
 }
 
+- (void)showAlertIfAccessProhibeted
+{
--- End diff --

I put `{` in the same place as it's in other functions. So, this is from 
existing code:
```
- (void)getFormatData:(CDVInvokedUrlCommand*)command
{
```
And it's written like this for every function in that file.
Maybe I missed something?


> captureVideo doesn't close camera picker and doesn't show alert message about 
> prohibited camera usage
> -
>
> Key: CB-12882
> URL: https://issues.apache.org/jira/browse/CB-12882
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: cordova-plugin-media-capture
>Affects Versions: 1.4.2
>Reporter: Sergii Stotskyi
>  Labels: ios
>
> *Steps to reproduce*:
> # Create a simple application which calls `captureVideo()` method
> # Deploy application to real device
> # Click on button which starts video capturing
> # Click "No" when it asks permissions for camera
> *Expected result*:
> camera picker is animated out. And every time when user clicks on capture 
> video alert is shown as in `cordova-plugin-camera`: Access to the camera has 
> been prohibited, please enable it in the Settings app to continue. And 2 
> buttons are shown: OK, Settings
> *Actual result*:
> camera picker is not hidden. It's possible to click on record button and 
> record black screen. Eventually video is saved and viewed



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Commented] (CB-12882) captureVideo doesn't close camera picker and doesn't show alert message about prohibited camera usage

2017-06-06 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CB-12882?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16040155#comment-16040155
 ] 

ASF GitHub Bot commented on CB-12882:
-

Github user stalniy commented on a diff in the pull request:


https://github.com/apache/cordova-plugin-media-capture/pull/79#discussion_r120533184
  
--- Diff: src/ios/CDVCapture.m ---
@@ -292,6 +295,65 @@ - (CDVPluginResult*)processVideo:(NSString*)moviePath 
forCallbackId:(NSString*)c
 return [CDVPluginResult resultWithStatus:CDVCommandStatus_OK 
messageAsArray:fileArray];
 }
 
+- (void)showAlertIfAccessProhibeted
--- End diff --

sure :) 


> captureVideo doesn't close camera picker and doesn't show alert message about 
> prohibited camera usage
> -
>
> Key: CB-12882
> URL: https://issues.apache.org/jira/browse/CB-12882
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: cordova-plugin-media-capture
>Affects Versions: 1.4.2
>Reporter: Sergii Stotskyi
>  Labels: ios
>
> *Steps to reproduce*:
> # Create a simple application which calls `captureVideo()` method
> # Deploy application to real device
> # Click on button which starts video capturing
> # Click "No" when it asks permissions for camera
> *Expected result*:
> camera picker is animated out. And every time when user clicks on capture 
> video alert is shown as in `cordova-plugin-camera`: Access to the camera has 
> been prohibited, please enable it in the Settings app to continue. And 2 
> buttons are shown: OK, Settings
> *Actual result*:
> camera picker is not hidden. It's possible to click on record button and 
> record black screen. Eventually video is saved and viewed



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Commented] (CB-12882) captureVideo doesn't close camera picker and doesn't show alert message about prohibited camera usage

2017-06-06 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CB-12882?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16039885#comment-16039885
 ] 

ASF GitHub Bot commented on CB-12882:
-

Github user shazron commented on a diff in the pull request:


https://github.com/apache/cordova-plugin-media-capture/pull/79#discussion_r120506321
  
--- Diff: src/ios/CDVCapture.m ---
@@ -292,6 +295,65 @@ - (CDVPluginResult*)processVideo:(NSString*)moviePath 
forCallbackId:(NSString*)c
 return [CDVPluginResult resultWithStatus:CDVCommandStatus_OK 
messageAsArray:fileArray];
 }
 
+- (void)showAlertIfAccessProhibeted
+{
+if (![self hasCameraAccess]) {
+[self showPermissionsAlert];
+}
+}
+
+- (BOOL)hasCameraAccess
+{
+if (![AVCaptureDevice 
respondsToSelector:@selector(authorizationStatusForMediaType:)]) {
+return YES;
+}
--- End diff --

Just a note here regarding iOS support for this plugin. The code is sound, 
but this selector already exists since iOS 7. I'm wondering if we should add 
iOS engine restrictions to this plugin's plugin.xml instead of all this runtime 
checking.

FYI The latest cordova-ios only supports iOS 9 or greater.


> captureVideo doesn't close camera picker and doesn't show alert message about 
> prohibited camera usage
> -
>
> Key: CB-12882
> URL: https://issues.apache.org/jira/browse/CB-12882
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: cordova-plugin-media-capture
>Affects Versions: 1.4.2
>Reporter: Sergii Stotskyi
>  Labels: ios
>
> *Steps to reproduce*:
> # Create a simple application which calls `captureVideo()` method
> # Deploy application to real device
> # Click on button which starts video capturing
> # Click "No" when it asks permissions for camera
> *Expected result*:
> camera picker is animated out. And every time when user clicks on capture 
> video alert is shown as in `cordova-plugin-camera`: Access to the camera has 
> been prohibited, please enable it in the Settings app to continue. And 2 
> buttons are shown: OK, Settings
> *Actual result*:
> camera picker is not hidden. It's possible to click on record button and 
> record black screen. Eventually video is saved and viewed



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Commented] (CB-12882) captureVideo doesn't close camera picker and doesn't show alert message about prohibited camera usage

2017-06-06 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CB-12882?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16039772#comment-16039772
 ] 

ASF GitHub Bot commented on CB-12882:
-

Github user filmaj commented on a diff in the pull request:


https://github.com/apache/cordova-plugin-media-capture/pull/79#discussion_r120496517
  
--- Diff: src/ios/CDVCapture.m ---
@@ -292,6 +295,65 @@ - (CDVPluginResult*)processVideo:(NSString*)moviePath 
forCallbackId:(NSString*)c
 return [CDVPluginResult resultWithStatus:CDVCommandStatus_OK 
messageAsArray:fileArray];
 }
 
+- (void)showAlertIfAccessProhibeted
--- End diff --

Can we change the function name to `showAlertIfAccessProhibited`, just for 
spelling, please? :)


> captureVideo doesn't close camera picker and doesn't show alert message about 
> prohibited camera usage
> -
>
> Key: CB-12882
> URL: https://issues.apache.org/jira/browse/CB-12882
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: cordova-plugin-media-capture
>Affects Versions: 1.4.2
>Reporter: Sergii Stotskyi
>  Labels: ios
>
> *Steps to reproduce*:
> # Create a simple application which calls `captureVideo()` method
> # Deploy application to real device
> # Click on button which starts video capturing
> # Click "No" when it asks permissions for camera
> *Expected result*:
> camera picker is animated out. And every time when user clicks on capture 
> video alert is shown as in `cordova-plugin-camera`: Access to the camera has 
> been prohibited, please enable it in the Settings app to continue. And 2 
> buttons are shown: OK, Settings
> *Actual result*:
> camera picker is not hidden. It's possible to click on record button and 
> record black screen. Eventually video is saved and viewed



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Commented] (CB-12882) captureVideo doesn't close camera picker and doesn't show alert message about prohibited camera usage

2017-06-06 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CB-12882?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16039771#comment-16039771
 ] 

ASF GitHub Bot commented on CB-12882:
-

Github user filmaj commented on a diff in the pull request:


https://github.com/apache/cordova-plugin-media-capture/pull/79#discussion_r120496658
  
--- Diff: src/ios/CDVCapture.m ---
@@ -292,6 +295,65 @@ - (CDVPluginResult*)processVideo:(NSString*)moviePath 
forCallbackId:(NSString*)c
 return [CDVPluginResult resultWithStatus:CDVCommandStatus_OK 
messageAsArray:fileArray];
 }
 
+- (void)showAlertIfAccessProhibeted
+{
--- End diff --

For styling consistency, can we keep the opening brace of a function on the 
same line as the function?


> captureVideo doesn't close camera picker and doesn't show alert message about 
> prohibited camera usage
> -
>
> Key: CB-12882
> URL: https://issues.apache.org/jira/browse/CB-12882
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: cordova-plugin-media-capture
>Affects Versions: 1.4.2
>Reporter: Sergii Stotskyi
>  Labels: ios
>
> *Steps to reproduce*:
> # Create a simple application which calls `captureVideo()` method
> # Deploy application to real device
> # Click on button which starts video capturing
> # Click "No" when it asks permissions for camera
> *Expected result*:
> camera picker is animated out. And every time when user clicks on capture 
> video alert is shown as in `cordova-plugin-camera`: Access to the camera has 
> been prohibited, please enable it in the Settings app to continue. And 2 
> buttons are shown: OK, Settings
> *Actual result*:
> camera picker is not hidden. It's possible to click on record button and 
> record black screen. Eventually video is saved and viewed



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Commented] (CB-12882) captureVideo doesn't close camera picker and doesn't show alert message about prohibited camera usage

2017-06-05 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CB-12882?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16036838#comment-16036838
 ] 

ASF GitHub Bot commented on CB-12882:
-

Github user cordova-qa commented on the issue:

https://github.com/apache/cordova-plugin-media-capture/pull/79
  
Cordova CI Build has completed successfully.

**Commit** - 
[Link](https://github.com/apache/cordova-plugin-media-capture/pull/79/commits/db0842798ac21eaf3b19931390fbe04008007b95)
**Dashboard** - 
[Link](http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-media-capture-pr/41/)

 72 tests run, 0 skipped, 0 failed.



> captureVideo doesn't close camera picker and doesn't show alert message about 
> prohibited camera usage
> -
>
> Key: CB-12882
> URL: https://issues.apache.org/jira/browse/CB-12882
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: cordova-plugin-media-capture
>Affects Versions: 1.4.2
>Reporter: Sergii Stotskyi
>  Labels: ios
>
> *Steps to reproduce*:
> # Create a simple application which calls `captureVideo()` method
> # Deploy application to real device
> # Click on button which starts video capturing
> # Click "No" when it asks permissions for camera
> *Expected result*:
> camera picker is animated out. And every time when user clicks on capture 
> video alert is shown as in `cordova-plugin-camera`: Access to the camera has 
> been prohibited, please enable it in the Settings app to continue. And 2 
> buttons are shown: OK, Settings
> *Actual result*:
> camera picker is not hidden. It's possible to click on record button and 
> record black screen. Eventually video is saved and viewed



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Commented] (CB-12882) captureVideo doesn't close camera picker and doesn't show alert message about prohibited camera usage

2017-06-05 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CB-12882?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16036825#comment-16036825
 ] 

ASF GitHub Bot commented on CB-12882:
-

Github user cordova-qa commented on the issue:

https://github.com/apache/cordova-plugin-media-capture/pull/79
  
Cordova CI Build has completed successfully.

**Commit** - 
[Link](https://github.com/apache/cordova-plugin-media-capture/pull/79/commits/13a5135e1defee4afd0fd38cd3c34d1dcec87580)
**Dashboard** - 
[Link](http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-media-capture-pr/40/)

 72 tests run, 0 skipped, 0 failed.



> captureVideo doesn't close camera picker and doesn't show alert message about 
> prohibited camera usage
> -
>
> Key: CB-12882
> URL: https://issues.apache.org/jira/browse/CB-12882
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: cordova-plugin-media-capture
>Affects Versions: 1.4.2
>Reporter: Sergii Stotskyi
>  Labels: ios
>
> *Steps to reproduce*:
> # Create a simple application which calls `captureVideo()` method
> # Deploy application to real device
> # Click on button which starts video capturing
> # Click "No" when it asks permissions for camera
> *Expected result*:
> camera picker is animated out. And every time when user clicks on capture 
> video alert is shown as in `cordova-plugin-camera`: Access to the camera has 
> been prohibited, please enable it in the Settings app to continue. And 2 
> buttons are shown: OK, Settings
> *Actual result*:
> camera picker is not hidden. It's possible to click on record button and 
> record black screen. Eventually video is saved and viewed



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Commented] (CB-12882) captureVideo doesn't close camera picker and doesn't show alert message about prohibited camera usage

2017-06-05 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CB-12882?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16036804#comment-16036804
 ] 

ASF GitHub Bot commented on CB-12882:
-

GitHub user stalniy opened a pull request:

https://github.com/apache/cordova-plugin-media-capture/pull/79

CB-12882: (ios): adds support for permissions checks for camera capturing

### Platforms affected
iOS

### What does this PR do?
adds support for checking camera permission and if camera was prohibited 
shows alert message with information and 2 buttons: OK and Settings. The same 
`cordova-plugin-camera` does

### What testing has been done on this change?
I ran all automated tests, they passed. Also did manual testing and added 2 
additional cases in manual tests for checking presence of alert when camera 
access was prohibited

### Checklist
- [x] [Reported an issue](http://cordova.apache.org/contribute/issues.html) 
in the JIRA database
- [x] Commit message follows the format: "CB-3232: (android) Fix bug with 
resolving file paths", where CB- is the JIRA ID & "android" is the platform 
affected.
- [x] Added automated test coverage as appropriate for this change.


You can merge this pull request into a Git repository by running:

$ git pull https://github.com/stalniy/cordova-plugin-media-capture 
fix/permissions-request

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/cordova-plugin-media-capture/pull/79.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #79


commit 13a5135e1defee4afd0fd38cd3c34d1dcec87580
Author: Sergii Stotskyi 
Date:   2017-06-05T10:02:29Z

CB-12882: (ios): adds support for permissions checks for captureVideo and 
captureImage methods




> captureVideo doesn't close camera picker and doesn't show alert message about 
> prohibited camera usage
> -
>
> Key: CB-12882
> URL: https://issues.apache.org/jira/browse/CB-12882
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: cordova-plugin-media-capture
>Affects Versions: 1.4.2
>Reporter: Sergii Stotskyi
>  Labels: ios
>
> *Steps to reproduce*:
> # Create a simple application which calls `captureVideo()` method
> # Deploy application to real device
> # Click on button which starts video capturing
> # Click "No" when it asks permissions for camera
> *Expected result*:
> camera picker is animated out. And every time when user clicks on capture 
> video alert is shown as in `cordova-plugin-camera`: Access to the camera has 
> been prohibited, please enable it in the Settings app to continue. And 2 
> buttons are shown: OK, Settings
> *Actual result*:
> camera picker is not hidden. It's possible to click on record button and 
> record black screen. Eventually video is saved and viewed



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org