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

General method for previewing videos in App #2536

Open
2 tasks done
ltaoo opened this issue Jan 10, 2025 · 1 comment
Open
2 tasks done

General method for previewing videos in App #2536

ltaoo opened this issue Jan 10, 2025 · 1 comment
Labels
enhancement New feature or request

Comments

@ltaoo
Copy link

ltaoo commented Jan 10, 2025

Clear and concise description of the problem

I have a RSSHub route that can provide videos, but it cannot be previewed in the app like Bilibili videos.

Suggested solution

If the video link contains "embed=1", it indicates that it can be embedded and played as an iframe.

packages/utils/src/url-for-video.ts

  const u = new URL(url)
  const params = u.searchParams
  if (params.get("embed") === "1") {
    params.append("controls", mini ? "0" : "1")
    params.append("muted", mini ? "1" : "0")
    return `${u.origin}${u.pathname}?${params.toString()}`
  }

I have tested this code locally.

Image

Alternative

No response

Additional context

No response

Validations

  • Check that there isn't already an issue that request the same feature to avoid creating a duplicate.
  • This issue is valid
@ltaoo ltaoo added the enhancement New feature or request label Jan 10, 2025
Copy link

linear bot commented Jan 10, 2025

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant