Request protected audio source with videogular

293 views Asked by At

i'm currently trying to fetch some audio ressources from my back-end which need a JWT on each request, and i can't disable the security, most of the audio file are from private meeting.

The probleme is that i can't find where to set the header field i need on videogular request ...

I already set the header on all route with $httpProvider and angular-jwt.

angular.module('bnApp').config(['$compileProvider', '$httpProvider', 'jwtInterceptorProvider', 
function ($compileProvider, $httpProvider, jwtInterceptorProvider) {
    $compileProvider.debugInfoEnabled(true);

    jwtInterceptorProvider.tokenGetter = [function() {
        return localStorage.getItem('token');
    }];
    $httpProvider.interceptors.push('jwtInterceptor');
}]);

But this doesn't seems to work for the audio file.

Hope this is enough information ...

thank you

0

There are 0 answers