0.1.0 • Published 6 years ago
react-native-simple-youtube-player v0.1.0
react-native-simple-youtube-player
A <YouTubePlayer /> for React Native, without SDK or API dependencies.
🚀 Getting Started
Using npm:
yarn add react-native-simple-youtube-playerUsing yarn:
yarn add react-native-simple-youtube-player✍️ Example
The <SimpleYouTubePlayer/> exported by this library is trivial to get started with; after all, it is just a <WebView/>. Just define the videoId of the content you wish to render, and the style of your <WebView/>, and away you go!
import React from 'react';
import { WebView } from 'react-native';
import SimpleYouTubePlayer from 'react-native-simple-youtube-player';
export default () => (
<SimpleYouTubePlayer
style={{ flex: 1 }}
WebView={WebView}
videoId="BxYsnSnV6cQ"
/>
);