Large Scale Central

Today's Youtube embed code (May 2018)

Over in the Spring Photo Thread
http://www.largescalecentral.com/forums/topic/28157/-/view/post_id/365283

I ran into some issues with Youtube’s embed code. I moved the discussion over here to as not to hijack the photos.

The embed code I copied (~ replaces less/grtr than):
~div style="position:relative;height:0;padding-bottom:56.25%"iframe src=“https://www.youtube.com/embed/YrHeQJpCfRk?ecver=2” style=“position:absolute;width:100%;height:100%;left:0” width=“640” height=“360” frameborder=“0” allow=“autoplay; encrypted-media” allowfullscreen/iframe~

resulted in two strange events. 1 - the spacing in my post became about 4 lines per paragraph (I had to use ctl-return to get single spacing) and the video was twice as big. When I tried to edit the post, I was unable to make it display regularly so I deleted the video and re-posted it as a separate post. The 3 photos still don’t appear on my browser (Firefox, Win10.)

Joe Zullo cleaned up the posts by removing HTML.
Joe - maybe you could share what you removed so we can all discuss what happened? Where did the ‘messy code’ come from?

P.S. When I copied the embed code in as HTML, the video appeared - I didn’t need the “embed” option under ‘Insert/Edit video’, which suggests that HTML code in the text will work as html, not text.
When I deleted it to insert the actual code with the ~, it still spaced as if a video is there, and when I look at source code the embed still shows, not my version with the ~.

I looked at the page source and the “div” didn’t get deleted when I deleted the video:

div style=“position: relative; height: 0; padding-bottom: 56.25%;”

Pete,

I think the problem with the video was the size call out. This sight likes about 800x600px for viewing in posts. I scaled it down in the HTML editor in the post window tool menu.

What I removed from the first post with pictures was all the div style stuff. I have no idea how you got all that in there.

Before hitting the “Post Reply” button use the eye button to preview your post. If things don’t look like you want use the HTML editor to correct the problem.

I hope this helps you. Sometimes this HTML stuff can make you want to pull out your hair!

What I removed from the first post with pictures was all the div style stuff.

That ‘div’ stuff came from Youtube’s new embed code, and it didn’t go away when I deleted the video, as I posted above. The left-over ‘div’ didn’t show in this site’s html editor - I had to go to page source to see it.

Pete Thornton said:

What I removed from the first post with pictures was all the div style stuff.

That ‘div’ stuff came from Youtube’s new embed code, and it didn’t go away when I deleted the video, as I posted above. The left-over ‘div’ didn’t show in this site’s html editor - I had to go to page source to see it.

Pete,

YouTube doesn’t have a “new” embed code. I used it just a few minutes ago and it’s same old same old!

Yes I did see all the div stuff with this sites html editor.

I do not know what else to tell you. Obviously you have/had a problem and others on LSC don’t.

Here is an embed code from one of my videos that I just copied. Pretty straight forward.

Joe,

You must be using a different Youtube from me. Here’s the embed code I just got from my video: (<> replaced with ~)

~div style=“position:relative;height:0;padding-bottom:56.25%”>

and I notice you can paste html without this forum code interpreting it as html. Let’s try:

Joe Zullo said:

Here is an embed code from one of my videos that I just copied. Pretty straight forward.

Hmmm . . I quote it and suddenly the html code is accepted. I made no changes above.

YouTube doesn’t have a “new” embed code. I used it just a few minutes ago and it’s same old same old!

Au contraire, mon ami. When I copy the embed code, I get this:

and I am not going to edit this post so you can see the actual code.

Pete, your is a bit different than what I get.

a bit different than what I get.

(I don’t get any young ladies introducing my train videos either.)

It’s quite interesting. This “new” embed code does all kinds of strange things - and if you delete the video the div doesn’t get deleted.

Some of this is the forum code. When you try to use the HTML editor on a post, you don’t see the current text in the post. Note in my prior post which has 2 videos, one on top of the other [wonder if you see that too? I better capture it.] I had edited the html and removed the < and >, so the forum should have ignored it. But it didn’t, and I recall when I was trying to clean up in the Spring Photo thread I didn’t see my edits - just the original.

OK, in my post of June 2, 2018 9:54 AM EDT, there are 2 videos one on top of the other. [First attached image] Do we all see that? (And I know why the first one showed - although I corrupted the “div” with a ~, the “iframe” is still valid - even if not in an ‘Insert/Edit Video’ box.)

Then the rest of the post is spaced widely [second attached image]

The source code from the LSC editor is shown ion the third image. The ‘page source’ from the browser is the fourth.

I offer this to anyone who feels like analyzing the html. I don’t.

I think you’re making it more complicated than it has to be.

Copy the code above the “young lady” and open the “Insert/edit video” box, you should get an “Embed” label above it and click on that. That’s where you paste that code into.

(I don’t get any young ladies introducing my train videos either.)

You’re not going to the right place…(https://www.largescalecentral.com/externals/tinymce/plugins/emoticons/img/smiley-wink.gif)

Embed code from video playing in MS Edge browser:

Aha! The <div comes from using Firefox - here’s the latter:

That first set of code is all you need.

Ken Brunt said:

I think you’re making it more complicated than it has to be.

Copy the code above the “young lady” and open the “Insert/edit video” box, you should get an “Embed” label above it and click on that. That’s where you paste that code into.

(I don’t get any young ladies introducing my train videos either.)

You’re not going to the right place…(https://www.largescalecentral.com/externals/tinymce/plugins/emoticons/img/smiley-wink.gif)

Ken, you are missing my point. The simple way we all use to embed videos is fine, but for some reason Youtube has added more embed code when you use Firefox, including this “div” statrement. When you edit or delete a video post you get strange results - if it came from a Firefox session.

If I continue to use Forefox, I will have to do something complicated like going in to the html editor and removing the div statement. Guess I could do it at the embed time.

Naw - the Firefox code is still causing trouble - the embedded video is all over the place and too wide. Can’t see the Edit link so I can’t change it.

Hmm . . can’t get at those last 2 posts. Let’s try a simple embed from an Edge browser.

Pete,

I don’t know what browser Ken is using but I am using Firefox v60.0.1 (64 bit) and everything works like Ken and I have said. You seem to be the ONLY member having this problem. What does this tell us? (https://largescalecentral.com/externals/tinymce/plugins/emoticons/img/smiley-undecided.gif)

Joe Zullo said:

Pete,

I don’t know what browser Ken is using but I am using Firefox v60.0.1 (64 bit) and everything works like Ken and I have said. You seem to be the ONLY member having this problem. What does this tell us? (https://largescalecentral.com/externals/tinymce/plugins/emoticons/img/smiley-undecided.gif)

You tell me. I tried it on a different video - thinking maybe mine were the problem. I’m also on FF 60.0.1 (64-bit).

This one posted at a reasonable size.

Pete,

I have been playing with embed codes for some of the videos you embedded that are HUGE. Are you copying the embed code from the full screen version? When I do that it yields a very large size video that probably has been messing up your posts. I still do not get the div stuff in the embed code though. Let me see if it is getting in there from the LSC software trying to handle the enormous video size.

Let us see what happens here.