Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
it('should has values', () => {
(FilterType.NONE: '');
(FilterType.INVERT: 'CIColorInvert');
(FilterType.MONOCHROME: 'CIColorMonochrome');
(FilterType.POSTERIZE: 'CIColorPosterize');
(FilterType.FALSE: 'CIFalseColor');
(FilterType.MAXIMUMCOMPONENT: 'CIMaximumComponent');
(FilterType.MINIMUMCOMPONENT: 'CIMinimumComponent');
(FilterType.CHROME: 'CIPhotoEffectChrome');
(FilterType.FADE: 'CIPhotoEffectFade');
(FilterType.INSTANT: 'CIPhotoEffectInstant');
(FilterType.MONO: 'CIPhotoEffectMono');
(FilterType.NOIR: 'CIPhotoEffectNoir');
(FilterType.PROCESS: 'CIPhotoEffectProcess');
(FilterType.TONAL: 'CIPhotoEffectTonal');
(FilterType.TRANSFER: 'CIPhotoEffectTransfer');
(FilterType.SEPIA: 'CISepiaTone');
});
this.onProgress = this.onProgress.bind(this);
this.onBuffer = this.onBuffer.bind(this);
}
state = {
rate: 1,
volume: 1,
muted: false,
resizeMode: 'contain',
duration: 0.0,
currentTime: 0.0,
controls: false,
paused: true,
skin: 'custom',
ignoreSilentSwitch: null,
isBuffering: false,
filter: FilterType.NONE,
filterEnabled: true
};
onLoad(data) {
console.log('On load fired!');
this.setState({duration: data.duration});
}
onProgress(data) {
this.setState({currentTime: data.currentTime});
}
onBuffer({ isBuffering }: { isBuffering: boolean }) {
this.setState({ isBuffering });
}
} from 'react';
import {
AlertIOS,
AppRegistry,
Platform,
StyleSheet,
Text,
TouchableOpacity,
View,
} from 'react-native';
import Video,{FilterType} from 'react-native-video';
const filterTypes = [
FilterType.NONE,
FilterType.INVERT,
FilterType.MONOCHROME,
FilterType.POSTERIZE,
FilterType.FALSE,
FilterType.MAXIMUMCOMPONENT,
FilterType.MINIMUMCOMPONENT,
FilterType.CHROME,
FilterType.FADE,
FilterType.INSTANT,
FilterType.MONO,
FilterType.NOIR,
FilterType.PROCESS,
FilterType.TONAL,
FilterType.TRANSFER,
FilterType.SEPIA
];