This repository was archived by the owner on Apr 1, 2023. It is now read-only.
Merged
Conversation
External player
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This closes #29. It's also progress towards #56.
The External Player is implemented the same way as VLC or Mpv. It required a couple changes to how the Player classes work, but it can still be used the same. Thus,
--player externalis needed to activate it. There's detailed information about how it can be set-up in theREADME.md.It uses Network Service Discovery (
zeroconf) so that clients can connect to the Vidify server, and then sends the video information continuously via JSON packets over TCP. The protocol is described insidevidify.player.external.For now, only the server sends packets to the clients. In the future, the clients will need to send special packets to the server with necessary information about the device and such. That part is implemented but currently has no use.
Changes to the Player interface:
player.DIRECT_URL's value is. YouTubeDLWorker now returns adictrather than the direct URLstr. The URLs can be extracted withget_direct_urlorget_youtube_url, later on.player.positionno longer has a setter. It's been renamed toseek, which supports both relative & absolute positions. This was necessary because some players like this one don't have access to their own position, and because some players likempvhave different methods for relative/absolute seeking, which may be more efficient.vidify.gui.windownow has acloseEventmethod that will de-initialize it. This is needed to close the server sockets and unregister the NSD service.This branch also includes a couple fixes for bugs I found while modifying the repo. One of them fixes a bug where if no songs are playing on the Spotify Web API, it would crash (because
metadata.itemis null). Another one fixes the Player custom attributes, which were terribly implemented and didn't work.