パッケージ、リポジトリ、アプリカテゴリを検索

pip_flutter のカバー
パッケージ詳細v0.0.3

pip_flutter

Android用の新しいFlutterピクチャインピクチャパッケージ。アプリがフォアグラウンドで実行されている間も、アプリは終了しません。

30日間ダウンロード
93
いいね数
60
Pub ポイント
60

パッケージをインストール

flutter pub add pip_flutter

パッケージ概要

公開情報に基づく選定ガイドです。参考としてご利用ください。

pip_flutter は、Android でピクチャインピクチャ(PiP)機能を有効にする Flutter パッケージです。アプリが最小化されたり他のアプリに切り替えられても、小さな浮遊ウィンドウで継続して実行できます。アプリがフォアグラウンドでアクティブなままになり、終了されないことを保証し、メディア再生や継続的なタスクのユーザー体験を向上させます。このパッケージは Android の PiP モードとシームレスに統合されており、ビデオプレーヤー、ライブストリーム、または継続的なバックグラウンド操作が必要なアプリに最適です。簡単なセットアップ手順により基本的な構成が可能です。

用途

  • バックグラウンドでの動画再生
  • ライブストリーミングアプリケーション
  • 継続的なタスクモニタリング
  • マルチタスクユーザーのワークフロー
  • 背景オーディオと視覚フィードバック

主な機能

  • Android専用のPiPサポート
  • アプリはバックグラウンドでアクティブのままになります
  • 最小限のセットアップが必要
  • 他のアプリの上に浮かぶ
  • アプリを最小化しても動作します

適している対象

  • メディアアプリ
  • 教育ツール
  • リモート監視アプリ
  • 生産性アプリ
  • 永続的なUIを必要とするアプリ

注意事項

  • Androidプラットフォームに限定
  • Android 8.0以降が必要
  • iOS 対応なし
  • 適切なマニフェスト設定が必要です
  • 追加の権限が必要になる場合があります

元の README

関連するソースリポジトリの README 原文のスナップショットです。最新の内容はリポジトリをご覧ください。

pip_flutter

A Flutter plugin for Android and ios for make video in picture in picture mode.


Picture in Picture Mode Flutter



Picture in Picture Mode Disable Picture in Picture Mode

A flutter package pip flutter which will help to put your video in pip mode.

Features 💚

  • Put your video in Picture in Picture mode.
  • Also mute sound and play and pause the video.
  • Make video in full screen mode,set play back speed of video

Installation

First, add pip_flutter as a dependency in your pubspec.yaml file.

Android

Add below permission in your AndroidManifest.xml file ,also specified picture in picture mode in your activity tag and add foreground service for when app is not in background that time app not kill and running in foregorund and also add update code of MainActivity.kt and add PipFlutterPlayerService.

    <uses-permission android:name="android.permission.INTERNET"/>
    <uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
    
    <activity
            android:name=".MainActivity"
            android:supportsPictureInPicture="true"
            android:launchMode="singleTop"
            android:theme="@style/LaunchTheme"
            android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
            android:hardwareAccelerated="true"
            android:windowSoftInputMode="adjustResize"
            android:exported="true"/>
            
    <service
           android:name=".PipFlutterPlayerService"
           android:stopWithTask="false" />

IOS

In Xcode of your project set ios deployment info 11.0 and set in below code in your Info.plist file.

<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
</dict>
<key>NSBonjourServices</key>
<array>
<string>_dartobservatory._tcp</string>
</array>
<key>UIBackgroundModes</key>
<array>
<string>audio</string>
<string>processing</string>
<string>remote-notification</string>
</array>

How to use

  • PipFlutterPlayerConfiguration : Put this class for your video configuration.
PipFlutterPlayerConfiguration pipFlutterPlayerConfiguration =
const PipFlutterPlayerConfiguration(
  aspectRatio: 16 / 9,
  fit: BoxFit.contain,
);
  • PipFlutterPlayerDataSource : Put this class for declare your video type url and url.
PipFlutterPlayerDataSource dataSource = PipFlutterPlayerDataSource(
  PipFlutterPlayerDataSourceType.network,
  'http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4',
);
  • PipFlutterPlayer :
PipFlutterPlayer(
controller: pipFlutterPlayerController,
key: pipFlutterPlayerKey,
),
  • Make your video in Pip mode put this code on your onTap.
pipFlutterPlayerController.enablePictureInPicture(pipFlutterPlayerKey);
  • And make your video in disable mode put this code on your onTap.
pipFlutterPlayerController.disablePictureInPicture();

Run the example app in the exmaple folder to find out more about how to use it.

カテゴリー

依存関係

依存関係一覧 7 件

ソースリポジトリ

このパッケージを使用しているプロジェクト

データはまだありません。