Wildhoney / ngVideo

Modularised ~13KB HTML5 audio/video implementation using Angular.js
http://ng-video.herokuapp.com/
MIT License
227 stars 60 forks source link

Video list needs an empty function #30

Open ace007 opened 9 years ago

ace007 commented 9 years ago

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 commented 9 years ago

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

chwagssd commented 9 years ago

@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 commented 9 years ago

BTW - thanks for this great directive!

adamsea commented 9 years ago

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

britneydossett commented 8 years ago

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

DoubleRound commented 7 years ago

I also encountered this problem。