Added audio on/off feature for video recording (#33)
parent
200816ca84
commit
aeb0083352
@ -0,0 +1,42 @@ |
||||
package com.otaliastudios.cameraview; |
||||
|
||||
|
||||
/** |
||||
* Audio values indicate whether to record audio stream when record video. |
||||
* |
||||
* @see CameraView#setAudio(Audio) |
||||
*/ |
||||
public enum Audio { |
||||
|
||||
/** |
||||
* No Audio. |
||||
*/ |
||||
OFF(0), |
||||
|
||||
/** |
||||
* With Audio. |
||||
*/ |
||||
ON(1); |
||||
|
||||
final static Audio DEFAULT = ON; |
||||
|
||||
private int value; |
||||
|
||||
Audio(int value) { |
||||
this.value = value; |
||||
} |
||||
|
||||
int value() { |
||||
return value; |
||||
} |
||||
|
||||
static Audio fromValue(int value) { |
||||
Audio[] list = Audio.values(); |
||||
for (Audio action : list) { |
||||
if (action.value() == value) { |
||||
return action; |
||||
} |
||||
} |
||||
return null; |
||||
} |
||||
} |
Loading…
Reference in new issue