To the best of my knowledge and of reading the source, there is no event to tell when all audio files in a playlist have completed.
I know the playlist can be updated on the fly, so that this event could be fired multiple times, but I think it could be really useful.
Do you have any suggestions on how I could improve this or the source code itself?
$scope.$watch("audio1.currentTrack", function(currentTrackNumber) {
if (!$scope.audio1) return;
if (currentTrackNumber == $scope.audio1.tracks) {
var deregister = $scope.$on("narrationPlayer:pause", function(scope, currentlyPlaying) {
if (!currentlyPlaying) {
//allPlayedEvent()
deregister();
}
});
}
});