Possible to analyze streaming audio from Icecast using Web Audio API and createMediaElementSource?

后端 未结 2 1270
忘掉有多难
忘掉有多难 2021-02-04 15:18

Using the Web Audio API and createMediaElement method you can use a typed array to get frequency data from audio playback in an element and it works i

2条回答
  •  别跟我提以往
    2021-02-04 15:43

    It just is not implemented according to the specs in Safari and will return an array of zeroes instead of frequencies for streams. Many people have observed this behaviour, e.g. http://isflashdeadyet.com/tests/web-audio-visualization/index-analyser.html and https://github.com/Okazari/Rythm.js/issues/7

    It is supposted to work according to https://browsersupport.io/AnalyserNode.prototype.getByteFrequencyData

    Here you will find that "Safari [is] seemingly reporting no signal (a value of 128) across the board when requesting byte data on an AnalyserNode": http://fourthof5.com/audio-visualisation-with-the-web-audio-api

    Test the demo here to see the current status: http://fourthof5.com/assets/posts/audio-visualisation-with-the-web-audio-api/index.html

提交回复
热议问题