Files
EMI-ExpoAPP/components/VimeoPlayer.js
T
2022-03-08 21:54:40 -08:00

31 lines
634 B
JavaScript

import React from 'react';
import { string, func } from 'prop-types';
import WebView from 'react-native-autoheight-webview';
const VimeoPlayer = ({ videoId, onError }) => {
return (
<WebView
style={style}
onError={onError}
allowsFullscreenVideo
scrollEnabled={false}
height={200}
source={{
uri: `https://player.vimeo.com/video/${videoId}?h=489fff465c`,
headers: {"Referer":"https://social.emmint.com"}
}}
/>
);
};
export default VimeoPlayer;
const style = {
height: 200,
maxWidth: '100%',
};
VimeoPlayer.propTypes = {
videoId: string,
onError: func,
};