core/js/lib/jquery/plugins/fullpage/fullpage.js
/**
        * Plays video and audio elements.
        */
Plays video and audio elements.
Plays video and audio elements .
function playMedia(destiny) {
            var panel = getSlideOrSection(destiny);
            panel.find('video, audio').each(function () {
                var element = $(this).get(0);
                if (element.hasAttribute('data-autoplay') && typeof element.play === 'function') {
                    element.play();
                }
            });
            panel.find('iframe[src*="youtube.com/embed/"]').each(function () {
                var element = $(this).get(0);
                if (element.hasAttribute('data-autoplay')) {
                    playYoutube(element);
                }
                element.onload = function () {
                    if (element.hasAttribute('data-autoplay')) {
                        playYoutube(element);
                    }
                };
            });
        }
function playMedia ( destiny ) { var panel = getSlideOrSection ( destiny ) ; panel . find ( 'video, audio' ) . each ( function ( ) { var element = $ ( this ) . get ( 0 ) ; if ( element . hasAttribute ( 'data-autoplay' ) && typeof element . play === 'function' ) { element . play ( ) ; } } ) ; panel . find ( 'iframe[src*="youtube.com/embed/"]' ) . each ( function ( ) { var element = $ ( this ) . get ( 0 ) ; if ( element . hasAttribute ( 'data-autoplay' ) ) { playYoutube ( element ) ; } element . onload = function ( ) { if ( element . hasAttribute ( 'data-autoplay' ) ) { playYoutube ( element ) ; } } ; } ) ; }
Plays video and audio elements.
Plays video and audio elements .
//playing HTML5 media elements //youtube videos //in case the URL was not loaded yet. On page load we need time for the new URL (with the API string) to load.