UNPKG

react-native-youtube-iframe

Version:

A simple wrapper around the youtube iframe js API for react native

43 lines (39 loc) 1.55 kB
import React from 'react'; export interface YoutubeIframeProps { /** * height of the webview container * * Note: Embedded players must have a viewport that is at least 200px by 200px. If the player displays controls, it must be large enough to fully display the controls without shrinking the viewport below the minimum size. We recommend 16:9 players be at least 480 pixels wide and 270 pixels tall. */ height: Number; /** * width of the webview container * * Note: Embedded players must have a viewport that is at least 200px by 200px. If the player displays controls, it must be large enough to fully display the controls without shrinking the viewport below the minimum size. We recommend 16:9 players be at least 480 pixels wide and 270 pixels tall. */ width?: Number; /** * Specifies the YouTube Video ID of the video to be played. */ videoId: String; /** * Specifies the playlist to play. It can be either the playlist ID or a list of video IDs */ playList: Array<String> | String; play: Boolean = false; mute: Boolean = false; volume: Number = 100; // webViewStyle, // webViewProps, // playbackRate = 1, // onError = _err => {}, // onReady = _event => {}, // playListStartIndex = 0, // initialPlayerParams = {}, // forceAndroidAutoplay = false, // onChangeState = _event => {}, // onPlaybackQualityChange = _quality => {}, // onPlaybackRateChange = _playbackRate => {}, } declare const YoutubeIframe: React.SFC<YoutubeIframeProps>; export default YoutubeIframe;