1.0.3 • Published 1 year ago

react-native-youtube-iframe-player v1.0.3

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

React native youtube iframe player is a youtube iframe that is cloned from the react-native-youtube-iframe library that solves the issue of showing the developer options when pressing on the iframe if using the youtube iframe inside the pressable component.

Support

iOS & Android

Installation

npm install react-native-youtube-iframe-player

Installing dependencies

npm install react-native-vector-icons react-native-youtube-iframe react-native-webview @miblanchard/react-native-slider @react-native-community/netinfo

Note:

You need to make configuration on iOS and Android by following the instruction from the above dependencies libraries.

Usage

import YoutubeIframePlayer from 'react-native-youtube-iframe-player';

// ...

<YoutubeIframePlayer
    videoUrl='https://www.youtube.com/watch?v=f7OPcDX_LyI&t=3s'
    height={210}
    width='100%'
    locale='km'
    durationFontSize={15}
/>

Properties

Basic

PropDefaultTypeOptionalDescription
videoUrl''stringfalseThe URL of the Youtube video
height210numbertrueThe height of the iframe
width'100%'numbertrueThe width of the iframe
locale'km'stringfalseThe locale of the warning message (km or en)
labelSize14numbertrueThe font size of the warning message
playIconSize38numbertrueThe size of the play icon
loadingColor'#000000'stringtrueThe color of the loading indicator
durationFontSize11numbertrueThe font size of the duration and play seconds
isTabletfalsebooleantrueThe device is a tablet or mobile

Note:

The default height is 320dp (tablet), 210dp (mobile), and 190dp (small width mobile)

Custom styles

PropDefaultTypeDescription
containerStyle{...}styleStyle of the main container
playPauseContainerStyle{...}styleStyle of play/pause container

Made with create-react-native-library

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago