Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

playing videos with stepenter #385

Closed
ovitor opened this issue Apr 10, 2014 · 2 comments
Closed

playing videos with stepenter #385

ovitor opened this issue Apr 10, 2014 · 2 comments

Comments

@ovitor
Copy link

ovitor commented Apr 10, 2014

Hi! I'm playing html videos with stepenter event. Looks very good. But the slide will run all day in loop.
After sometime, I have got a delay, between the step enter and the video starting.
I read about a delay that is applicable in step on file impress.js. But I didn't see where I can use it here or if this is the solution to my problem.

This function I use to start video.

function startVideo() {
    document.addEventListener('impress:stepenter', function(e) {
        var slideContent = e.target.getAttribute('data-content');
        if (slideContent == 'video') {
            var videoPlayer = document.getElementsByClassName('active')[0].firstElementChild;
            videoPlayer.play();
        };
    });
}

And this one I use to get step duration.

function setSlideDuration() {
    document.addEventListener('impress:stepenter', function(e) {
        if (typeof timing !== 'undefined') clearInterval(timing);
        var duration = (e.target.getAttribute('data-content-duration') ? e.target.getAttribute('data-content-duration') : 2000); 
        timing = setInterval(slider.next, duration);
    });
}

How can I prevent this delay to occur.

@FagnerMartinsBrack
Copy link
Member

FagnerMartinsBrack commented Apr 14, 2016

Hi @vitorcarvalhoml , in an effort to clear up older issues/PRs we are pinging back to know if you are still tracking this request.

To give a little bit of context, recently a decision was made in the project to make the development more active and the first task is to clear up older issues like this one to see if the OP is still interested in keep it going.

@ovitor
Copy link
Author

ovitor commented Apr 14, 2016

Hi @FagnerMartinsBrack great to hear! Good news to the project. But I'm no longer looking into this. So we can close it!

@ovitor ovitor closed this as completed Apr 14, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants