Coder Social home page Coder Social logo

Comments (7)

fcontreras avatar fcontreras commented on August 29, 2024

I have seen that video behaviour. Since we keep three pages in memory it will stop only after you turn 2 pages away. There is a simple solution though, add a javascript listener to the window so when it looses the focus it stop the video.

Here is an example using jquery:

//Should pause the videos if the page looses the focus
    window.addEventListener("blur", function() {
        jQuery("video").each(function() {
            var vid = jQuery(this);
            if (!vid[0].paused) {
                vid[0].pause();
            }
        });
    }, true);

from baker-android-refactor.

selini avatar selini commented on August 29, 2024

ok i will try it. Any suggestions why the the GIFs are stopping?

from baker-android-refactor.

selini avatar selini commented on August 29, 2024

it worked. thanks :)

from baker-android-refactor.

fcontreras avatar fcontreras commented on August 29, 2024

Nice, sorry I can't help with the GIF I actually haven't seen that issue, but I let you know if I find something.

from baker-android-refactor.

selini avatar selini commented on August 29, 2024

I tried a single GIF in one page and it worked fine.I guess the problem is that I have too many GIFs and that causing them to stop.Thank you again.If I find a solution I will post it.

from baker-android-refactor.

selini avatar selini commented on August 29, 2024

I find a solution with the GIFs . I Converted them into html5 video.It is smaller from GIFs and I play without problem.There are many online tools for it.

from baker-android-refactor.

fcontreras avatar fcontreras commented on August 29, 2024

Thats great news .. Thanks for posting.

from baker-android-refactor.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.