You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cordova.apache.org by "Filipe Cruz (Created) (JIRA)" <ji...@apache.org> on 2012/02/10 17:42:59 UTC

[jira] [Created] (CB-248) captureVideo() on iOS doesnt seem to save to the device's photoalbum like captureImage() does

captureVideo() on iOS doesnt seem to save to the device's photoalbum like captureImage() does
---------------------------------------------------------------------------------------------

                 Key: CB-248
                 URL: https://issues.apache.org/jira/browse/CB-248
             Project: Apache Callback
          Issue Type: Bug
          Components: iOS
    Affects Versions: 1.4.0
         Environment: tested on iOS only
            Reporter: Filipe Cruz
            Assignee: Shazron Abdullah


calling navigator.device.capture.captureImage() the local path to a temporary location is retrieved and the image is saved to the device's photoalbum.
calling navigator.device.capture.captureVideo() only the local path to a temporary location is retrieved, the video is not saved to the device's photoalbum.

I also tested camera.getPicture() but the capturing functionality of that funciton only works for images. So there is no working solution to capture video to device photoalbum using callback-phonegap.

Also, documentation of 
http://docs.phonegap.com/en/1.4.1/phonegap_camera_camera.md.html#cameraOptions_options
is wrong. 'MediaType' should be 'mediaType'

Test case below

{quote}
<!DOCTYPE html>
<html>
  <head>
    <title>Capture Video</title>
    <script type="text/javascript" charset="utf-8" src="phonegap.js"></script>
    <script type="text/javascript" charset="utf-8">
    function captureVideoSuccess(mediaFiles) {
        document.getElementById('videocontent').innerHTML = mediaFiles[0].fullPath;
        document.getElementById('videocontent2').innerHTML = '<video controls=true><source src="'+mediaFiles[0].fullPath+'"></video>';
    }
    
    function captureImageSuccess(mediaFiles) {
        document.getElementById('imagecontent').innerHTML = mediaFiles[0].fullPath;
        document.getElementById('imagecontent2').innerHTML = '<img src="'+mediaFiles[0].fullPath+'">';
    }

    function captureError(error) {
        var msg = 'An error occurred during capture: ' + error.code;
        navigator.notification.alert(msg, null, 'Uh oh!');
    }

    function captureVideo() {
        navigator.device.capture.captureVideo(captureVideoSuccess, captureError);
    }

    function captureImage() {
        navigator.device.capture.captureImage(captureImageSuccess, captureError);
    }
    </script>
    </head>
    <body>
        <button onclick="captureVideo();">Capture Video</button> <br><br>
        <button onclick="captureImage();">Capture Image</button> <br><br>

        <div id="videocontent">void</div>
        <div id="videocontent2">void</div>

        <div id="imagecontent">void</div>
        <div id="imagecontent2">void</div>
    </body>
</html>
{quote}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CB-248) captureVideo() on iOS doesnt seem to save to the device's photoalbum like captureImage() does

Posted by "Shazron Abdullah (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CB-248?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13205681#comment-13205681 ] 

Shazron Abdullah commented on CB-248:
-------------------------------------

Documentation bug logged separately as https://issues.apache.org/jira/browse/CB-249

Becky is looking into this bug - it *may* be by design.
                
> captureVideo() on iOS doesnt seem to save to the device's photoalbum like captureImage() does
> ---------------------------------------------------------------------------------------------
>
>                 Key: CB-248
>                 URL: https://issues.apache.org/jira/browse/CB-248
>             Project: Apache Callback
>          Issue Type: Bug
>          Components: iOS
>    Affects Versions: 1.4.0
>         Environment: tested on iOS only
>            Reporter: Filipe Cruz
>            Assignee: Shazron Abdullah
>              Labels: capture, documentation, video
>
> calling navigator.device.capture.captureImage() the local path to a temporary location is retrieved and the image is saved to the device's photoalbum.
> calling navigator.device.capture.captureVideo() only the local path to a temporary location is retrieved, the video is not saved to the device's photoalbum.
> I also tested camera.getPicture() but the capturing functionality of that funciton only works for images. So there is no working solution to capture video to device photoalbum using callback-phonegap.
> Also, documentation of 
> http://docs.phonegap.com/en/1.4.1/phonegap_camera_camera.md.html#cameraOptions_options
> is wrong. 'MediaType' should be 'mediaType'
> Test case below
> {code}
> <!DOCTYPE html>
> <html>
>   <head>
>     <title>Capture Video</title>
>     <script type="text/javascript" charset="utf-8" src="phonegap.js"></script>
>     <script type="text/javascript" charset="utf-8">
>     function captureVideoSuccess(mediaFiles) {
>         document.getElementById('videocontent').innerHTML = mediaFiles[0].fullPath;
>         document.getElementById('videocontent2').innerHTML = '<video controls=true><source src="'+mediaFiles[0].fullPath+'"></video>';
>     }
>     
>     function captureImageSuccess(mediaFiles) {
>         document.getElementById('imagecontent').innerHTML = mediaFiles[0].fullPath;
>         document.getElementById('imagecontent2').innerHTML = '<img src="'+mediaFiles[0].fullPath+'">';
>     }
>     function captureError(error) {
>         var msg = 'An error occurred during capture: ' + error.code;
>         navigator.notification.alert(msg, null, 'Uh oh!');
>     }
>     function captureVideo() {
>         navigator.device.capture.captureVideo(captureVideoSuccess, captureError);
>     }
>     function captureImage() {
>         navigator.device.capture.captureImage(captureImageSuccess, captureError);
>     }
>     </script>
>     </head>
>     <body>
>         <button onclick="captureVideo();">Capture Video</button> <br><br>
>         <button onclick="captureImage();">Capture Image</button> <br><br>
>         <div id="videocontent">void</div>
>         <div id="videocontent2">void</div>
>         <div id="imagecontent">void</div>
>         <div id="imagecontent2">void</div>
>     </body>
> </html>
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (CB-248) captureVideo() on iOS doesnt seem to save to the device's photoalbum like captureImage() does

Posted by "Filipe Cruz (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CB-248?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Filipe Cruz updated CB-248:
---------------------------

    Description: 
calling navigator.device.capture.captureImage() the local path to a temporary location is retrieved and the image is saved to the device's photoalbum.
calling navigator.device.capture.captureVideo() only the local path to a temporary location is retrieved, the video is not saved to the device's photoalbum.

I also tested camera.getPicture() but the capturing functionality of that funciton only works for images. So there is no working solution to capture video to device photoalbum using callback-phonegap.

Also, documentation of 
http://docs.phonegap.com/en/1.4.1/phonegap_camera_camera.md.html#cameraOptions_options
is wrong. 'MediaType' should be 'mediaType'

Test case below

{code}
<!DOCTYPE html>
<html>
  <head>
    <title>Capture Video</title>
    <script type="text/javascript" charset="utf-8" src="phonegap.js"></script>
    <script type="text/javascript" charset="utf-8">
    function captureVideoSuccess(mediaFiles) {
        document.getElementById('videocontent').innerHTML = mediaFiles[0].fullPath;
        document.getElementById('videocontent2').innerHTML = '<video controls=true><source src="'+mediaFiles[0].fullPath+'"></video>';
    }
    
    function captureImageSuccess(mediaFiles) {
        document.getElementById('imagecontent').innerHTML = mediaFiles[0].fullPath;
        document.getElementById('imagecontent2').innerHTML = '<img src="'+mediaFiles[0].fullPath+'">';
    }

    function captureError(error) {
        var msg = 'An error occurred during capture: ' + error.code;
        navigator.notification.alert(msg, null, 'Uh oh!');
    }

    function captureVideo() {
        navigator.device.capture.captureVideo(captureVideoSuccess, captureError);
    }

    function captureImage() {
        navigator.device.capture.captureImage(captureImageSuccess, captureError);
    }
    </script>
    </head>
    <body>
        <button onclick="captureVideo();">Capture Video</button> <br><br>
        <button onclick="captureImage();">Capture Image</button> <br><br>

        <div id="videocontent">void</div>
        <div id="videocontent2">void</div>

        <div id="imagecontent">void</div>
        <div id="imagecontent2">void</div>
    </body>
</html>
{code}

  was:
calling navigator.device.capture.captureImage() the local path to a temporary location is retrieved and the image is saved to the device's photoalbum.
calling navigator.device.capture.captureVideo() only the local path to a temporary location is retrieved, the video is not saved to the device's photoalbum.

I also tested camera.getPicture() but the capturing functionality of that funciton only works for images. So there is no working solution to capture video to device photoalbum using callback-phonegap.

Also, documentation of 
http://docs.phonegap.com/en/1.4.1/phonegap_camera_camera.md.html#cameraOptions_options
is wrong. 'MediaType' should be 'mediaType'

Test case below

{quote}
<!DOCTYPE html>
<html>
  <head>
    <title>Capture Video</title>
    <script type="text/javascript" charset="utf-8" src="phonegap.js"></script>
    <script type="text/javascript" charset="utf-8">
    function captureVideoSuccess(mediaFiles) {
        document.getElementById('videocontent').innerHTML = mediaFiles[0].fullPath;
        document.getElementById('videocontent2').innerHTML = '<video controls=true><source src="'+mediaFiles[0].fullPath+'"></video>';
    }
    
    function captureImageSuccess(mediaFiles) {
        document.getElementById('imagecontent').innerHTML = mediaFiles[0].fullPath;
        document.getElementById('imagecontent2').innerHTML = '<img src="'+mediaFiles[0].fullPath+'">';
    }

    function captureError(error) {
        var msg = 'An error occurred during capture: ' + error.code;
        navigator.notification.alert(msg, null, 'Uh oh!');
    }

    function captureVideo() {
        navigator.device.capture.captureVideo(captureVideoSuccess, captureError);
    }

    function captureImage() {
        navigator.device.capture.captureImage(captureImageSuccess, captureError);
    }
    </script>
    </head>
    <body>
        <button onclick="captureVideo();">Capture Video</button> <br><br>
        <button onclick="captureImage();">Capture Image</button> <br><br>

        <div id="videocontent">void</div>
        <div id="videocontent2">void</div>

        <div id="imagecontent">void</div>
        <div id="imagecontent2">void</div>
    </body>
</html>
{quote}

    
> captureVideo() on iOS doesnt seem to save to the device's photoalbum like captureImage() does
> ---------------------------------------------------------------------------------------------
>
>                 Key: CB-248
>                 URL: https://issues.apache.org/jira/browse/CB-248
>             Project: Apache Callback
>          Issue Type: Bug
>          Components: iOS
>    Affects Versions: 1.4.0
>         Environment: tested on iOS only
>            Reporter: Filipe Cruz
>            Assignee: Shazron Abdullah
>              Labels: capture, documentation, video
>
> calling navigator.device.capture.captureImage() the local path to a temporary location is retrieved and the image is saved to the device's photoalbum.
> calling navigator.device.capture.captureVideo() only the local path to a temporary location is retrieved, the video is not saved to the device's photoalbum.
> I also tested camera.getPicture() but the capturing functionality of that funciton only works for images. So there is no working solution to capture video to device photoalbum using callback-phonegap.
> Also, documentation of 
> http://docs.phonegap.com/en/1.4.1/phonegap_camera_camera.md.html#cameraOptions_options
> is wrong. 'MediaType' should be 'mediaType'
> Test case below
> {code}
> <!DOCTYPE html>
> <html>
>   <head>
>     <title>Capture Video</title>
>     <script type="text/javascript" charset="utf-8" src="phonegap.js"></script>
>     <script type="text/javascript" charset="utf-8">
>     function captureVideoSuccess(mediaFiles) {
>         document.getElementById('videocontent').innerHTML = mediaFiles[0].fullPath;
>         document.getElementById('videocontent2').innerHTML = '<video controls=true><source src="'+mediaFiles[0].fullPath+'"></video>';
>     }
>     
>     function captureImageSuccess(mediaFiles) {
>         document.getElementById('imagecontent').innerHTML = mediaFiles[0].fullPath;
>         document.getElementById('imagecontent2').innerHTML = '<img src="'+mediaFiles[0].fullPath+'">';
>     }
>     function captureError(error) {
>         var msg = 'An error occurred during capture: ' + error.code;
>         navigator.notification.alert(msg, null, 'Uh oh!');
>     }
>     function captureVideo() {
>         navigator.device.capture.captureVideo(captureVideoSuccess, captureError);
>     }
>     function captureImage() {
>         navigator.device.capture.captureImage(captureImageSuccess, captureError);
>     }
>     </script>
>     </head>
>     <body>
>         <button onclick="captureVideo();">Capture Video</button> <br><br>
>         <button onclick="captureImage();">Capture Image</button> <br><br>
>         <div id="videocontent">void</div>
>         <div id="videocontent2">void</div>
>         <div id="imagecontent">void</div>
>         <div id="imagecontent2">void</div>
>     </body>
> </html>
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (CB-248) captureVideo() on iOS doesnt seem to save to the device's photoalbum like captureImage() does

Posted by "Shazron Abdullah (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CB-248?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Shazron Abdullah updated CB-248:
--------------------------------

    Issue Type: New Feature  (was: Bug)
    
> captureVideo() on iOS doesnt seem to save to the device's photoalbum like captureImage() does
> ---------------------------------------------------------------------------------------------
>
>                 Key: CB-248
>                 URL: https://issues.apache.org/jira/browse/CB-248
>             Project: Apache Callback
>          Issue Type: New Feature
>          Components: iOS
>    Affects Versions: 1.4.0
>         Environment: tested on iOS only
>            Reporter: Filipe Cruz
>            Assignee: Becky Gibson
>              Labels: capture, documentation, video
>
> calling navigator.device.capture.captureImage() the local path to a temporary location is retrieved and the image is saved to the device's photoalbum.
> calling navigator.device.capture.captureVideo() only the local path to a temporary location is retrieved, the video is not saved to the device's photoalbum.
> I also tested camera.getPicture() but the capturing functionality of that funciton only works for images. So there is no working solution to capture video to device photoalbum using callback-phonegap.
> Also, documentation of 
> http://docs.phonegap.com/en/1.4.1/phonegap_camera_camera.md.html#cameraOptions_options
> is wrong. 'MediaType' should be 'mediaType'
> Test case below
> {code}
> <!DOCTYPE html>
> <html>
>   <head>
>     <title>Capture Video</title>
>     <script type="text/javascript" charset="utf-8" src="phonegap.js"></script>
>     <script type="text/javascript" charset="utf-8">
>     function captureVideoSuccess(mediaFiles) {
>         document.getElementById('videocontent').innerHTML = mediaFiles[0].fullPath;
>         document.getElementById('videocontent2').innerHTML = '<video controls=true><source src="'+mediaFiles[0].fullPath+'"></video>';
>     }
>     
>     function captureImageSuccess(mediaFiles) {
>         document.getElementById('imagecontent').innerHTML = mediaFiles[0].fullPath;
>         document.getElementById('imagecontent2').innerHTML = '<img src="'+mediaFiles[0].fullPath+'">';
>     }
>     function captureError(error) {
>         var msg = 'An error occurred during capture: ' + error.code;
>         navigator.notification.alert(msg, null, 'Uh oh!');
>     }
>     function captureVideo() {
>         navigator.device.capture.captureVideo(captureVideoSuccess, captureError);
>     }
>     function captureImage() {
>         navigator.device.capture.captureImage(captureImageSuccess, captureError);
>     }
>     </script>
>     </head>
>     <body>
>         <button onclick="captureVideo();">Capture Video</button> <br><br>
>         <button onclick="captureImage();">Capture Image</button> <br><br>
>         <div id="videocontent">void</div>
>         <div id="videocontent2">void</div>
>         <div id="imagecontent">void</div>
>         <div id="imagecontent2">void</div>
>     </body>
> </html>
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CB-248) captureVideo() on iOS doesnt seem to save to the device's photoalbum like captureImage() does

Posted by "Becky Gibson (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CB-248?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13205690#comment-13205690 ] 

Becky Gibson commented on CB-248:
---------------------------------

In order to be consistent with the Android implementation, the capture api should not save captured images nor captured Videos to the photoAlbum. The capture api conforms to the W3C spec - although it isn't really clear whether images should be saved to the device's default "image" store on not.  I have not removes the saving of capture images to the photo album but probably should (although I suspect that would make some iOS users unhappy).  For what it's worth, Blackberry does save images and video because that is the default behavior of BB's built in camera api.  

This was already reported at https://issues.apache.org/jira/browse/CB-105 and closed.  


                
> captureVideo() on iOS doesnt seem to save to the device's photoalbum like captureImage() does
> ---------------------------------------------------------------------------------------------
>
>                 Key: CB-248
>                 URL: https://issues.apache.org/jira/browse/CB-248
>             Project: Apache Callback
>          Issue Type: Bug
>          Components: iOS
>    Affects Versions: 1.4.0
>         Environment: tested on iOS only
>            Reporter: Filipe Cruz
>            Assignee: Becky Gibson
>              Labels: capture, documentation, video
>
> calling navigator.device.capture.captureImage() the local path to a temporary location is retrieved and the image is saved to the device's photoalbum.
> calling navigator.device.capture.captureVideo() only the local path to a temporary location is retrieved, the video is not saved to the device's photoalbum.
> I also tested camera.getPicture() but the capturing functionality of that funciton only works for images. So there is no working solution to capture video to device photoalbum using callback-phonegap.
> Also, documentation of 
> http://docs.phonegap.com/en/1.4.1/phonegap_camera_camera.md.html#cameraOptions_options
> is wrong. 'MediaType' should be 'mediaType'
> Test case below
> {code}
> <!DOCTYPE html>
> <html>
>   <head>
>     <title>Capture Video</title>
>     <script type="text/javascript" charset="utf-8" src="phonegap.js"></script>
>     <script type="text/javascript" charset="utf-8">
>     function captureVideoSuccess(mediaFiles) {
>         document.getElementById('videocontent').innerHTML = mediaFiles[0].fullPath;
>         document.getElementById('videocontent2').innerHTML = '<video controls=true><source src="'+mediaFiles[0].fullPath+'"></video>';
>     }
>     
>     function captureImageSuccess(mediaFiles) {
>         document.getElementById('imagecontent').innerHTML = mediaFiles[0].fullPath;
>         document.getElementById('imagecontent2').innerHTML = '<img src="'+mediaFiles[0].fullPath+'">';
>     }
>     function captureError(error) {
>         var msg = 'An error occurred during capture: ' + error.code;
>         navigator.notification.alert(msg, null, 'Uh oh!');
>     }
>     function captureVideo() {
>         navigator.device.capture.captureVideo(captureVideoSuccess, captureError);
>     }
>     function captureImage() {
>         navigator.device.capture.captureImage(captureImageSuccess, captureError);
>     }
>     </script>
>     </head>
>     <body>
>         <button onclick="captureVideo();">Capture Video</button> <br><br>
>         <button onclick="captureImage();">Capture Image</button> <br><br>
>         <div id="videocontent">void</div>
>         <div id="videocontent2">void</div>
>         <div id="imagecontent">void</div>
>         <div id="imagecontent2">void</div>
>     </body>
> </html>
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (CB-248) captureVideo() on iOS doesnt seem to save to the device's photoalbum like captureImage() does

Posted by "Shazron Abdullah (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CB-248?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Shazron Abdullah updated CB-248:
--------------------------------

    Assignee: Becky Gibson  (was: Shazron Abdullah)
    
> captureVideo() on iOS doesnt seem to save to the device's photoalbum like captureImage() does
> ---------------------------------------------------------------------------------------------
>
>                 Key: CB-248
>                 URL: https://issues.apache.org/jira/browse/CB-248
>             Project: Apache Callback
>          Issue Type: Bug
>          Components: iOS
>    Affects Versions: 1.4.0
>         Environment: tested on iOS only
>            Reporter: Filipe Cruz
>            Assignee: Becky Gibson
>              Labels: capture, documentation, video
>
> calling navigator.device.capture.captureImage() the local path to a temporary location is retrieved and the image is saved to the device's photoalbum.
> calling navigator.device.capture.captureVideo() only the local path to a temporary location is retrieved, the video is not saved to the device's photoalbum.
> I also tested camera.getPicture() but the capturing functionality of that funciton only works for images. So there is no working solution to capture video to device photoalbum using callback-phonegap.
> Also, documentation of 
> http://docs.phonegap.com/en/1.4.1/phonegap_camera_camera.md.html#cameraOptions_options
> is wrong. 'MediaType' should be 'mediaType'
> Test case below
> {code}
> <!DOCTYPE html>
> <html>
>   <head>
>     <title>Capture Video</title>
>     <script type="text/javascript" charset="utf-8" src="phonegap.js"></script>
>     <script type="text/javascript" charset="utf-8">
>     function captureVideoSuccess(mediaFiles) {
>         document.getElementById('videocontent').innerHTML = mediaFiles[0].fullPath;
>         document.getElementById('videocontent2').innerHTML = '<video controls=true><source src="'+mediaFiles[0].fullPath+'"></video>';
>     }
>     
>     function captureImageSuccess(mediaFiles) {
>         document.getElementById('imagecontent').innerHTML = mediaFiles[0].fullPath;
>         document.getElementById('imagecontent2').innerHTML = '<img src="'+mediaFiles[0].fullPath+'">';
>     }
>     function captureError(error) {
>         var msg = 'An error occurred during capture: ' + error.code;
>         navigator.notification.alert(msg, null, 'Uh oh!');
>     }
>     function captureVideo() {
>         navigator.device.capture.captureVideo(captureVideoSuccess, captureError);
>     }
>     function captureImage() {
>         navigator.device.capture.captureImage(captureImageSuccess, captureError);
>     }
>     </script>
>     </head>
>     <body>
>         <button onclick="captureVideo();">Capture Video</button> <br><br>
>         <button onclick="captureImage();">Capture Image</button> <br><br>
>         <div id="videocontent">void</div>
>         <div id="videocontent2">void</div>
>         <div id="imagecontent">void</div>
>         <div id="imagecontent2">void</div>
>     </body>
> </html>
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CB-248) captureVideo() on iOS doesnt seem to save to the device's photoalbum like captureImage() does

Posted by "Shazron Abdullah (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CB-248?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13205718#comment-13205718 ] 

Shazron Abdullah commented on CB-248:
-------------------------------------

I have changed the type of this issue to "New Feature" since this is an extension to the W3C Media Capture API (and possibly requires it to be a separate API), and we are trying to conform to the W3C API.

The W3C Media Capture API defines a "lifetime" for a media capture: http://www.w3.org/TR/media-capture-api/#lifetime
"User agents should discard the captured files only after the top-level browsing context [HTML5] related to the script is destroyed. In a special cases where the UA detects limited storage space, files may be deleted earlier."

Although we really should remove for captureImage() saving to the photo album so we can be consistent cross-platform - we probably will not be removing a feature that is already out there. We'll try to figure out a suitable alternative or migration.
                
> captureVideo() on iOS doesnt seem to save to the device's photoalbum like captureImage() does
> ---------------------------------------------------------------------------------------------
>
>                 Key: CB-248
>                 URL: https://issues.apache.org/jira/browse/CB-248
>             Project: Apache Callback
>          Issue Type: New Feature
>          Components: iOS
>    Affects Versions: 1.4.0
>         Environment: tested on iOS only
>            Reporter: Filipe Cruz
>            Assignee: Becky Gibson
>              Labels: capture, documentation, video
>
> calling navigator.device.capture.captureImage() the local path to a temporary location is retrieved and the image is saved to the device's photoalbum.
> calling navigator.device.capture.captureVideo() only the local path to a temporary location is retrieved, the video is not saved to the device's photoalbum.
> I also tested camera.getPicture() but the capturing functionality of that funciton only works for images. So there is no working solution to capture video to device photoalbum using callback-phonegap.
> Also, documentation of 
> http://docs.phonegap.com/en/1.4.1/phonegap_camera_camera.md.html#cameraOptions_options
> is wrong. 'MediaType' should be 'mediaType'
> Test case below
> {code}
> <!DOCTYPE html>
> <html>
>   <head>
>     <title>Capture Video</title>
>     <script type="text/javascript" charset="utf-8" src="phonegap.js"></script>
>     <script type="text/javascript" charset="utf-8">
>     function captureVideoSuccess(mediaFiles) {
>         document.getElementById('videocontent').innerHTML = mediaFiles[0].fullPath;
>         document.getElementById('videocontent2').innerHTML = '<video controls=true><source src="'+mediaFiles[0].fullPath+'"></video>';
>     }
>     
>     function captureImageSuccess(mediaFiles) {
>         document.getElementById('imagecontent').innerHTML = mediaFiles[0].fullPath;
>         document.getElementById('imagecontent2').innerHTML = '<img src="'+mediaFiles[0].fullPath+'">';
>     }
>     function captureError(error) {
>         var msg = 'An error occurred during capture: ' + error.code;
>         navigator.notification.alert(msg, null, 'Uh oh!');
>     }
>     function captureVideo() {
>         navigator.device.capture.captureVideo(captureVideoSuccess, captureError);
>     }
>     function captureImage() {
>         navigator.device.capture.captureImage(captureImageSuccess, captureError);
>     }
>     </script>
>     </head>
>     <body>
>         <button onclick="captureVideo();">Capture Video</button> <br><br>
>         <button onclick="captureImage();">Capture Image</button> <br><br>
>         <div id="videocontent">void</div>
>         <div id="videocontent2">void</div>
>         <div id="imagecontent">void</div>
>         <div id="imagecontent2">void</div>
>     </body>
> </html>
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (CB-248) captureVideo() on iOS doesnt seem to save to the device's photoalbum like captureImage() does

Posted by "Shazron Abdullah (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CB-248?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Shazron Abdullah updated CB-248:
--------------------------------

    Priority: Minor  (was: Major)
    
> captureVideo() on iOS doesnt seem to save to the device's photoalbum like captureImage() does
> ---------------------------------------------------------------------------------------------
>
>                 Key: CB-248
>                 URL: https://issues.apache.org/jira/browse/CB-248
>             Project: Apache Callback
>          Issue Type: New Feature
>          Components: iOS
>    Affects Versions: 1.4.0
>         Environment: tested on iOS only
>            Reporter: Filipe Cruz
>            Assignee: Becky Gibson
>            Priority: Minor
>              Labels: capture, documentation, video
>
> calling navigator.device.capture.captureImage() the local path to a temporary location is retrieved and the image is saved to the device's photoalbum.
> calling navigator.device.capture.captureVideo() only the local path to a temporary location is retrieved, the video is not saved to the device's photoalbum.
> I also tested camera.getPicture() but the capturing functionality of that funciton only works for images. So there is no working solution to capture video to device photoalbum using callback-phonegap.
> Also, documentation of 
> http://docs.phonegap.com/en/1.4.1/phonegap_camera_camera.md.html#cameraOptions_options
> is wrong. 'MediaType' should be 'mediaType'
> Test case below
> {code}
> <!DOCTYPE html>
> <html>
>   <head>
>     <title>Capture Video</title>
>     <script type="text/javascript" charset="utf-8" src="phonegap.js"></script>
>     <script type="text/javascript" charset="utf-8">
>     function captureVideoSuccess(mediaFiles) {
>         document.getElementById('videocontent').innerHTML = mediaFiles[0].fullPath;
>         document.getElementById('videocontent2').innerHTML = '<video controls=true><source src="'+mediaFiles[0].fullPath+'"></video>';
>     }
>     
>     function captureImageSuccess(mediaFiles) {
>         document.getElementById('imagecontent').innerHTML = mediaFiles[0].fullPath;
>         document.getElementById('imagecontent2').innerHTML = '<img src="'+mediaFiles[0].fullPath+'">';
>     }
>     function captureError(error) {
>         var msg = 'An error occurred during capture: ' + error.code;
>         navigator.notification.alert(msg, null, 'Uh oh!');
>     }
>     function captureVideo() {
>         navigator.device.capture.captureVideo(captureVideoSuccess, captureError);
>     }
>     function captureImage() {
>         navigator.device.capture.captureImage(captureImageSuccess, captureError);
>     }
>     </script>
>     </head>
>     <body>
>         <button onclick="captureVideo();">Capture Video</button> <br><br>
>         <button onclick="captureImage();">Capture Image</button> <br><br>
>         <div id="videocontent">void</div>
>         <div id="videocontent2">void</div>
>         <div id="imagecontent">void</div>
>         <div id="imagecontent2">void</div>
>     </body>
> </html>
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CB-248) captureVideo() on iOS doesnt seem to save to the device's photoalbum like captureImage() does

Posted by "Filipe Cruz (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CB-248?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13205703#comment-13205703 ] 

Filipe Cruz commented on CB-248:
--------------------------------

why not have a boolean option parameter to control this? and document as platform quirks where it does work and does not.

always better to have more features available then less imho.
with this design you're forcing devs to open another can of worms: figuring out how to handle file access to photoalbum on all platforms.
i find it abit odd design.

in the case of image it isnt as problematic to "close down" the save to disk. since you can get it via getPicture() anyways. but getPicture() isnt very friendly for videos, it only allows to pick one video from photoalbum, not take new one on the fly. whilst for pictures it does allow to take and store or pick new pictures at will.
                
> captureVideo() on iOS doesnt seem to save to the device's photoalbum like captureImage() does
> ---------------------------------------------------------------------------------------------
>
>                 Key: CB-248
>                 URL: https://issues.apache.org/jira/browse/CB-248
>             Project: Apache Callback
>          Issue Type: Bug
>          Components: iOS
>    Affects Versions: 1.4.0
>         Environment: tested on iOS only
>            Reporter: Filipe Cruz
>            Assignee: Becky Gibson
>              Labels: capture, documentation, video
>
> calling navigator.device.capture.captureImage() the local path to a temporary location is retrieved and the image is saved to the device's photoalbum.
> calling navigator.device.capture.captureVideo() only the local path to a temporary location is retrieved, the video is not saved to the device's photoalbum.
> I also tested camera.getPicture() but the capturing functionality of that funciton only works for images. So there is no working solution to capture video to device photoalbum using callback-phonegap.
> Also, documentation of 
> http://docs.phonegap.com/en/1.4.1/phonegap_camera_camera.md.html#cameraOptions_options
> is wrong. 'MediaType' should be 'mediaType'
> Test case below
> {code}
> <!DOCTYPE html>
> <html>
>   <head>
>     <title>Capture Video</title>
>     <script type="text/javascript" charset="utf-8" src="phonegap.js"></script>
>     <script type="text/javascript" charset="utf-8">
>     function captureVideoSuccess(mediaFiles) {
>         document.getElementById('videocontent').innerHTML = mediaFiles[0].fullPath;
>         document.getElementById('videocontent2').innerHTML = '<video controls=true><source src="'+mediaFiles[0].fullPath+'"></video>';
>     }
>     
>     function captureImageSuccess(mediaFiles) {
>         document.getElementById('imagecontent').innerHTML = mediaFiles[0].fullPath;
>         document.getElementById('imagecontent2').innerHTML = '<img src="'+mediaFiles[0].fullPath+'">';
>     }
>     function captureError(error) {
>         var msg = 'An error occurred during capture: ' + error.code;
>         navigator.notification.alert(msg, null, 'Uh oh!');
>     }
>     function captureVideo() {
>         navigator.device.capture.captureVideo(captureVideoSuccess, captureError);
>     }
>     function captureImage() {
>         navigator.device.capture.captureImage(captureImageSuccess, captureError);
>     }
>     </script>
>     </head>
>     <body>
>         <button onclick="captureVideo();">Capture Video</button> <br><br>
>         <button onclick="captureImage();">Capture Image</button> <br><br>
>         <div id="videocontent">void</div>
>         <div id="videocontent2">void</div>
>         <div id="imagecontent">void</div>
>         <div id="imagecontent2">void</div>
>     </body>
> </html>
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira