Feed showing posts

This commit is contained in:
aeroreyna
2022-03-05 23:51:26 -08:00
parent 195e8f11ef
commit 352871786b
9 changed files with 259 additions and 9762 deletions

37
components/VimeoPlayer.js Normal file
View File

@@ -0,0 +1,37 @@
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}
automaticallyAdjustContentInsets
source={{
html: `
<html>
<body>
<iframe src="https://player.vimeo.com/video/${videoId}" width="100%" height="200px" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>
<script src="https://player.vimeo.com/api/player.js"></script>
</body>
</html>
`,
}}
/>
);
};
export default VimeoPlayer;
const style = {
height: 200,
maxWidth: '100%',
};
VimeoPlayer.propTypes = {
videoId: string,
onError: func,
};