use of com.bixly.pastevid.models.VideoFileItem in project screenbird by adamhub.
the class Recorder method restoreVideoState.
/**
* Restores previous recording based on saved video and audio data.
*/
public void restoreVideoState() {
VideoFileItem videoFileItem;
ArrayList<AudioFileItem> audioFileItems;
this.createGeneralDirectory();
if (FileUtil.previousVideoExists(Recorder.VIDEO_DATA)) {
videoFileItem = (VideoFileItem) FileUtil.readObjectDataFromFile(Recorder.VIDEO_DATA);
videoRecorder.restoreVideoFileItem(videoFileItem);
// Restore audio only if it has accompanying video
if (FileUtil.previousVideoExists(Recorder.AUDIO_DATA)) {
audioFileItems = (ArrayList) FileUtil.readObjectDataFromFile(Recorder.AUDIO_DATA);
audioRecorder.setAudioFiles(audioFileItems);
}
}
}
Aggregations