d'Hinnisdaël Posted May 7, 2024 Posted May 7, 2024 There's a list of valid urls on Vimeo's oEmbed docs page that seems to match the ones mentioned in the issue. It doesn't mention video ids now being hexadecimal, however. vimeo.com/{video_id} vimeo.com/album/{album_id}/video/{video_id} vimeo.com/channels/{channel_id}/{video_id} vimeo.com/groups/{group_id}/videos/{video_id} vimeo.com/ondemand/{ondemand_id}/{video_id} 1 1
netcarver Posted May 7, 2024 Posted May 7, 2024 @d'Hinnisdaël Thank you. As an example with trailing hexadecimal video_id: https://vimeo.com/553329597/04c306a466 I've closed my PR for the time being.
Robin S Posted May 7, 2024 Posted May 7, 2024 @netcarver, this information about unlisted videos may be relevant: https://help.vimeo.com/hc/en-us/articles/12426199699985-Overview-of-video-privacy-settings Quote When you change your video's privacy settings to Unlisted, an extra set of numbers - what we call the privacy hash - will be added at the end of your video's URL, and must be included for embeds and sharing to work. So for a video with a URL like https://vimeo.com/553329597/04c306a466 the src for the iframe embed will need to include h=04c306a466 in the query string. 1 1
Ivan Gretsky Posted April 2 Posted April 2 It seems like aspect ration auto-determination doesn't work. Created an issue. Can anyone confirm the bug? P.S. I started to doubt... Was it ever a feature? I was sure it was...
wbmnfktr Posted April 9 Posted April 9 I know I used this module a while back but moved on and used custom HannaCodes for video embeds for several reasons. Maybe this could be your way as well - combined with HannaCodeDialog to insert the code into your textarea fields. 1
Ivan Gretsky Posted April 9 Posted April 9 Sounds interesting! Can you share the hannacode? But I still need this module as I have projects with may too much content to fix)
d'Hinnisdaël Posted April 9 Posted April 9 I've created a fork of the previous version a while ago that adds support for aspect ratios. Been working great for years, and haven't seen a need to update to the newer version. Here's the fork and the git diff in case you're still on v1. The newer v2 seems to be a complete rewrite, so... 2 1
wbmnfktr Posted April 9 Posted April 9 5 hours ago, Ivan Gretsky said: Can you share the hannacode? $out = ''; $out .= <<<EOT <div class="player youtube"> <iframe src="" data-src="https://www.youtube-nocookie.com/embed/$video" data-category="external_media" data-ask-consent="1" frameborder="0" scrolling="no" width="640" height="480" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe> </div> <div class="link youtube"> <a href="https://www.youtube.com/watch?v=$video" rel="nofollow" target="_blank">Watch on YouTube.com</a> </div> EOT; echo $out; This already has PrivacyWire attributes to make it work with it. Here is the HannaCode export: !HannaCode:youtube:eyJuYW1lIjoieW91dHViZSIsInR5cGUiOiI2IiwiY29kZSI6IlwvKmhjX2F0dHJcbnZpZGVvPVwiSHNEamxrZGpMZHdcIlxuaGNfYXR0cipcL1xuJG91dCA9ICcnO1xuJG91dCAuPSA8PDxFT1RcbjxkaXYgY2xhc3M9XCJwbGF5ZXIgeW91dHViZVwiPlxuICAgIDxpZnJhbWUgXG4gICAgICAgIHNyYz1cIlwiIFxuICAgICAgICBkYXRhLXNyYz1cImh0dHBzOlwvXC93d3cueW91dHViZS1ub2Nvb2tpZS5jb21cL2VtYmVkXC8kdmlkZW9cIlxuICAgICAgICBkYXRhLWNhdGVnb3J5PVwiZXh0ZXJuYWxfbWVkaWFcIlxuICAgICAgICBkYXRhLWFzay1jb25zZW50PVwiMVwiIFxuICAgICAgICBmcmFtZWJvcmRlcj1cIjBcIlxuICAgICAgICBzY3JvbGxpbmc9XCJub1wiXG4gICAgICAgIHdpZHRoPVwiNjQwXCJcbiAgICAgICAgaGVpZ2h0PVwiNDgwXCJcbiAgICAgICAgYWxsb3c9XCJhY2NlbGVyb21ldGVyOyBhdXRvcGxheTsgY2xpcGJvYXJkLXdyaXRlOyBlbmNyeXB0ZWQtbWVkaWE7IGd5cm9zY29wZTsgcGljdHVyZS1pbi1waWN0dXJlXCIgYWxsb3dmdWxsc2NyZWVuPjxcL2lmcmFtZT5cbjxcL2Rpdj5cbjxkaXYgY2xhc3M9XCJsaW5rIHlvdXR1YmVcIj5cbiAgICA8YSBocmVmPVwiaHR0cHM6XC9cL3d3dy55b3V0dWJlLmNvbVwvd2F0Y2g/dj0kdmlkZW9cIiByZWw9XCJub2ZvbGxvd1wiIHRhcmdldD1cIl9ibGFua1wiPkRpcmVrdCBiZWkgWW91VHViZSBhbnNjaGF1ZW48XC9hPlxuPFwvZGl2PlxuRU9UO1xuXG5cbmVjaG8gJG91dDsifQ==/!HannaCode 3
PWaddict Posted April 26 Posted April 26 Adding the native lazy load loading='lazy' on the 381 line of TextformatterVideoEmbed.module doesn't seem to lazy load the iframe. I can see the attribute on the page's code that is injected but all the YouTube scripts are loading on the initial page load even through the embed video is about 2000+ pixels from top. What am I missing??? EDIT: All the Chromium browsers have a very large threshold. On Mozilla the threshold is much lower and the iframe gets loaded when you're getting close to it at about 500px.
PWaddict Posted April 28 Posted April 28 @ryan will you consider to add an option to populate the loading="lazy" attribute to iframe tags? Although with a simple hook like below we can get the job done but it would be great if we can have it available on the module. $wire->addHookAfter('Page::render', function(HookEvent $event) { if ($this->wire('page')->template->name != "my-content") return; $event->return = str_replace("<iframe ", "<iframe loading='lazy' ", $event->return); });
Christophe Posted 2 hours ago Posted 2 hours ago Hello, A few days ago I could add videos to a body field on pages using a basic-page-like template (file). And the videos can still be seen now (in Vivaldi and Firefox Developer on Linux Mint Mate Edition). But I've just tried now to add 2 different videos on 2 pages using the same template (file), and they are not displayed in Vivaldi or other chrome-based browsers, even though I see the embedded code with the web deveopment tools. In Vivaldi I see this error message: "["name" from Parameters from the page where the video is]/:69 Unrecognized feature: 'web-share'." But I can see them without any problem on Firefox Developer (even though I see other error messages that seem related to youtube "embed". I cleared the cache in the module and not just one time (I changed from 720p to 1080p - and tried back with 720p -, and had tried the GDPR option). I even erased the compiled files in Modules -> Site. I cleared all the website's cache, and also the browser's cache, several times. Any idea(s)? Thanks in advance!
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now