cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CB-10369) Added getVideo() feature with thumbnail creation
Date Sat, 13 Feb 2016 15:24:18 GMT

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

ASF GitHub Bot commented on CB-10369:
-------------------------------------

GitHub user TanaseButcaru opened a pull request:

    https://github.com/apache/cordova-plugin-camera/pull/168

    CB-10369: Added getVideo() feature with thumbnail creation (readded)

    I've implemented the `getVideo` function for cordova-plugin-camera which gives the user
the ability to record a video with default camera app.
    
    You can create a sample cordova app and copy the www files from `samples/android/www_getVideo`
and run an interactive test of this feature with all the options, as follows:
     *          `quality`: points to `Camera.VideoQuality`,
     *          `sourceType`: points to `Camera.VideoSourceType`,
     *          `encodingType`: points to `Camera.VideoEncodingType`,
     *          `mediaType`: points to `Camera.MediaType`,
     *          `mediaThumbnail`: points to `Camera.MediaThumbnail`,
     *          `mediaDurationLimit`: numeric value, 0 = disabled
     *          `mediaSizeLimit`: numeric value, 0 = disabled  
    
    ... where:
    ```js
    VideoEncodingType:{
        /** Return 3GP encoded video */
        GPP: 2,
        /** Return MP4 encoded video */
        MP4: 3,
        /** Return WEBM encoded video */
        WEBM: 4,
        /** Return MKV encoded video */
        MKV: 5
      },
    
    MediaThumbnail:{
        /** Media thumbnail disabled */
        NONE: 0,
        /** Creates a thumbnail of 512x384 px */
        MINI_KIND: 1,
        /** Creates a thumbnail of 96x96 px */
        MICRO_KIND: 2
     },
    
    VideoSourceType:{
        /** Choose video from video library */
        VIDEOLIBRARY : 0,
        /** Take video from camera */
        CAMERA : 1
      },
    
    VideoQuality:{
        /**  Low quality, suitable for MMS messages */
        LOW : 0,
        /** High quality */
        HIGH: 1
      },
    ```
    I always thought that this plugin would launch the camera app in recording mode if `sourceType`
set to CAMERA and `mediaType` set to VIDEO, but when I needed this I found that it's not implemented,
so I made it myself.
    
    I'm just a web dev, not a software developer, but I managed to get it done; this is my
first contribution to a cordova plugin with native code, so there might be things that are
not written well or missing checks. I'm open to suggestions and contributions for this.
    Android only for the moment. If there's someone that can port this to iOS would be much
appreciated, but in the meantime, I'll try my luck with that too.
    
    Tested with two real devices: Sony Xperia Z3 Compact (5.1.1) and Sony Xperia Sola (unofficial
4.4.4)
    Here are two screenshots with the interactive sample:
    
    ![1](https://cloud.githubusercontent.com/assets/5818117/12372196/2ac9ecb4-bc58-11e5-96d9-d24221da5a2c.png)
    ![2](https://cloud.githubusercontent.com/assets/5818117/12372197/2ad31c30-bc58-11e5-9917-2906ec6ab660.png)


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

    $ git pull https://github.com/TanaseButcaru/cordova-plugin-camera-unofficial CB-10369

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

    https://github.com/apache/cordova-plugin-camera/pull/168.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 #168
    
----
commit 6fcf212ceeb89c049c046aa937c735fe62cff50b
Author: TanaseButcaru <contact@butcaru.com>
Date:   2016-01-14T22:22:11Z

    getVideo() support

commit 6fd443eca382204bdda70683dbc49c9db6f2b7c1
Author: TanaseButcaru <contact@butcaru.com>
Date:   2016-01-15T21:41:14Z

    getVideo() update + mediaThumbnail

commit 5e347284d70a7e25a16a91350508e8da2e103ec6
Author: TanaseButcaru <contact@butcaru.com>
Date:   2016-01-15T21:49:36Z

    getVideo() fix module already defined error

commit 6c6bfae57239f123b7bfffabcdffae1c15993d81
Author: TanaseButcaru <contact@butcaru.com>
Date:   2016-01-16T11:17:53Z

    getVideo(), createMediaThumbnail, descriptions, full sample

commit 11cef088e50858c4b8ce5c6d4a2b17051b26f47b
Author: TanaseButcaru <contact@butcaru.com>
Date:   2016-01-16T11:53:57Z

    add description to MediaThumbnail options

commit 8fa7aa19af38bf3f5071504672ee4babe5f9a9bd
Author: Tanase Butcaru <tanasebutcaru@users.noreply.github.com>
Date:   2016-01-17T16:01:13Z

    Merge pull request #1 from apache/master
    
    Sync with apache/cordova-plugin-camera

commit 2b5f25b933d31413609959e9a859f92a3c8fe244
Author: TanaseButcaru <contact@butcaru.com>
Date:   2016-02-04T21:00:40Z

    Merge branch 'master' of https://github.com/apache/cordova-plugin-camera

----


> Added getVideo() feature with thumbnail creation
> ------------------------------------------------
>
>                 Key: CB-10369
>                 URL: https://issues.apache.org/jira/browse/CB-10369
>             Project: Apache Cordova
>          Issue Type: New Feature
>          Components: Plugin Camera
>            Reporter: Tanase Butcaru
>              Labels: Android, features
>
> I've implemented the +getVideo()+ function for cordova-plugin-camera which gives the
user the ability to record a video with default camera app.
> Optionally, this feature can create a thumbnail for the recorded video.
> Full description and PR can be found in the external issue URL.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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


Mime
View raw message