Giter VIP home page Giter VIP logo

piper's Introduction

PiPer logo

PiPer

PiPer is the browser extension to watch video Picture in Picture.

Install · Donate · Report an issue


Contents

Features

  • Adds a dedicated Picture in Picture button to the video player of supported sites
  • Button integrates seamlessly with the player including hover effects and tooltips
  • Supports closed captions in Picture and Picture mode (Safari only)
  • Supports Safari and Chrome
  • Free and open source

Installation

Safari

Install from the Mac App Store by clicking "Get"
(The Safari Extension Gallery is now deprecated)

Chrome

Install from the Chrome Web Store by clicking "Add to Chrome"

...or live life on the edge with the latest development build (IMPORTANT: these builds do not update automatically!)

Supported sites

Changelog

You can find information about releases here

Development

Building

Prerequisites

  • Operating system
    • macOS: 10.12 Sierra or newer (required to build Safari extension)
    • Windows: Vista or newer using Cygwin
    • Linux: 64-bit Ubuntu 14.04+, Debian 8+, openSUSE 13.3+, or Fedora Linux 24+
  • Software

Build tools

The following build tools are used to build the extension:

These can be installed by executing the following command:

npm install -g csso-cli svgo xar-js google-closure-compiler

Steps

  1. Clone the repository
  2. Run make.sh
    1. By default this builds the unoptimized and unpackaged development version for all targets into the ./out/ directory
    2. Alternatively:
      • ./make.sh -p release to build the optimized release versions for all targets
      • ./make.sh -p release -t chrome to build the optimized release version for the Chrome browser
      • ./make.sh -h to see the full list of options

Supporting a new site

If we wanted to support example.com with the source:

<div class="video-container">
  <video src="blob:http://example.com/342b3a13-c892-54ec-84f6-281579de03ab"></video>
  <div class="video-captions">
    Example caption
  </div>
  <div class="video-controls">
    <button class="control button-play">Play</button>
    <button class="control button-fullscreen">Fullscreen</button>
  </div>
</div>

We would start by adding a new file example.js in the resources directory:

export const domain = 'example';

export const resource = {
  buttonParent: function() {
    // Returns the element that will contain the button
    return document.querySelector('.video-controls');
  },
  videoElement: function() {
    // Returns the video element
    return document.querySelector('.video-container video');
  },
  
  // Optional
  captionElement: function() {
    // Returns the element that contains the video captions
    return document.querySelector('.video-captions');
  },
};

We might want to style the button so that it integrates with the page better:

export const resource = {
  ...
  // Assign a CSS class
  buttonClassName: 'control',
  // Scale the button
  buttonScale: 0.5,
  // Apply custom CSS styles
  buttonStyle: /** CSS */ (`
    /* Declaring CSS this way ensures it gets optimized when the extension is built */
    cursor: pointer;
    opacity: 0.5;
  `),
  // Apply a custom CSS hover style
  buttonHoverStyle: /** CSS */ (`opacity: 1 !important`),
};

For more examples, please see the source

Acknowledgements

piper's People

Contributors

amarcu5 avatar aonez avatar ascagnel avatar atkodev avatar bdougherty avatar demesne avatar srushe avatar thendrie avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

piper's Issues

Plex PiP broken

just today the PiP icon is no longer visible in the player window in plex on safari. see attached screenshot/differences to what it used to look like yesterday.

screen shot 2017-08-04 at 11 56 24 am
screen shot 2017-08-04 at 11 56 44 am

Hulu not working in Chrome

Pressing the PiP button in Chrome doesn't work for me anymore. It appears that Hulu has added the disablepictureinpicture attribute to their <video> tag (but only in Chrome, as it doesn't appear in Safari, which is odd 🤔). See attachment for details.
Hulu  video

Mixer button is broken

Looks like they changed the layout of the buttons and the extension is putting it in the wrong place.

New sites

Can you add support for Amazon Prime Video, TVE and HBO?

[chrome] Follows in workspaces

Any way to make the video follow you in different workspaces like in the safari version?

You seem to be using the built-in chrome PiP feature for this.
And since it's a chrome extension I realize you have to think about other OSs other than macos.
But do you think you can give me steps on how to build that on my end?
I would like to use your mac app with the video feed from chrome

macOS Mojave

With the upcoming hostility toward .safariextz, do you have any plans on moving to the Mac App Store?

Video native control show up after quitting PiP mode

As the title says, once I get out of PiP mode, the native controls of the video elements become visible (the ones that you would see if the player doesn't provide custom ones). Would it be possible to keep them hidden?

EDIT:
Added a screenshot that shows what I mean
screen shot 2017-05-03 at 01 13 35

No PiP button on new Netflix Player UI

Today I started seeing a new Netflix Web Player UI, I'm not sure if this is a general release or if I'm in a beta program of some kind.

The new UI doesn't show the PiP button. I've attached a screenshot below:
New Netflix Web Player UI

CC text on retina blurry

Hello, I was testing the developer branch, in particular the CC feature (great work btw!) and noticed that the text looks kinda blurry on my retina screen.

PiP Button on the left of Fullscreen

Hi man,
Just wanted to say first that your extension is absolutely awesome !
However, wouldn't it make more sense to have the PiP button second on the left to the Fullscreen button. For that the fullscreen button would still be at the outmost right, as the user normally expects it to be.

PiP button position on Twitch

Hello, with latest update the PiP button is the third last in the player, while it was the second to last in previous version. Would it be possible to change that back? That way it would be consistent with Youtube, that has Theater, PiP, Fullscreen.

screen shot 2017-11-11 at 18 21 18

Button on Hulu does nothing [chrome]

This is an amazing extension and thank you for your work on it.

I've tested it on Amazon and Netflix, and it works fine. However, when I push the button on Hulu, it does nothing.

I do see an uncaught DOMException in the console, but I can't really make out what is happening.

Detect resource by whole hostname, not only 2. level domain

Currently it is not possible to use different code for services what has the same 2. level domain but different TDL - example.com, example.org, videos.example.com

How about to rewrite resources, so key will be hostname or some matching/wildcharts/regexp string?

Button no longer shows on Twitch

Hey, thanks for this great extension with proper permissions!

It's seems the extension no longer works on twitch - the button simply does not show. I'm on Safari 11.0.1 (13604.3.5). It works fine on the other sites I've tested with. I am unsure if this has happened since the macOS beta was updated or Twitch changed something on their end, unfortunately I don't have an other Safari version to test with.

Edit: Seems to only happen when the site is in "beta" mode.

Add support for ESPN

Support for live TV on espn.com would be fantastic. Please please please 😄

Security Warning

When I opened safari today, it told me the PiPer extension has been updated. However, as it now requires additional permissions, which could lead to security risks, the extension has been automatically deactivated.

Has there been some significant change since the last version that would trigger such an action from safari ? Maybe you might try to reverse it then, or run into the risk of have the extension automatically deactivated for a big chunk of users.

Youtube stops buffering when not on screen

PiP mode works but if the Safari windows is on another screen then it doesn't seem to download more of the video. Going back to the screen with youtube makes it work a small amount of time.

Using the latest master

Netflix PiP icon disappeared

after using PiPer all morning on Netflix I came back from lunch to find the icon is missing on the Netflix playback UI and now the UI has changed entirely with PiPer nowhere to be found.

screen shot 2018-11-19 at 1 41 02 pm

German translation

Would be nice if the "open in Picture in Picture mode" button would be translated into German "Bild-in-Bild starten"
Best, Fabian

Keyboard Shortcut

It would be great if you could add a keyboard shortcut. Maybe ⌘+ ⌥ + P (Command + Option + P)

Support for Mixer.com

Love the extension. Would it be possible to add support for Microsoft's new streaming service Mixer.com?

Netflix picture in picture no longer working

In the past few days picture in picture mode no longer seems to work. The button shows up, but clicking on it has no effect.

Youtube and other sites work just fine.

There are no errors in the javascript console.

Hulu doesn't work with new web redesign

With Hulu's site overhaul, piper no longer works in safari :(

I can get it to work in chrome by using their built in minimize thing, then right clicking and choosing picture in picture.

Czech TV support

Hi, please try adding support to ceskatelevize.cz, for live broadcast (example: ct24.ceskatelevize.cz/#live) as well as non-live videos.
Thx

Is this repo still maintained?

I used this plugin quite often for watching Netflix. It worked really well but not anymore with the new UI. Would love to see the open pull requests merged.

Subtitles Not Working on Some Sites

I haven't tried all the supported sites, but for me subtitles don't show up in the PiP window for Netflix, YouTube, and VRV.

Prime Video, Plex are the only two that work (that I've tried).

Oh, and I'm using Safari.

Plex no longer working

Plex just got a re-design and the Picture in Picture functionality no longer seems to appear at the bottom. Would be awesome if this got fixed 😄.

Netflix captions not always working

I use frequently use PiPer for Netflix and I really love the captions feature. Unfortunately it doesn't seem to work every time . Sometimes I have to activate PiPer multiple times to have the captions show up (I'm not sure if it is that, or I just need to wait more time) and sometimes they won't show up period :(

Netflix not working?

The extension works fine on youtube.. but I am unable to see the PIP icon when playing Netflix?

Do I need to do something extra to get the icon to show up?

thanks

Toolbar Button

It's possible to add Toolbar Button to use PIP with all webs?
I found an script that to this with Alfred, I can copy you it if it's useful for this

HBO Support?

HBO Go and HBO Now have now moved to HTML5 <video> since #42 was requested. I'd love it if you could take another look and see if you can add support for them now. Thanks!

Does not work at all in Safari 11.0.2

The extension only shows the following error in the console:

[Error] TypeError: a.webkitSetPresentationMode is not a function. (In 'a.webkitSetPresentationMode("picture-in-picture"==a.webkitPresentationMode?"inline":"picture-in-picture")', 'a.webkitSetPresentationMode' is undefined)
(anonymous function) (main.js:3:189)

Force native captions

Hi there, this is a fantastic extension, thank you so much for it!

I was just wondering if it’d be possible to force YouTube to always display its captions using native captions instead of the YouTube player’s custom implementation? It’d be nice if it obeyed the system caption preferences at all times, rather than just when in PiP.

Doesn't work with Fubo.tv

Is there any way you could test the plugin on Fubo.tv? No PiP icon appears on the streams... on macOS Safari version 12.1 (14607.1.22).

NBA.com support

Extension is awesome. I dont know if there is any technical difficulties for this, but could you please add NBA.com support (or adobe flash player support in general) as well.

Thanks

Plex

Plex web interface was updated, PiPer icon no longer visible

Plex PiP button not working anymore

This was working as early as last week, however it is not working anymore. I do not see any errors in the console at all, so am not sure where you would begin to debug.

Awesome work on this extension man! Thank you!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.