This repository was archived by the owner on Aug 23, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 27
New internal player #87
Merged
thecoder75
merged 10 commits into
thecoder75:master
from
mustang-sally:new-internal-player
Apr 16, 2019
Merged
New internal player #87
thecoder75
merged 10 commits into
thecoder75:master
from
mustang-sally:new-internal-player
Apr 16, 2019
Conversation
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
I decided to add flv.js to replace the HLS.js when we're reproducing live streams. The FLV stream is way smoother than the HLS one. This will not affect downloads, as they are still downloaded using the HLS stream.
Plyr is a simple, lightweight, accessible and customizable HTML5 media player. Website: https://plyr.io/
Otherwise we get this annoying invisible block of pixels in the home page
The other value was fine too, but I think 360p is more sane.
This change is necessary to implement video rotation without having to deal with black bars.
This is one of the features I was missing the most: persistent player configuration (such as volume and mute state). It was really frustrating having your volume set to 100% every time you'd watch a stream. Not anymore! For now it only saves the volume and mute states, but there is nothing preventing other customizations from being added in the future.
I've a parameter called preferLiveFlv, so when it's set to true, pickProperSource() will try to return the URL of the FLV stream, instead of the HLS one. This allow us for smoother playback when dealing with live streams. This options is off by default, and as of now it only affects live streams in the internal video player.
Current features: * Faster loading: The previous player wasn't using IPC, so whenever a video was request to be played, two API requests were made to getVideoInfo(). Now it's just one. * Switching between streams / replays is responsive and glitch-free. * Stutter-free playback on live streams by using flv.js (but it falls back to the HLS stream if the FLV one is not available) * Manual video rotation support * Change playback speed * A lot of new keyboard shortcuts
Useful for the keyboard shortcuts panel in the home page
Contributor
|
Do you think it would be possible to implement the idea in #73 in this? :) |
Contributor
Author
|
I think it is feasible since it doesn't rely on the native player anymore. Perhaps by adding some markers in the progress bar wherever there is a comment, or something like that. |
Contributor
|
I think that would be neat, provided it's configurable so people who don't want it aren't annoyed by it. |
Owner
|
I checked out the homepage for plyr.io and really like how the player looks. Approving because the UI alone of the player is what I've always wanted to have in the app and also cause it finally solves one of the longest/oldest requests for video rotation. |
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.
Hello!
I've been using this player I made in favor of the default one and I'm really digging it. So I decided to share it with you, and maybe see if you're interested in merging. Don't feel pressured though, I made it mostly for me, because I wanted some sort of video rotation support and most importantly, when I changed my volume levels, I wanted it to be persistent the next time I watched some other stream or replay. 😆
Anyway, here are the changes:
and I suck at CSS.Alt+→, the player window will rotate 90 degrees forward and also adjust the window based on the video dimensions. Same thing forAlt+←, but this one does 90 degrees backwards. You can even watch a video upside-down now if you want! A feature much requested by the australians.However, two shortcuts had to be replaced (
KandL), because one of them (K) was already being used by Plyr, and unfortunately there is no way to disable it. So instead ofKandLto seek backward/forward by 10 seconds, it's nowAandD, respectively. Here's a screenshot of all shortcuts:And... I think that's pretty much it. If you need more details of a specific change was made, you can try to check the commit's description, or you can just ask me and I'll try to answer you asap.
Let me know what you think! Thanks.