Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-26127] Android: Video Quality undefined

GitHub Issuen/a
TypeBug
PriorityCritical
StatusClosed
ResolutionFixed
Resolution Date2018-08-24T01:37:59.000+0000
Affected Version/sRelease 7.1.1
Fix Version/sRelease 7.5.0
ComponentsAndroid
Labelsandroid, camera, media
Reportersaid chaouche
AssigneeYordan Banev
Created2018-06-10T10:28:59.000+0000
Updated2018-08-24T01:38:02.000+0000

Description

Can't changer the quality of media camera because Titanium media video qualities is undefined {quote} Ti.API.info("Titanium.Media.QUALITY_HIGH " + Titanium.Media.QUALITY_HIGH); Ti.API.info("Titanium.Media.QUALITY_MEDIUM " + Titanium.Media.QUALITY_MEDIUM); Ti.API.info("Titanium.Media.QUALITY_LOW " + Titanium.Media.QUALITY_LOW); Ti.API.info("Titanium.Media.QUALITY_640x480 " + Titanium.Media.QUALITY_640x480); Ti.API.info("Titanium.Media.QUALITY_IFRAME_960x540 " + Titanium.Media.QUALITY_IFRAME_960x540); Ti.API.info("Titanium.Media.QUALITY_IFRAME_1280x720 " + Titanium.Media.QUALITY_IFRAME_1280x720);{quote} Logs ==> 06-10 10:20:45.406 30754 30754 I TiAPI : Titanium.Media.QUALITY_HIGH undefined 06-10 10:20:45.406 30754 30754 I TiAPI : Titanium.Media.QUALITY_MEDIUM undefined 06-10 10:20:45.406 30754 30754 I TiAPI : Titanium.Media.QUALITY_LOW undefined 06-10 10:20:45.406 30754 30754 I TiAPI : Titanium.Media.QUALITY_640x480 undefined 06-10 10:20:45.406 30754 30754 I TiAPI : Titanium.Media.QUALITY_IFRAME_960x540 undefined 06-10 10:20:45.406 30754 30754 I TiAPI : Titanium.Media.QUALITY_IFRAME_1280x720 undefined

Comments

  1. Hans Knöchel 2018-06-10

    As of the official docs, the QUALITY_* constants are iOS only, see [QUALITY_HIGH](https://docs.appcelerator.com/platform/latest/#!/api/Titanium.Media-property-QUALITY_HIGH) for reference.
  2. said chaouche 2018-06-13

    But in official doc is not precise here see [videoQuality](https://docs.appcelerator.com/platform/latest/#!/api/CameraOptionsType-property-videoQuality)
  3. Hans Knöchel 2018-06-13

    You are right! And looking into the code, they should also be there. It was added in TIMOB-2122 in 5.4.0. Reopening to be validated. [~ybanev] Valid constants are VIDEO_QUALITY_HIGH and VIDEO_QUALITY_LOW on Android, which should also be changed in the docs. Also: It seems like the underlaying native CamcorderProfile Android API also allows a few more constants that could be exposed for parity, see the [native docs](https://developer.android.com/reference/android/media/CamcorderProfile) for reference.
  4. Yordan Banev 2018-06-13

    PR: https://github.com/appcelerator/titanium_mobile/pull/10106
  5. Samir Mohammed 2018-07-19

    *Closing ticket*, Verified fix in SDK Version: 7.4.0.v20180717131401 *FR Passed (Test Steps):*

    Created a titanium Application

    Added the following code in to the app.js

       Ti.API.info("Titanium.Media.QUALITY_HIGH " + Titanium.Media.QUALITY_HIGH);
       Ti.API.info("Titanium.Media.QUALITY_MEDIUM " + Titanium.Media.QUALITY_MEDIUM);
       Ti.API.info("Titanium.Media.QUALITY_LOW " + Titanium.Media.QUALITY_LOW);
       Ti.API.info("Titanium.Media.QUALITY_640x480 " + Titanium.Media.QUALITY_640x480);
       Ti.API.info("Titanium.Media.QUALITY_IFRAME_960x540 " + Titanium.Media.QUALITY_IFRAME_960x540);
       Ti.API.info("Titanium.Media.QUALITY_IFRAME_1280x720 " + Titanium.Media.QUALITY_IFRAME_1280x720);
       

    Ran the program

    Able to see the following

       [INFO] :   Titanium.Media.QUALITY_HIGH 1
       [INFO] :   Titanium.Media.QUALITY_MEDIUM undefined
       [INFO] :   Titanium.Media.QUALITY_LOW 0
       [INFO] :   Titanium.Media.QUALITY_640x480 4
       [INFO] :   Titanium.Media.QUALITY_IFRAME_960x540 undefined
       [INFO] :   Titanium.Media.QUALITY_IFRAME_1280x720 5
       
    *Note:* For Titanium.Media.QUALITY_MEDIUM and Titanium.Media.QUALITY_IFRAME_960x540 do not have a direct Android counterpart, so return value undefined is expected as mentioned in the PR: https://github.com/appcelerator/titanium_mobile/pull/10106 *Test Environment*
       APPC Studio: 5.0.0.201712081732
       APPC CLI: 7.0.4
       Nexus 6p Emulator (8.0)
       Operating System Name: Mac OS High Sierra
       Operating System Version: 10.13
       Node.js Version: 8.9.1
       Xcode 9.2
       

JSON Source