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

Video list needs an empty function #30

Open
ace007 opened this issue Apr 2, 2015 · 6 comments
Open

Video list needs an empty function #30

ace007 opened this issue Apr 2, 2015 · 6 comments

Comments

@ace007
Copy link

ace007 commented Apr 2, 2015

Hi,
The video object is an angular service which means that there is only 1 instance of the object and it survives for the duration of my page.
Every time I navigate to a page to play a video and use addSource to add a video the video is added to the top of ngVideoPlaylist array and the array keeps getting bigger.

I have added the following to the video object
service.resetSource = function clearSource(){
// clear the array of items to play
ngVideoPlaylist.length = 0;
}
This allows me to reset the list when I need to.

@Wildhoney
Copy link
Owner

Yep, I'm working on an alternative to the service approach, as I know it's an issue 👍

@chwagssd
Copy link

chwagssd commented Aug 7, 2015

@ace007 's solution to just expose a method resetSource is at least a good temporary fix you might consider adding in for the time being

@chwagssd
Copy link

chwagssd commented Aug 7, 2015

BTW - thanks for this great directive!

@adamsea
Copy link

adamsea commented Sep 22, 2015

Any progress on this? I'm dealing with the same issue in an app I'm working on. Thanks!

@britneydossett
Copy link

Thank you for this. I've been trying to fix this issue for hours.

@DoubleRound
Copy link

I also encountered this problem。

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

6 participants