@erikd234/react-native-youtube-iframe-parrot

中文文档
1.1.0发布于 2025/09/21MITTypeScriptCommonJS近 30 天下载 1.8万

A simple wrapper around the youtube iframe js API for react native (erikd234 fork)

原始使用文档
文档目录5 节
  1. Installation
  2. Usage
  3. Documentation
  4. Contributing
  5. License

React Native Youtube iframe (Parrot Fork)

npm npm

A wrapper of the Youtube IFrame player API build for react native.

This is a fork of the original react-native-youtube-iframe package by Ananthu P Kanive.

  • ✅ Works seamlessly on both ios and android platforms
  • ✅ Does not rely on the native youtube service on android (prevents unexpected crashes, works on phones without the youtube app)
  • ✅ Uses the webview player which is known to be more stable compared to the native youtube app
  • ✅ Access to a vast API provided through the iframe youtube API
  • ✅ Supports multiple youtube player instances in a single page
  • ✅ Fetch basic video metadata without API keys (uses oEmbed)
  • ✅ Works on modals and overlay components
  • ✅ Expo support

ios

Installation

Install the package using npm or yarn:

npm install @erikd234/react-native-youtube-iframe-parrot
# or
yarn add @erikd234/react-native-youtube-iframe-parrot

Usage

The API is identical to the original package:

import YoutubeIframe from '@erikd234/react-native-youtube-iframe-parrot';

// Use it the same way as the original package
<YoutubeIframe height={200} play={playing} videoId={'iee2TATGMyI'} />;

Documentation

For detailed usage instructions, refer to the original documentation: react-native-youtube-iframe

Contributing

Pull requests are welcome!

Read the contributing guide for project setup and other info

License

MIT

版本与发布记录

@erikd234/react-native-youtube-iframe-parrot 共发布 2 个版本,首次发布于 2025/09/21;过去 12 个月发布了 0 个版本。

版本发布日期距今
1.1.0latest2025/09/211.1 年前
1.0.02025/09/211.1 年前

关于 @erikd234/react-native-youtube-iframe-parrot 的常见问题

@erikd234/react-native-youtube-iframe-parrot 是什么?

A simple wrapper around the youtube iframe js API for react native (erikd234 fork)

如何安装 @erikd234/react-native-youtube-iframe-parrot?

在项目目录运行 npm install @erikd234/react-native-youtube-iframe-parrot,或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖:react(>=16.8.6)、react-native(>=0.60)。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖,Yarn 需要手动安装。

@erikd234/react-native-youtube-iframe-parrot 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@erikd234/react-native-youtube-iframe-parrot 支持 ESM 还是 CommonJS?

以 CommonJS 形式发布,可以直接 require();在 ES Module 项目中也可以用 import 引入(Node.js 会把 module.exports 作为默认导出)。

@erikd234/react-native-youtube-iframe-parrot 可以商用吗?

@erikd234/react-native-youtube-iframe-parrot 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@erikd234/react-native-youtube-iframe-parrot 的下载量有多少?

根据 npm 官方下载统计,@erikd234/react-native-youtube-iframe-parrot 在 2026/10/14 – 2026/11/12 这 30 天内被下载 18,489 次,日均约 616 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@erikd234/react-native-youtube-iframe-parrot 还在维护吗?

最新版本 1.1.0 发布于 2025/09/21(1.1 年前);至今共发布 2 个版本,其中过去 12 个月发布了 0 个;首次发布于 2025/09/21。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。