search

Home  >  Q&A  >  body text

html5 - I have requested a NetEase Cloud song to an online address, how to play it on the web page?

Recently, I am imitating the web of NetEase Cloud Music. The back-end API has been packaged by a big man. You can request the URL address of the song, but the format is in flac format. I don’t know how to play it. On the NetEase Cloud Music website I can’t tell what tag was used to play it. I tried playing with the <audio> tag,
<audio src="http://m10.music.126.net/20170529220027/dd4eae2bff7b91b7c48f687cf1e45728/ymusic/8236/9cde/95b1/5ba5330025c8417b2 b3c804d5dc71acb.flac " controls="controls"></audio>

Then the browser reports an error: 403 (forbidden):

GET http://218.12.233.20/m10.music.126.net/20170529220027/dd4eae2bff7b91b7c48f6…dc71acb.flac?wshc_tag=0&wsts_tag=592c27dd&wsid_tag=745a56c4&wsiphost=ipdbm 403 (Forbidden)
{
data: [
{
id: 347239,
url: "http://m10.music.126.net/20170529223419/fc72c69cbb357b66fada1f9a69fc75d7/ymusic/8e11/f8a0/b8c2/558e6ae83feddf96df0bafcd2b181433.flac",
br: 917669,
size: 32118434,
md5: "558e6ae83feddf96df0bafcd2b181433",
code: 200,
expi: 1200,
type: "flac",
gain: 0.05,
fee: 8,
uf: null,
payed: 1,
flag: 0,
canExtend: false
}
],
code: 200
}

The above is an example of using the song information requested by netizens through the API. It will not be used after getting it back.
How can I request online music resources to be played on the page?

淡淡烟草味淡淡烟草味2735 days ago1016

reply all(1)I'll reply

  • 世界只因有你

    世界只因有你2017-05-31 10:40:23

    Why not check it out on NetEase Cloud Music official website?

    reply
    0
  • Cancelreply