Skip to content

[Feature Request] Browse while playing #983

@gusals3587

Description

@gusals3587

Basically, I want to look at the comments while watching video, I came up with a very hacky way (aka POC) of making the mpv subprocess entirely separate, then pointing all the stdout to devnull, but since I don't really know much about the codebase of mps-youtube, I'm pretty sure I broke like a half dozen edge cases and deprecated a couple of functions. Oh, and it only works with mpv, I need to find somebody who can turn this into a useful / more versatile feature

Issue / Suggestion

I've implemented the POC (proof of concept) on #982
Some things to point out are

  1. I've edited the player.py so it doesn't terminate the player, that means deleting the next, previous, etc
  2. I've also edited the player.py so mps youtube itself doesn't output anything, which means deleting the _playback_progress
  3. In mpv.py I've switched stdout to subprocess.DEVNULL for detaching the mpv output prompt from terminal
  4. Also in mpv.py, I've changed the stderr to subprocess.DEVNULL as well since I think that it's more sensible (please correct me if there's any reason why you opened the file)
  5. I've added ' &' to cmd so it detaches completely from it's parent

Your Environment

mpsyt --version

mpsyt version      : 0.2.8
   notes           : released 17 February 2018
pafy version       : 0.5.4 (youtube-dl backend)
youtube-dl version : 2019.04.30
Python version     : 3.7.3 (default, Mar 27 2019, 09:23:15) 
[Clang 10.0.1 (clang-1001.0.46.3)]
Processor          : i386
Machine type       : x86_64
Architecture       : 64bit, 
Platform           : Darwin-18.5.0-x86_64-i386-64bit
sys.stdout.enc     : UTF-8
default enc        : utf-8
Config dir         : /Users/apple/.config/mps-youtube
env:TERM           : xterm-256color
env:SHELL          : /bin/bash
env:LANG           : en_US.UTF-8

My OS is macOS Mojave 10.14.4, using mpv with mps-youtube

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions