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

Add support for upcoming livestream trailers #6375

Draft
wants to merge 1 commit into
base: development
Choose a base branch
from

Conversation

ChunkyProgrammer
Copy link
Member

Add support for upcoming livestream trailers

Pull Request Type

  • Feature Implementation

Related issue

LuanRT/YouTube.js#842

Description

This will be difficult to test but some upcoming videos have trailers to view before the stream is uploaded. For example, this is an upcoming video that has a trailer: https://youtu.be/t28qkILDe58 (it will most likely be uploaded by the time this PR gets reviewed).

Screenshots

Upcoming video with trailer:
image

Upcoming video without trailer:
image

Other video (movie) with trailer:
image

Testing

  • kinda difficult, find an upcoming live stream that has a trailer associated with it and go to the watch page
  • find an upcoming live stream that doesn't have a trailer associated with it and go to the watch page
  • find a movie that has a trailer associated with it and go to the watch page

Desktop

  • OS: Fedore Linux
  • OS Version: 41 KDE
  • FreeTube version: 0.22.x (latest nightly)

Comment on lines +45 to +76
v-if="!isLoading && isUpcoming && playabilityStatus === 'OK'"
class="trailer premiereDate"
>
<font-awesome-icon
:icon="['fas', 'satellite-dish']"
class="premiereIcon"
/>
<p
v-if="upcomingTimestamp !== null"
class="premiereText"
>
<span
class="premiereTextTimeLeft"
>
{{ $t("Video.Premieres") }} {{ upcomingTimeLeft }}
</span>
<br>
<span
class="premiereTextTimestamp"
>
{{ upcomingTimestamp }}
</span>
</p>
<p
v-else
class="premiereText"
>
{{ $t("Video.Starting soon, please refresh the page to check again") }}
</p>
</div>
<div
v-else-if="!isLoading && (isUpcoming || errorMessage)"
Copy link
Member

Choose a reason for hiding this comment

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

I'm on mobile so I might be missing something glaringly obvious but this looks like it mostly duplicates upcoming video the code below it.

Copy link
Member Author

Choose a reason for hiding this comment

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

It's slightly different. It moves the premiere timestamp below the video and gets rid of the video thumbnail. I'll see if i can use some css classes and v-if statements to avoid the code duplication

Copy link
Contributor

This pull request has conflicts, please resolve those before we can evaluate the pull request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants