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

[Feature request] Add an “Embed” option whenever there's an error #5098

Closed
Jonas-Persson-temp opened this issue Dec 3, 2024 · 1 comment
Labels
feature-request Request of a new feature

Comments

@Jonas-Persson-temp
Copy link

Jonas-Persson-temp commented Dec 3, 2024

When I see this error:
image

I want there to be an • Embed option (e.g. clicking on embed redirects you from yewtu.be/watch?v=fo0bArBAZ to youtube.com/embed/fo0bArBAZ), I hate using the sluggish keyboard on my TV whenever it happens.
Go to YouTube would play ads and the official website always takes a lot of time to load, especially on TV.

I don't know what language is being used or how to contribute to this project, but here are some snippets (may not work):

def convert_to_embed_link(video_url : String) : String
	# Extract the video ID from the URL
	if video_url =~ %r{(?:https?://)?(?:www\.)?([^/]+)/(?:watch\?v=)([^&]+)}
		video_id = $2
		return "https://youtube.com/embed/#{video_id}"
	end
	return video_url # Return the original URL if it doesn't match
end
embed_link = convert_to_embed_link(env.request.resource)
# Usage example
<p>#{translate(locale, "videoinfo_youTube_embed_link")}: <a href="#{embed_link}">#{embed_link}</a></p>
@Jonas-Persson-temp Jonas-Persson-temp added the feature-request Request of a new feature label Dec 3, 2024
@unixfox
Copy link
Member

unixfox commented Dec 3, 2024

Duplicate of #4744

@unixfox unixfox marked this as a duplicate of #4985 Dec 3, 2024
@unixfox unixfox closed this as not planned Won't fix, can't repro, duplicate, stale Dec 3, 2024
@unixfox unixfox marked this as a duplicate of #4744 Dec 3, 2024
@unixfox unixfox marked this as not a duplicate of #4985 Dec 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request Request of a new feature
Projects
None yet
Development

No branches or pull requests

2 participants