Okay
  Public Ticket #312977
Custom thumbnail image for youtube video embed not work in salient theme, please help!
Closed

Comments

  • Trisquelmedia started the conversation

    This code not run in salient theme, when i click in the thumbnail video dissapears, this is the code:

    <div onclick="this.nextElementSibling.style.display='block'; this.style.display='none'">
    <img src="http://pretqm.com/elpoderdelanata/wp-content/uploads/image-base-videos-youtube.png" style="cursor:pointer" />
    </div>
    <div style="display:none">
    <!-- Embed code here -->
    <iframe width="560" height="315" src="//www.youtube.com/embed/F57P9C4SAW4?rel=0" frameborder="0" allowfullscreen></iframe>
    </div>


  •  8,452
    Tahir replied

    Hey!

    Are you using the RAW HTML page element in Visual Composer ? .

    Thanks 


    ThemeNectar Support Team 

  • Trisquelmedia replied

    Hi:

    Yes, i try to put that code on "classic editor" HTML code and also in "Visual Composer " Raw HTML , te result is the same , when i click in the tumbnail , video dissapear and it isnt played..

    It isnt a code problem because runs perfectly in other wordpress themes

    Thanks


  •  8,452
    Tahir replied

    Can you provide the page url also could you allow us to log in so we can check on this for you more?. 

    Thanks 


    ThemeNectar Support Team 

  •   Trisquelmedia replied privately
  •  8,452
    Tahir replied

    Hey!

    It seems to be working fine on my end in Chrome Win7 ? . Which browser are you testing in ? . See screenshot: http://prntscr.com/53km7v .

    Thanks 


    ThemeNectar Support Team 

  • Trisquelmedia replied

    not work for me in my 4 machines in all the browsers ( Chrome, Firefox and Explorer) all plugins in the browsers are deactivated

  •  8,452
    Tahir replied

    Make sure you can view the Youtube embeded videos ? . Try embedding one the normal way in the same page. 

    Thanks


    ThemeNectar Support Team 

  • Trisquelmedia replied

    Yes, and runs perfectly, the youtube code:

    <iframe width="560" height="315" src="//www.youtube.com/embed/F57P9C4SAW4?rel=0" frameborder="0" allowfullscreen></iframe>

    In the example page (http://www.pretqm.com/salient/?p=4) , you can see, the first video with the code of the custom thumbnail that when i click in the thumbnail dissapear (only happen in this theme) and the second video is a embed normal way without thumbnail that it runs perfect.. the difference between the two codes are that custom thumbnail has a previous <div> with an event "onclick" , this is neccesary for put a custom thumbnail image, but in salient theme dont work..why??


    Thxs

  •  8,452
    Tahir replied

    Hey!

    It seems to be working alright on my computer so i dont think its a theme issue. See screenshot before click : http://prntscr.com/53wkmg and after click http://prntscr.com/53wktl . Can you try on another computer ? . 

    Thanks 


    ThemeNectar Support Team 

  • Trisquelmedia replied

    yes, i try in 3 differents computers and in all the result is the same (with other themes in my computers run perfectly), when i click on the thumbnail, video dissapears. i have the screenshot before and after clicking (wihth firebug) , so you can take a look

    before clicking:

    http://prntscr.com/54vo26

    after clicking:

    http://prntscr.com/54vo7l

    After clicking <div> display: none in my screenshot why??


  • Trisquelmedia replied

    in smartphones the behaivour is the same....


  •  992
    ThemeNectar replied

    Hey,

    The problem is coming from the fact the iframe is hidden on page load so the responsive video calculations are not getting made. Add this into the custom css box located in your Salient Options panel to remove that:

    .iframe-embed iframe, iframe {
        height: auto !important;
        max-width: 100%;
        opacity: 1 !important;
        width: 100% !important;
    }
    
  • Trisquelmedia replied

    Hi!

    Thxs a lot, works!! but there is a height problem, not run well, height: auto in big screens , and if i put for example height: 522px in small screens dont see well , 

    ignore the iframe proportions,

    ¿how i can fix it?

    you can see it:

    http://www.pretqm.com/salient/?p=4



  •  992
    ThemeNectar replied

    Hey again! Could you allow me to log in so I can make a quick adjustment to one of the theme scripts?

  • Trisquelmedia replied

    yes of course!

  •  992
    ThemeNectar replied

    Just added a fix in for you :)

  • Trisquelmedia replied

    Thxs a lot!