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: can not play video in iframe #3022

Merged
merged 2 commits into from
Mar 11, 2025
Merged

fix: can not play video in iframe #3022

merged 2 commits into from
Mar 11, 2025

Conversation

hyoban
Copy link
Member

@hyoban hyoban commented Mar 11, 2025

Description

PR Type

  • Feature
  • Bugfix
  • Hotfix
  • Other (please describe):

Screenshots (if UI change)

Demo Video (if new feature)

Linked Issues

close #2996

Additional context

Changelog

  • I have updated the changelog/next.md with my changes.

Copy link

vercel bot commented Mar 11, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
follow ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 11, 2025 3:35am
follow-external-ssr ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 11, 2025 3:35am

@follow-reviewer-bot
Copy link

Suggested PR Title:

refactor(headers): improve createBuildSafeHeaders structure

Change Summary:
Refactor createBuildSafeHeaders for improved handling of headers, allowing for no fallback option and enhanced structure in various components. Updated multiple files to align with this new structure, ensuring consistency across the application.

Code Review:

Code Review

The following are issues that require a change request:


File: packages/utils/src/headers.ts

Lines: 7-15

  • The parameter noFallbak is a typo and should likely be corrected to noFallback for consistency and clarity. Using clear, correctly spelled parameter names is critical for code readability and understanding by future maintainers.

Recommended Change:

({
    webUrl,
    selfRefererMatches,
    noFallback,  // corrected typo
}: {
    webUrl: string
    selfRefererMatches: string[]
    noFallback?: boolean  // corrected typo
}) =>

Update all occurrences of the misspelled parameter (noFallbak) throughout the file to reflect the corrected spelling.


File: apps/desktop/src/main/src/index.ts

Line: 38

  • The new object key noFallbak passed to createBuildSafeHeaders also contains the same typo as noted in headers.ts. This will cause a bug, as createBuildSafeHeaders will not recognize noFallbak due to the incorrect spelling.

Recommended Change:

noFallback: true,  // corrected typo

Files: All other files (Image.tsx, ProxiedImage.tsx, SearchFeed.tsx)

  • These files use createBuildSafeHeaders but do not pass the new noFallbak parameter. If the absence of this optional parameter was intentional, no change is needed. Otherwise, clarify or add noFallback explicitly to ensure consistent configurations with other usages.

Summary of Required Changes

  1. Correct the noFallbak typo to noFallback in the following places:

    • packages/utils/src/headers.ts (function parameter and internal handling).
    • apps/desktop/src/main/src/index.ts (parameter passed to the function).
  2. Ensure consistent handling of the noFallback parameter across all createBuildSafeHeaders calls. Either explicitly add it where missing or confirm intentional exclusion.


Let me know if you need further clarification!

@hyoban hyoban marked this pull request as ready for review March 11, 2025 03:33
@hyoban hyoban enabled auto-merge (squash) March 11, 2025 03:33
@hyoban hyoban disabled auto-merge March 11, 2025 03:35
@hyoban hyoban changed the title fix: can not play bilibili video fix: can not play video in iframe Mar 11, 2025
@hyoban hyoban merged commit fd3877d into dev Mar 11, 2025
11 checks passed
@hyoban hyoban deleted the fix/play-bilibili-03-11 branch March 11, 2025 03:36
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.

Video on Bilibili needs to be verified and always fails
1 participant