搜索插件、代码仓与 APP 分类

插件详情v1.0.3

vimeo_video_player

一个用于通过视频 ID 播放 Vimeo 视频的 Flutter 包。使用 InAppWebView 实现流畅的视频播放,直接在您的 Flutter 应用中进行。

AndroidiOSWebmacOSWindows
近 30 天下载
1.1万
喜欢数
81
Pub 分数
140

安装插件

flutter pub add vimeo_video_player

插件介绍

基于插件公开信息、社区数据与项目使用情况整理的选型参考。

vimeo_video_player 包允许在 Flutter 应用中使用视频 ID 实现 Vimeo 视频的无缝播放。基于 InAppWebView 构建,它可在 Android、iOS、Web、macOS 和 Windows 上提供流畅的嵌入式视频体验。该包通过内部处理身份验证和流媒体逻辑,简化了集成过程,使开发者能够专注于 UI 和用户体验。它支持响应式设计,并通过网页视图界面提供基本的播放控制。

适合场景

  • 在移动应用中嵌入Vimeo视频
  • 在教育类应用程序中集成视频内容
  • 在电子商务应用中展示产品演示
  • 流媒体教程或培训视频
  • 在应用程序界面中添加视频背景

主要特点

  • 通过视频ID播放Vimeo视频
  • 使用 InAppWebView 实现可靠的播放
  • 跨平台支持(Android、iOS、Web、macOS、Windows)
  • 简单集成,设置最少
  • 响应式视频渲染
  • 通过网页视图内置播放控制

适合对象

  • 开发媒体丰富的 Flutter 应用的开发者
  • 教育或教程导向的应用程序
  • 带有视频内容的电子商务平台
  • 需要从 Vimeo 嵌入视频的应用程序

使用建议

  • 依赖 InAppWebView,这可能会影响低端设备上的性能
  • 视频流媒体需要互联网连接
  • 对播放器UI的自定义仅限于网页视图
  • 某些平台可能需要额外的权限
  • 取决于Vimeo API的可用性和稳定性

原始 README

以下为关联源码仓库的 README 原文快照,最新内容请访问源码仓库。

vimeo_video_player

Flutter Website Dart Website MIT License

A Flutter package to play Vimeo videos using their Video ID. Utilizes InAppWebView for smooth video playback directly in your Flutter app.

Key Features

  • Easy way to play vimeo video in flutter app.
  • Supports customizable controls like isAutoPlay, isLooping, isMuted, showTitle, showByline, showControls, enableDNT, backgroundColor.
  • Event callbacks include onReady, onPlay, onPause, onFinish, onSeek, onInAppWebViewCreated, onInAppWebViewLoadStart, onInAppWebViewLoadStop, and onInAppWebViewReceivedError.

Preview

vimeo_video_player

Basic Usage

Import it to your project file

import 'package:vimeo_video_player/vimeo_video_player.dart';

And add it in its most basic form like it:

@override
Widget build(BuildContext context) {
  return VimeoVideoPlayer(
    videoId: '12860646',
  );
}
Required parameters of VimeoVideoPlayer

Parameter Description
String videoId Defines the vimeo video ID to be played, it is required and cannot be empty
Optional parameters of VimeoVideoPlayer with Default value

Parameter Default Description
bool isAutoPlay false Used to auto-play the video once initialized
bool isLooping false Used to play the video in a loop after it ends
bool isMuted false Used to play the video with the sound muted
bool showTitle false Used to display the video title
bool showByline false Used to display the video byline/author
bool showControls true Used to display the video playback controls
bool enableDNT true Used to enable Do Not Track (DNT) mode, When enabled, the player will not track any viewing information
bool portrait false Used to display the profile avatar
bool badge false Used to display the vimeo logo
bool enableFullScreenOnPlay false Used to enable fullscreen mode when playing. When enabled, the player go full screen when play is hit
Color backgroundColor Colors.black Defines the background color of the InAppWebView
Optional parameters of VimeoVideoPlayer

Parameter Description
String? privacyHash Used to define the the hash for the unlisted vimeo video
VoidCallback? onReady Used to define a callback function triggered when the player is ready to play the video
VoidCallback? onPlay Used to define a callback function triggered when the video begins playing
VoidCallback? onPause Used to define a callback function triggered when the video is paused
VoidCallback? onFinish Used to define a callback function triggered when the video playback finishes
VoidCallback? onSeek Used to define a callback function triggered when the video playback position is modified
Function(InAppWebViewController controller)? onInAppWebViewCreated Used to define a callback function triggered when the WebView is created
Function(InAppWebViewController controller, WebUri? uri)? onInAppWebViewLoadStart Used to define a callback function triggered when the WebView starts to load an url
Function(InAppWebViewController controller, WebUri? uri)? onInAppWebViewLoadStop Used to define a callback function triggered when the WebView finishes loading an url
Function(InAppWebViewController controller, WebResourceRequest request, WebResourceError? error)? onInAppWebViewReceivedError Used to define a callback function triggered when the WebView encounters an error loading a request
final void Function(InAppWebViewController controller)? onEnterFullscreen Used to define a callback function triggered when the WebView enters full screen
final void Function(InAppWebViewController controller)? onExitFullscreen Used to define a callback function triggered when the WebView exits full screen
final ValueChanged? currentPositionInSeconds Used to define a callback function that notifies current video position
int? initialPositionInSeconds Used to define the initial video position in seconds

Dependencies

Guideline for contributors

  • Contribution towards our repository is always welcome, we request contributors to create a pull request for development.

Guideline to report an issue/feature request

It would be great for us if the reporter can share the below things to understand the root cause of the issue.

  • Library version
  • Code snippet
  • Logs if applicable
  • Device specification like (Manufacturer, OS version, etc)
  • Screenshot/video with steps to reproduce the issue
  • Library used

LICENSE!

vimeo_video_player is MIT-licensed.

Let us know!

We’d be really happy if you send us links to your projects where you use our open-source libraries. Just send an email to [sales@mindinventory.com](mailto:sales@mindinventory.com) And do let us know if you have any questions or suggestion regarding our work.

Visit our website mindinventory.com

Let us know if you are interested to building Apps or Designing Products.

flutter app development

所属分类

依赖

依赖清单 2 项

源码仓库

使用此插件的项目