<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>

<body>
    <audio controls="controls" ></audio><!-- 第一种方式,通过ajax去后台获取文件流, 需要我们拼接获取的流,然后放入audio播放 -->
</body>
<script>
    $.get("http://127.0.0.1:9083/v1/gateway/get", function (data) {
        document.getElementsByTagName("audio")[0].setAttribute("src", "data:audio/wav;base64,"+data.data);
    });
</script>
</html>

  

相关文章:

  • 2021-09-09
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-08-06
  • 2022-12-23
  • 2022-12-23
  • 2021-07-20
猜你喜欢
  • 2021-12-20
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-16
  • 2021-09-21
  • 2022-02-07
相关资源
相似解决方案