Open ace007 opened 9 years ago
Yep, I'm working on an alternative to the service approach, as I know it's an issue :+1:
@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
BTW - thanks for this great directive!
Any progress on this? I'm dealing with the same issue in an app I'm working on. Thanks!
Thank you for this. I've been trying to fix this issue for hours.
I also encountered this problem。
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.