fix: Make videoCodec
clearly iOS only
This commit is contained in:
parent
5bbe2bfbab
commit
dd7fc0880e
@ -245,8 +245,11 @@ export class Camera extends React.PureComponent<CameraProps> {
|
||||
* const codecs = await camera.current.getAvailableVideoCodecs("mp4")
|
||||
* ```
|
||||
* @throws {@linkcode CameraRuntimeError} When any kind of error occured while getting available video codecs. Use the {@linkcode ParameterError.code | code} property to get the actual error
|
||||
* @platform iOS
|
||||
*/
|
||||
public async getAvailableVideoCodecs(fileType?: VideoFileType): Promise<CameraVideoCodec[]> {
|
||||
if (Platform.OS !== 'ios') return []; // no video codecs supported on other platforms.
|
||||
|
||||
try {
|
||||
return await CameraModule.getAvailableVideoCodecs(this.handle, fileType);
|
||||
} catch (e) {
|
||||
|
@ -37,6 +37,7 @@ export interface RecordVideoOptions {
|
||||
* To get a list of all available video codecs use the `getAvailableVideoCodecs()` function.
|
||||
*
|
||||
* @default undefined
|
||||
* @platform iOS
|
||||
*/
|
||||
videoCodec?: CameraVideoCodec;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user