Iframely
-
@blakeyrat said:
disable YouTube until the preview window DDoS is fixed.
So...how can one tell that requests are going out to youtube? You talked about "getting banned" or something. Did you actually get some sort of message about that from them?
-
@boomzilla I can't check right now due to mobile, but network tab should show it if it's happening.
Aren't there rules for YouTube links? Like, minimum hash size? Maybe the plugin could be fixed to only start checking if the URL is valid once it's long enough to make sense?
-
@Onyx said:
@boomzilla I can't check right now due to mobile, but network tab should show it if it's happening.
That's what I thought, but I wasn't seeing it.
Hmm...now I am. chrome.
@Onyx said:
Aren't there rules for YouTube links? Like, minimum hash size? Maybe the plugin could be fixed to only start checking if the URL is valid once it's long enough to make sense?
I think this is a composer / preview issue. So, assume you've pasted the youtube link in. Now you're typing something to describe it. It wants to reload youtube stuff every time the composer refreshes.
I have not yet looked seriously at the composer (which is technically a plugin). I was planning on reporting it at github, but I want to have my story straight before doing so.
-
@boomzilla Oh, ouch. Hmmm... This should be fixable actually, I'll look up the plugin once I get to a proper computer.
-
@boomzilla said:
That's what I thought, but I wasn't seeing it.
Hmm...now I am. chrome.
Chrome only starts logging requests when you open the Network tab for the first time
@Onyx said:
This should be fixable actually
It just needs to cache the Iframely result for a brief time; 10 minutes should be plenty
-
@RaceProUK said:
It just needs to cache the Iframely result for a brief time; 10 minutes should be plenty
It should cache it already. You may be spamming the iframely server but it's caching the result. As long as you don't change the youtube link I think it's fine
-
@sloosecannon said:
You may be spamming the iframely server but it's caching the result.
It's not the iframely server that's the problem. The preview pane is loading the result of the iframely output to display to you. I guess that either the composer needs to be smarter about what it updates or the browser needs to be smarter about caching that stuff.
-
@boomzilla said:
@sloosecannon said:
You may be spamming the iframely server but it's caching the result.
It's not the iframely server that's the problem. The preview pane is loading the result of the iframely output to display to you. I guess that either the composer needs to be smarter about what it updates or the browser needs to be smarter about caching that stuff.
Oh, right. That makes sense. Carry on, good sir.
-
@RaceProUK only if it's a valid link, otherwise fixing a typo would be a chore. Even then, what if you're pasting stuff and you pasted the wrong thing (which is still a valid URL) by accident?
I actually wanted to check if there's an easy way to check what changed in the editor and only fire off requests if the link changed.
-
@Onyx's original fail.d report about this:
TRWTF is that akismet thinks this is spam.
-
-
@boomzilla Yeah, they made it so the composer only refreshes once you stop typing for a bit.
-
@boomzilla Thank you. I know it's a pain to not have YouTube onebox, but it's much more important that our site is a good citizen.
-
@boomzilla said:
So...how can one tell that requests are going out to youtube?
The visual hint is the flashing of the video box while you're typing in the preview window. But note this bug is also present when you're in mobile view, and the preview window is invisible.
The confirmation is via the web browser's developer tools. Go to the network tab and watch the requests fly.
@boomzilla said:
You talked about "getting banned" or something.
Well flood control. It means you need to enter a CAPTCHA to prove you're human before doing anything on the site. It's a huge PITA and it should never happen due to a bug on our site.
-
@sloosecannon said:
It should cache it already.
Undoubtedly true, but that is not the observed behavior.
-
@blakeyrat said:
The confirmation is via the web browser's developer tools. Go to the network tab and watch the requests fly.
Yeah, for some reason I wasn't seeing them at first. Reloads, fiddling with checkboxes in the dev tools didn't help.
@blakeyrat said:
It means you need to enter a CAPTCHA to prove you're human before doing anything on the site.
Ah, OK.
-
@blakeyrat said:
@sloosecannon said:
It should cache it already.
Undoubtedly true, but that is not the observed behavior.
Yeah, this is the problem because we're talking pedantics.
Technically the iframely plugin is caching the embed code, but the embed code is still loading up YouTube, which iframely can't (and rightly shouldn't) cache.
-
@Tsaukpaetra Oh I see what you mean now.
The annoying thing is the YouTube API has a perfectly cromulent way to get a video's preview image without using an iframe embed. So it's an easy problem to work around if the developer bothers to give a shit. And an image that's just an image could be refreshed as much as you want without wasting bandwidth, assuming some browser caching exists.
Heck, even the Discourse developers figured that out.
-
My local testing shows that this YT plugin seems to fit the bill:
It only seems to be able to be installable via npm, however (not the admin interface).
I'd recommend leaving iframely as-is, with youtube and twitch black listed and let the youtube light plugin handle youtube.
-
@boomzilla ok, you can activate it in the admin panel.
-
@ben_lubar Thanks.
Check it out @blakeyrat. Downside is that you don't see a preview at all.
-
@boomzilla Thanks.
I was perfectly happy with YouTube links being links, frankly. But works is works.
-
@blakeyrat Well, that's not going to be a popular thing.
-
@boomzilla Hmm...sometimes I get the preview, sometimes it's the blank placeholder. :-(
-
@boomzilla Also, the video is square
-
@RaceProUK Yeah, that's interesting. When you watch it at YT, that's the actual video bit, but you get a rectangle of a viewing area. I guess they just cut that out on an embed.
-
@boomzilla Hrmmm...no, it does that to everything. :grump:
-
@boomzilla It's better than nothing
-
@boomzilla That's some of @PJH's CSS.
-
@ben_lubar said:
@boomzilla That's some of @PJH's CSS.
Which bit? I'm in there at the moment messing with other stuff..
-
@PJH the bit that sets
max-height
andmax-width
oniframe
.
-
Yes, but no. Looks like it's this, actually:
.topic .posts .content .img-responsive { padding:1px; border:1px solid #D8E5FB; max-width:300px; max-height:300px; }
-
@ben_lubar But is the fact that it's there, or the numbers being too low?
-
@PJH since iframes can only be sized by plugins, I'd say get rid of the iframe size restriction.
-
@boomzilla said:
Yes, but no. Looks like it's this, actually:
.topic .posts .content .img-responsive { padding:1px; border:1px solid #D8E5FB; max-width:300px; max-height:300px; }
I removed half of the selector.
-
-
@PJH said:
@ben_lubar said:
I removed half of the selector.
Which hasn't made a difference here..
It worked for me when I refreshed.
-
@RaceProUK said:
the video is square
-
@ben_lubar said:
It worked for me when I refreshed.
Ah, yes, hard refresh did it for me. Now...I think the issue with the thumbnail is the way the plugin is picking the thumbnail. Based on this:
http://www.reelseo.com/youtube-thumbnail-image/
It looks like that video didn't supply a "max resolution" thumbnail, so it gets that ugly default thing.
-
...and to get the title, it looks like an API key is required.
-
@boomzilla Oh, and that thing is using v2 of the API?
-
@blakeyrat said:
@boomzilla Thank you. I know it's a pain to not have YouTube onebox, but it's much more important that our site is a good citizen.
It's nice to see you actually positively responding to something.