import React from 'react' import type { ViewProps } from 'react-native/Libraries/Components/View/ViewPropTypes' import NativeGiphyMediaView, { Commands } from './specs/GiphyMediaViewNativeComponent' import type { GiphyMediaID } from './dto/giphyMedia' import type { GiphyRendition } from './dto/giphyRendition' import type { ResizeMode } from './dto/misc' export interface GiphyMediaViewProps extends ViewProps { autoPlay?: boolean media?: GiphyMediaID renditionType?: GiphyRendition resizeMode?: ResizeMode showCheckeredBackground?: boolean } type ComponentRef = InstanceType export class GiphyMediaView extends React.Component { ref = React.createRef() pause = () => { if (this.ref.current) { Commands.pause(this.ref.current) } } resume = () => { if (this.ref.current) { Commands.resume(this.ref.current) } } render() { const { autoPlay = true, renditionType = 'fixed_width', media, showCheckeredBackground = false, resizeMode = 'cover', ...other } = this.props return ( ) } }