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

Fix live premieres being treated as non-live videos #3358

Merged
merged 1 commit into from Apr 17, 2023

Conversation

absidue
Copy link
Member

@absidue absidue commented Mar 25, 2023

Fix live premieres being treated as non-live videos

Pull Request Type

  • Bugfix

Related issue

closes #3310

Description

Currently we detect live videos on the watch page by checking isLive and isLiveContent, that is fine for normal live streams but for currently live premiere videos, the isLiveContent property is set to false. That caused live premiere videos to be treated as normal videos, causing errors.
I've now switched the check to just isLive. isLiveContent is still useful for detecting live stream replays, which we use to show a "streamed on x" text instead of "published on x" text.

Another way to look at it, is that anything with isLive and isLiveContent set to true, is being streamed from somewhere to YouTube and then to you, anything with isLive set to true but isLiveContent set to false, is already entirely on YouTube's servers so it's only getting streamed from YouTube to you.

Testing

Find a stream on https://www.youtube.com/@live (click on the live now header to see all of them that are currently live) that is live but is marked as premiere (scrolling down to load more and CTRL+F is your friend), you may have to use the 3 dots menu in the top right of the website to change location if there aren't any listed for your current location.

Desktop

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

@github-actions github-actions bot added the PR: waiting for review For PRs that are complete, tested, and ready for review label Mar 25, 2023
@FreeTubeBot FreeTubeBot enabled auto-merge (squash) March 25, 2023 18:10
Copy link
Member

Choose a reason for hiding this comment

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

LGTM, should i create a bug report for incorrectly labeling the video as live instead of premiere in the player?

@absidue
Copy link
Member Author

absidue commented Mar 25, 2023

in the videojs player?

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

Yeah

@absidue
Copy link
Member Author

absidue commented Mar 25, 2023

not sure if video.js lets us change that, other than to just remove it.

Copy link
Collaborator

@PikachuEXE PikachuEXE left a comment

Choose a reason for hiding this comment

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

Not sure if related
https://youtu.be/VISznwVfJhM
Screenshot 2023-03-26 at 09 30 31

@absidue
Copy link
Member Author

absidue commented Mar 26, 2023

@PikachuEXE is that with or without this PR? That error occurs when it tries to use DASH for live premieres, as it was treating them like normal/non-live videos before this pull request.

@PikachuEXE
Copy link
Collaborator

With and without this PR. That's why I am not sure if it's supposed to be fixed by this PR

Copy link
Collaborator

@PikachuEXE PikachuEXE left a comment

Choose a reason for hiding this comment

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

Re-tested with https://youtu.be/VISznwVfJhM (actually live from same channel)
With latest development & this branch merged with latest development
Both works (can be played)
Could be just dev issue

@FreeTubeBot FreeTubeBot merged commit c4464f4 into FreeTubeApp:development Apr 17, 2023
5 checks passed
@absidue absidue deleted the fix-live-premieres branch April 17, 2023 13:22
@github-actions github-actions bot removed the PR: waiting for review For PRs that are complete, tested, and ready for review label Apr 17, 2023
PikachuEXE added a commit to PikachuEXE/FreeTube that referenced this pull request Apr 21, 2023
* development:
  Fix extracting chapters with handles from description (FreeTubeApp#3456)
  * Update video list display & watch page to not use stored watch progress when progress saving disabled (FreeTubeApp#3453)
  Update invidious-instances.json (FreeTubeApp#3440)
  Prevent loading for ever in web builds in live chat (FreeTubeApp#3449)
  Bump postcss from 8.4.21 to 8.4.22 (FreeTubeApp#3435)
  Bump html-webpack-plugin from 5.5.0 to 5.5.1 (FreeTubeApp#3432)
  Bump webpack from 5.78.0 to 5.79.0 (FreeTubeApp#3436)
  Bump sass from 1.61.0 to 1.62.0 (FreeTubeApp#3433)
  Fix "mention" in comments was rendered as link with channel URL (FreeTubeApp#3351)
  Fix live premieres being treated as non-live videos (FreeTubeApp#3358)
  Bump eslint-plugin-vue from 9.10.0 to 9.11.0 (FreeTubeApp#3434)
  Bump webpack-dev-server from 4.13.2 to 4.13.3 (FreeTubeApp#3437)
  Bump youtubei.js from 4.2.0 to 4.3.0 (FreeTubeApp#3438)
  Bump lefthook from 1.3.9 to 1.3.10 (FreeTubeApp#3439)
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.

[Bug]: TypeError: Cannot read properties of undefined (reading 'length')
5 participants