Skip to main content
embedded youtube videos Started by radu81 · · Read 14285 times 0 Members and 1 Guest are viewing this topic. previous topic - next topic

embedded youtube videos

This is how actually youtube videos are embedded into elkarte:

https://www.youtube.com/watch?v=M7FIvfx5J10

Is there a way to display embedded video like this?

sorry for my bad english

Re: embedded youtube videos

Reply #1

In elk_jquery_embed.js:
Code: (find) [Select]
args = handler(m[2], tag, false);
Code: (replace with) [Select]
args = handler(m[2], tag, true);

FA MALEEE!!! O_O
Bugs creator.
Features destroyer.
Template killer.

Re: embedded youtube videos

Reply #2

Thank you! Problem solved!
sorry for my bad english

Re: embedded youtube videos

Reply #3

Just realize that embedding the video from the start vs just showing a preview image does have additional overhead for the end user.  Meaning it will slow a page load, more videos on a page, the more it has to fetch to be ready.

Re: embedded youtube videos

Reply #4

Quote from: Spuds – Just realize that embedding the video from the start vs just showing a preview image does have additional overhead for the end user.  Meaning it will slow a page load, more videos on a page, the more it has to fetch to be ready.

@Spuds , can we replace the border ( not very cute in my opinion ) and replace it with a base preview image ?

Re: embedded youtube videos

Reply #5

The easiest way to do that is with the custom.css file in your themes base css directory.
Code: [Select]
.elk_videoheader {
display: none;
}
.elk_video {
border: none;
}
add the above to that file and the border and header will go away.

Re: embedded youtube videos

Reply #6

Thanks @Spuds .  Is there any specific use for that frame ?

Re: embedded youtube videos

Reply #7

No not really

The header allows to slide hide the video, that could be done other ways as well.   The "issue" is that the header is a fixed width and really should be dynamically set based on the size of the video that gets embedded.  But with a fixed width it looks pretty silly without the border around the video.

Re: embedded youtube videos

Reply #8

imo, that frame is just to advice users that there is a video, otherwise without the controls from youtube could seem a normal image embedded
sorry for my bad english

Re: embedded youtube videos

Reply #9

Could probably just overlay the play icon on the image as well.

Re: embedded youtube videos

Reply #10

bug?

Code: [Select]
[center]https://www.youtube.com/watch?v=M7FIvfx5J10[/center]

no effect (center)
Sorry for my English

Re: embedded youtube videos

Reply #11

You can try changing the css, not sure if it will have other side effects.   So change .elk_videoheader to
Code: [Select]
.elk_videoheader {
    padding: 0 4px 0 6px;
    /* max-width: 98%; */
    /* width: 630px; */
    border: 1px solid;
}

and .elk_video to
Code: [Select]
.elk_video {
    display: block;
    max-height: 480px;
    /* width: 640px; */
    height: auto;
    border: 1px solid;
    border-top: 0;
}

probably not the effect / result you are after though.

Re: embedded youtube videos

Reply #12

Sorry to necro this thread, but recently found myself having to do the same thing (alignment of embedded video) the best solution i found was to change display: block; to display: inline-block; on the elk_video containers (including videoheader) and now it works with alignment bbc.