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.
The forum of the forums
4 posters

    Embed Video

    avatar
    Simone Boi
    Forumember


    Posts : 90
    Reputation : 2
    Language : Italian

    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
    SLGray
    SLGray
    Administrator
    Administrator


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

    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.
    avatar
    Simone Boi
    Forumember


    Posts : 90
    Reputation : 2
    Language : Italian

    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?
    Jucarese
    Jucarese
    Hyperactive


    Male Posts : 2551
    Reputation : 119
    Language : spanish
    Location : SSF Admin

    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

    TonnyKamper and The Last Outlaw like this post

    avatar
    Simone Boi
    Forumember


    Posts : 90
    Reputation : 2
    Language : Italian

    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!
    skouliki
    skouliki
    Manager
    Manager


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

    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


      Current date/time is November 11th 2024, 6:21 pm