Angularjs 使用videogular请求受保护的音频源
我目前正在尝试从后端获取一些音频资源,每个请求都需要一个JWT,我无法禁用安全性,大部分音频文件来自私人会议 问题是,我找不到在videogular请求中设置所需的标题字段的位置 我已经用$httpProvider和angular jwt在所有路由上设置了头Angularjs 使用videogular请求受保护的音频源,angularjs,http,jwt,videogular,json-web-token,Angularjs,Http,Jwt,Videogular,Json Web Token,我目前正在尝试从后端获取一些音频资源,每个请求都需要一个JWT,我无法禁用安全性,大部分音频文件来自私人会议 问题是,我找不到在videogular请求中设置所需的标题字段的位置 我已经用$httpProvider和angular jwt在所有路由上设置了头 angular.module('bnApp').config(['$compileProvider', '$httpProvider', 'jwtInterceptorProvider', function ($compileProvid
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');
}]);
但这似乎对音频文件不起作用
希望这是足够的信息
谢谢你你有没有想过这个问题?不是官方的,这更像是一个解决办法,而不是一个solution@CodingFerret我也有同样的问题,你能解释一下你的解决方法吗?你有没有弄明白这个问题?不是正式的,这更像是一个解决方法而不是一个解决方法solution@CodingFerret我也有同样的问题,你能解释一下你的解决方法吗?