Support for video playback through fallback#287
Conversation
|
Warning Rate limit exceeded@n-ce has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 24 minutes and 28 seconds before requesting another review. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📒 Files selected for processing (1)
WalkthroughThe update introduces a new property, Changes
Sequence Diagram(s)sequenceDiagram
participant Client
participant FallbackFunction
Client->>FallbackFunction: Invoke asynchronous function with streamData
FallbackFunction->>streamData: Access adaptiveFormats array
FallbackFunction->>FallbackFunction: Filter entries where mimeType starts with "video"
FallbackFunction->>FallbackFunction: Map each entry (modify url, set resolution and type)
FallbackFunction->>FallbackFunction: Add empty captions array
FallbackFunction->>Client: Return response with videoStreams and captions properties
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
This comment was marked as duplicate.
This comment was marked as duplicate.
This comment was marked as resolved.
This comment was marked as resolved.
|
@coderabbitai why does the the video src triggers the error handler? when i open the src in a new tab (outside the application) it works fine |
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chain@n-ce This issue is likely related to how HTML5 video elements handle cross-origin resources differently than direct browser access. When you open a video URL directly in a browser tab, the browser handles it as a standalone resource. However, when embedded in an application using the Common causes for this include:
To debug this further, could you check the browser console for specific error messages when the video fails to load? Also, could you share which video URL is causing the issue so I can help investigate the specific headers or response format? 🏁 Script executed: Length of output: 5734 🏁 Script executed: Length of output: 3339 @n-ce Looking at your code, I can see why this might be happening. When a video is opened directly in a browser tab versus being embedded in an HTML5
onerror={() => {
if (video.src.endsWith('&fallback')) return;
const origin = new URL(video.src).origin;
if (store.api.index < store.api.invidious.length) {
const proxy = store.api.invidious[store.api.index];
video.src = video.src.replace(origin, proxy);
audio.src = audio.src.replace(origin, proxy);
store.api.index++;
}
}To debug this further:
Could you share what browser console errors you're seeing when the video fails to load? |
Summary by CodeRabbit
New Features
WatchOnYtifytoWatchVideofor improved clarity in theActionsMenu.Bug Fixes