makes this work also when hiding and showing player by using ng-if