Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • nbiaux Friend
    #200548

    Hi,

    Wich parameters can i use if i want to display correctly a Youtube video ?
    I cannot use button of template and cannot use the mask.

    Thank you.

    TomC Moderator
    #546180

    Where are you wanting to display the video?

    nbiaux Friend
    #546181

    I display my video in home page in a custom content module.
    See an exemple here : http://lacsst.com/maboitedecom/

    i wrote :

    <div class=”video-wrapper”><button class=”btn btn-play”><i class=”fa fa-play”></i></button> <button class=”btn btn-pause”><i class=”fa fa-pause”></i></button><div class=”mask”></div>
    <iframe width=”420″ height=”315″ src=”//www.youtube.com/embed/AiRo3XgD8zM?rel=0″ frameborder=”0″ allowfullscreen></iframe>
    </div>

    but i should remove these lines :
    <button class=”btn btn-play”><i class=”fa fa-play”></i></button> <button class=”btn btn-pause”><i class=”fa fa-pause”></i></button><div class=”mask”></div>

    Thanks.

    TomC Moderator
    nbiaux Friend
    #546230

    Ok thanks… but i know how to embedd a youtube video 🙂 but i’d like to display with the style using class=”mask” and “btn”…
    can you give an exemple with a youtube video in your template.
    Thanks.

    Ninja Lead Moderator
    #546360

    In JA Nuevo template could not support to click youtube button on that, it only works with vimeo video if you are a developer, you can apply the solution for reference here to work with youtube video.

    You can find code is working with vimeo in JA Nuevo template

    + Open templates/ja_nuevo/js/script.js file, find and see


    //video
    var iframe = $('#player1')[0];

    if (iframe) {

    var player = $f(iframe);

    $('.btn-pause').hide();

    player.addEvent('ready', function() {
    player.addEvent('pause', onPause);
    player.addEvent('finish', onFinish);
    });

    // Call the API when a button is pressed
    $('.btn-play').bind('click', function() {
    player.api('play');
    $('.btn-play').hide();
    $('.btn-pause').show();
    });

    $('.btn-pause').bind('click', function() {
    player.api('pause');
    });

    function onPause(id) {
    $('.btn-play').show();
    $('.btn-pause').hide();
    }

    function onFinish(id) {
    $('.btn-play').show();
    $('.btn-pause').hide();
    }

    }

    Hope it helps

Viewing 6 posts - 1 through 6 (of 6 total)

This topic contains 6 replies, has 3 voices, and was last updated by  Ninja Lead 10 years, 3 months ago.

We moved to new unified forum. Please post all new support queries in our New Forum