GithubHelp home page GithubHelp logo

Comments (10)

cristiano-belloni avatar cristiano-belloni commented on July 21, 2024

+1

from angular-media-player.

colthreepv avatar colthreepv commented on July 21, 2024

I would be happy to help, but add more details to the report.. this happens in normal pages or when navigating away views? (ex: using ui-router)

in the latter case a plunkr can be made up and would be really helpful to track down the issue

from angular-media-player.

cristiano-belloni avatar cristiano-belloni commented on July 21, 2024

navigating views, I'm fairly sure the culprit is scope.$on('$destroy', player.$destroy);

from angular-media-player.

cristiano-belloni avatar cristiano-belloni commented on July 21, 2024

Sorry, my error message was different. Will open a new issue.

from angular-media-player.

cristiano-belloni avatar cristiano-belloni commented on July 21, 2024

Managed to create a plkr for this bug (which seems somehow related to #38): http://plnkr.co/edit/6Ji1TtT10JyBe8GsQutc?p=preview

How to reproduce:
Click the /bug view link, then go back to the / view. See the TypeError: Cannot read property '$$destroyed' of null message.

from angular-media-player.

cristiano-belloni avatar cristiano-belloni commented on July 21, 2024

I suspect this happens everytime on scope destruction, but it is not easily seen because most scopes don't get destroyed during the lifetime of an angular app.

from angular-media-player.

sqrter avatar sqrter commented on July 21, 2024

+1

from angular-media-player.

joe-schorn avatar joe-schorn commented on July 21, 2024

+1

from angular-media-player.

colthreepv avatar colthreepv commented on July 21, 2024

Okey, coming back after some time to the lib, I think I am a douche.
player.$destroy was a method of the player in previous versions to clear the event listeners attached to the directive element.

I don't think it's necessary anymore, since if the element gets removed from the DOM, the event listeners attached to the DOM EL gets garbage collected.

So I assume I'll just remove the call and not try to fix it with something working.

To check if I did something wrong I'll have to profile the memory when creating/destroying multiple media player directives

from angular-media-player.

 avatar commented on July 21, 2024

Sorry, I've been experiencing this error and haven't really seen the solution in the thread. Any suggestions?

from angular-media-player.

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.