pip_flutter
kesmitopiwala/pip_flutter open-source repository details.
- 스타
- 15
- 포크
- 39
- 최근 푸시(UTC)
- 2023. 5. 9.
- 프로젝트 상태
- 활성
원본 README
아래는 영문 원문 스냅샷입니다. 최신 내용은 GitHub에서 확인하세요.
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.
사용 중인 의존성
의존성 목록 10 개
- flutter
{"sdk":"flutter"} - wakelock
^0.5.6 - visibility_detector
^0.2.0 - xml
^5.3.0 - pedantic
^1.11.1 - flutter_widget_from_html_core
^0.8.2 - path_provider
^2.0.5 - collection
^1.15.0 - flutter_test개발 의존성
{"sdk":"flutter"} - flutter_lints개발 의존성
^1.0.0
프로젝트에 맞는 저장소를 선택하려면?
사용 목적에 따라 검색하고 개발 활동을 비교한 뒤 원본 저장소에서 요구 사항을 확인하세요.
- 이름, 작성자 또는 설명으로 검색하고 기술 주제로 범위를 좁힙니다.
- 스타, 포크, 최근 푸시를 함께 비교하세요. 스타는 관심의 지표이며 품질을 보장하지 않습니다.
- 사용하기 전에 GitHub에서 README, 라이선스, Issues를 확인하세요.
출처 및 관리
“A repository is the most basic element of GitHub.”
GitHub Docs — About repositories ↗


