The forum of the forums
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Embed Video

4 posters

Go down

Solved Embed Video

Post by Simone Boi November 26th 2020, 12:15 am

Hi! First of all thanks a lot for your help, your tutorials are superb.
Now, my pain is with the embed video for streamable, a very nice hosting short video.
I have the automatic embed video for youtube and dailymotion on my forum, but i don't know how to make the streamable videos do the same.
Sorry for my bad english, my question is: How can the streamable videos embed in my topics?


Last edited by Simone Boi on November 28th 2020, 11:52 am; edited 1 time in total
avatar
Simone Boi
Forumember

Posts : 90
Reputation : 2
Language : Italian

https://gamespledge.forumattivo.com/

Back to top Go down

Solved Re: Embed Video

Post by SLGray November 26th 2020, 1:46 am

You will have to get the share coding from the video and post it on your forum.  Also you will have to enable HTML for the whole forum.


Embed Video Slgray10

When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.
SLGray
SLGray
Administrator
Administrator

Male Posts : 51554
Reputation : 3524
Language : English
Location : United States

https://forumsclub.com/gc/128-link-directory/

Back to top Go down

Solved Re: Embed Video

Post by Simone Boi November 26th 2020, 7:49 am

No chance to add an iframe code to just put the "naked" link in a topic like for youtube and dailymotion?
avatar
Simone Boi
Forumember

Posts : 90
Reputation : 2
Language : Italian

https://gamespledge.forumattivo.com/

Back to top Go down

Solved Re: Embed Video

Post by Jucarese November 26th 2020, 11:09 am

Most of the web page players already deliver an <iframe> code in their videos, you just have to look for it in another way, you must create it by hand and insert it in your theme.
I use this Javascript for autoembedding youtube videos, I only place the url of the youtube video in the theme and the script does the embed:
Code:

    jQuery(function(){

    var ancho = "560";
    var alto = "315";
   
    jQuery('.postbody a[href*="youtube.com/watch"]').each(function(){
    var ytid = jQuery(this).attr('href').split("v=")[1].split("&")[0];                               
    jQuery(this).html("<iframe width="+ancho+" height="+alto+" src=https://www.youtube.com/embed/"+ytid+" frameborder=0 allowfullscreen></iframe><br>"); 
    });
   
    jQuery('.postbody a[href*="youtu.be/"]').each(function(){
    var ytid = jQuery(this).attr('href').split("youtu.be/")[1].split("?")[0];                               
    jQuery(this).html("<iframe width="+ancho+" height="+alto+" src=https://www.youtube.com/embed/"+ytid+" frameborder=0 allowfullscreen></iframe><br>"); 
    });   
    });

only just put the simple youtube url https://youtu.be/GfR3VP8cmrA and the script will do the rest.
when creating the JS place it in the topics.

»Administration Panel> Modules> HTML & JAVASCRIPT> Management of JavaScript codes
Position: In topics
Jucarese
Jucarese
Hyperactive

Male Posts : 2552
Reputation : 120
Language : spanish
Location : SSF Admin

http://asistencia.foroactivo.com/u23082

TonnyKamper and The Last Outlaw like this post

Back to top Go down

Solved Re: Embed Video

Post by Simone Boi November 28th 2020, 11:51 am

I solved in this way thanks to MattiaDes from another forum

Code:
$(function() {
    $('.postbody a[href*="streamable.com"]').each(function() {
        var ytid = $(this).attr('href').split("streamable.com/")[1].split("?")[0];
        $(this).html("<div style='width: 100%; height: 0px; position: relative; padding-bottom: 56.250%;'><iframe src=https://www.streamable.com/e/" + ytid + " frameborder=0 allowfullscreen style='width: 100%; height: 100%; position: absolute;'></iframe></div><br />")
    });
});

Thank you guys!
avatar
Simone Boi
Forumember

Posts : 90
Reputation : 2
Language : Italian

https://gamespledge.forumattivo.com/

Back to top Go down

Solved Re: Embed Video

Post by skouliki November 28th 2020, 1:55 pm

Please do not open similar threads to multiple support forums.
Please read our forum rules: ESF General Rules

https://aiuto.forumattivo.it/t20560-video-embed-in-topic


Problem solved & topic archived.
Please read our forum rules: ESF General Rules
skouliki
skouliki
Manager
Manager

Female Posts : 15391
Reputation : 1709
Language : English,Greek
Location : Greece

http://iconskouliki.forumgreek.com

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum