之前解决这个问题都是通过js的attr赋值解决的,但是也一直不明白为什么audio直接在HTML中赋值报错。解决方法就是通过添加$sce过滤效果

app.filter("trustUrl", ['$sce', function ($sce) {
        return function (recordingUrl) {
            return $sce.trustAsResourceUrl(recordingUrl);
        };
    }]);


<audio src="{{Your_URL | trustUrl}}" audioplayer controls></audio>

相关文章:

  • 2022-12-23
  • 2021-05-17
  • 2022-01-25
  • 2021-05-28
  • 2022-12-23
  • 2021-05-18
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-08-04
  • 2021-07-22
  • 2021-08-01
  • 2021-12-31
  • 2022-12-23
相关资源
相似解决方案