Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Display currently watching viewer count on live streams #4206

Merged
merged 2 commits into from
Nov 21, 2023

Conversation

absidue
Copy link
Member

@absidue absidue commented Oct 21, 2023

Display currently watching viewer count on live streams

Pull Request Type

  • Feature Implementation

Related issue

closes #4081

Description

Adds the currently the number of people currently watching the live stream to the live chat. It'll update about every 5 seconds similarly to YouTube. Respeccts the "Hide Video Views" setting.

While I know that visually the live chat view probably isn't the best place for this number, as it only works when the live chat is visible, I decided that placing in there would be less confusing to users (also keeps the code simpler as i don't have to move the value between 3 different components).

Screenshots

live-chat-with-watching-count

Testing

Open a live stream with a live chat and make sure the "Hide Video Views" setting is disabled.

e.g. https://youtu.be/jfKfPfyJRdk

Desktop

  • OS: Windows
  • OS Version: 10
  • FreeTube version: 0.19.1

@PikachuEXE
Copy link
Collaborator

Cannot review until PR released?

@absidue
Copy link
Member Author

absidue commented Oct 22, 2023

I thought GitHub would just queue up the review requests until it was marked ready for review, but I guess not, sorry.

@ChunkyProgrammer
Copy link
Member

Should this PR be set to ready to review?

@absidue absidue marked this pull request as ready for review November 9, 2023 18:29
@FreeTubeBot FreeTubeBot enabled auto-merge (squash) November 9, 2023 18:29
@github-actions github-actions bot added the PR: waiting for review For PRs that are complete, tested, and ready for review label Nov 9, 2023
@absidue
Copy link
Member Author

absidue commented Nov 9, 2023

Yes, I've rebased it now, so you can actually test it and marked it ready-for-review.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • When live chat is disabled by the creator u cant see the viewer count anymore but on YT u can
  • Users can also hide the live chat in the distraction free settings and that also hides the viewer count

U could move the element next to the started streaming element this is how YT does it idk if it is a better UX though

@absidue
Copy link
Member Author

absidue commented Nov 17, 2023

We can't have it separate from the live chat because that view count comes from polling the live chat endpoints, I can move it in the UI, but I'll still have to hide it if the video doesn't have a live chat.

We could ask YouTube.js to have duplicate code so we can poll it every 5 seconds even when the video doesn't have a live chat but that seems like quite an edge case.

@efb4f5ff-1298-471a-8973-3d47447115dc

Ah ok, the only thing i maybe would like to see is the same as @jasonhenriquez suggestion about

Add space between title text and count

Maybe to make it look nice we can reuse the same separators we use in the img below?

Capture

Co-authored-by: Jason <84899178+jasonhenriquez@users.noreply.github.com>
@absidue
Copy link
Member Author

absidue commented Nov 20, 2023

Updated the styling using @jasonhenriquez suggestion.

@FreeTubeBot FreeTubeBot merged commit d1a7b84 into FreeTubeApp:development Nov 21, 2023
5 checks passed
@github-actions github-actions bot removed the PR: waiting for review For PRs that are complete, tested, and ready for review label Nov 21, 2023
@absidue absidue deleted the live-watching-count branch November 21, 2023 11:07
PikachuEXE added a commit to PikachuEXE/FreeTube that referenced this pull request Nov 23, 2023
* development:
  Translated using Weblate (Italian)
  Translated using Weblate (Polish)
  Translated using Weblate (Kurdish (Central))
  Translated using Weblate (Spanish)
  Translated using Weblate (Kurdish (Central))
  Translated using Weblate (Kurdish)
  A new way to subscribe (FreeTubeApp#4238)
  Display more profiles on the profile drop-down list, v2 (fixed for low res, fixed linter)  (FreeTubeApp#4359)
  Translated using Weblate (Estonian)
  Translated using Weblate (Serbian)
  Translated using Weblate (Arabic)
  Translated using Weblate (Chinese (Simplified))
  Display currently watching viewer count on live streams (FreeTubeApp#4206)
  Translated using Weblate (Spanish)
  Translated using Weblate (Czech)
  Translated using Weblate (Chinese (Traditional))
  Translated using Weblate (Italian)
  Fix block channel channel ID validation (FreeTubeApp#4366)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature Request]: Show viewer count on livestreams
6 participants