All Projects → insidegui → Pipcontainer

insidegui / Pipcontainer

Licence: bsd-2-clause
An easy to use interface for picture-in-picture on macOS 10.12 and later

Programming Languages

swift
15916 projects

Labels

Projects that are alternatives of or similar to Pipcontainer

Bootstrapper
Bootstrap Python projects or libraries with virtualenv and pip
Stars: ✭ 10 (-90.83%)
Mutual labels:  pip
React Native Ezplayer
EZPlayer component for react-native apps
Stars: ✭ 47 (-56.88%)
Mutual labels:  pip
Micropipenv
A lightweight wrapper for pip to support requirements.txt, Pipenv and Poetry lock files or converting them to pip-tools compatible output. Designed for containerized Python applications but not limited to them.
Stars: ✭ 72 (-33.94%)
Mutual labels:  pip
Simple Sh Datascience
A collection of Bash scripts and Dockerfiles to install data science Tool, Lib and application
Stars: ✭ 32 (-70.64%)
Mutual labels:  pip
Art
🎨 ASCII art library for Python
Stars: ✭ 1,026 (+841.28%)
Mutual labels:  pip
Rules python external
Bazel rules to resolve and fetch artifacts transitively from the Python Package Index (PyPI)
Stars: ✭ 60 (-44.95%)
Mutual labels:  pip
Serverless Python Requirements
⚡️🐍📦 Serverless plugin to bundle Python packages
Stars: ✭ 838 (+668.81%)
Mutual labels:  pip
Django Currentuser
Conveniently store reference to request user on thread/db level.
Stars: ✭ 83 (-23.85%)
Mutual labels:  pip
Pip Gui
A GUI based Python Package installer
Stars: ✭ 46 (-57.8%)
Mutual labels:  pip
Django Webpacker
A django compressor tool that bundles css, js files to a single css, js file with webpack and updates your html files with respective css, js file path.
Stars: ✭ 69 (-36.7%)
Mutual labels:  pip
Python Pixabay
Python 3 Pixabay's API wrapper.
Stars: ✭ 32 (-70.64%)
Mutual labels:  pip
Gradient Centralization Tensorflow
Instantly improve your training performance of TensorFlow models with just 2 lines of code!
Stars: ✭ 45 (-58.72%)
Mutual labels:  pip
Hermetica
📖Hermetica is scaffold tools, and wiki to implement better flask applications.
Stars: ✭ 66 (-39.45%)
Mutual labels:  pip
Video To Ascii
It is a simple python package to play videos in the terminal using characters as pixels
Stars: ✭ 960 (+780.73%)
Mutual labels:  pip
Zazo
Pure Python Dependency Resolution
Stars: ✭ 80 (-26.61%)
Mutual labels:  pip
Mongo schema
Python Package to provide a rough schema for the mongodb collection
Stars: ✭ 8 (-92.66%)
Mutual labels:  pip
Pigar
☕️ A fantastic tool to generate requirements.txt for your Python project, and more than that. (IT IS NOT A PACKAGE MANAGEMENT TOOL)
Stars: ✭ 1,068 (+879.82%)
Mutual labels:  pip
Niftynet
[unmaintained] An open-source convolutional neural networks platform for research in medical image analysis and image-guided therapy
Stars: ✭ 1,276 (+1070.64%)
Mutual labels:  pip
Pymarketstore
Python driver for MarketStore
Stars: ✭ 74 (-32.11%)
Mutual labels:  pip
Socket.io Python Emitter
Python implementation of socket.io-emitter
Stars: ✭ 67 (-38.53%)
Mutual labels:  pip

PIPContainer

Carthage compatible CocoaPods

An NSViewController subclass that can present its child view controller in picture-in-picture mode.

Please note that this project links against PIP.framework, which is private. Don't try to submit apps using this to the App Store.

demo

Integration

Carthage

Add the following line to your Cartfile and follow the integration instructions for Carthage:

github "insidegui/PIPContainer" ~> 1.0

CocoaPods

Add the following line to your Podfile and then run pod install:

pod 'PIPContainer'

Manually

Drag PIPContainer.xcodeproj to your project and add PIPContainer.framework to the Embedded Binaries section.

manual integration

Usage

Containment

The way it works is you add the view controller you want to display in the PiP as a child view controller of PIPContainerViewController. This can all be done using storyboards (see demos).

storyboard containment

Entering and Exiting PiP mode

After you have the correct containment setup, simply call togglePIP on PIPContainerViewController to enter/exit PiP mode.

private var pip: PIPContainerViewController? {
    return parent as? PIPContainerViewController
}
    
func togglePictureInPictureMode() {
    pip?.togglePIP(nil)
}

You can also link UI controls like buttons and menus directly to the togglePIP action in Interface Builder by control-dragging to the First Responder and selecting the action togglePIP:.

Getting notified about PiP commands

PIPContainerViewController has many block properties that you can use to get notifications about state changes.

  • pipDidPause: Called when the pause button is pressed in the PiP panel
  • pipDidPlay: Called when the play button is pressed in the PiP panel
  • pipWillOpen: Called when the PiP panel is about to be opened. This is the best moment to set the isPlaying property of PIPContainerViewController to reflect the state of your player
  • pipWillClose: Called when the PiP panel is about to be closed
  • pipDidClose: Called after the PiP panel is closed and the view controller is back to its original position

Demos

I encourage you to have a look at the demos to get a better understanding of how PIPContainer works:

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].