[TIMOB-26127] Android: Video Quality undefined
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Critical |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2018-08-24T01:37:59.000+0000 |
Affected Version/s | Release 7.1.1 |
Fix Version/s | Release 7.5.0 |
Components | Android |
Labels | android, camera, media |
Reporter | said chaouche |
Assignee | Yordan Banev |
Created | 2018-06-10T10:28:59.000+0000 |
Updated | 2018-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
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.
But in official doc is not precise here see [videoQuality](https://docs.appcelerator.com/platform/latest/#!/api/CameraOptionsType-property-videoQuality)
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
andVIDEO_QUALITY_LOW
on Android, which should also be changed in the docs. Also: It seems like the underlaying nativeCamcorderProfile
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.PR: https://github.com/appcelerator/titanium_mobile/pull/10106
*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
Ran the program
Able to see the following
*Note:* For
Titanium.Media.QUALITY_MEDIUM
andTitanium.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*