Name is required.
Email address is required.
Invalid email address
Answer is required.
Exceeding max length of 5KB

Audio Data (eqData, peakData, waveformData)


Is it possible with the JS-API to get the eqData, peakData and the waveformData from an audio incoming signal over the flash player?
Is it possible to see this feature in a further version of jwplayer?


I ask, while the audio only option is better with a graphical output, except a poster image or an animation thats not sync to the audio. In flash 9+ it is possible and easy to implement this feature and bring it to the JV-Bridge.

If it possible and/or planed in a further version, i prefer to see it as:

jwplayer.setup({
whilePlaying : function(){

var leftPeak = this.peakData.left; // volume peak level
var rightPeak = this.peakData.right; // volume peak level

for(var i=0;i<256;i++){
var leftEQ = this.eqData.left[i]; // as array(256)
var rightEQ = this.eqData.right[i]; // as array(256)
}

for(var i=0;i<256;i++){
var leftPeak = this.waveformData.left[i]; // as array(256)
var rightPeak = this.waveformData.right[i]; // as array(256)
}
}
});


I hope this will come :-)

7 Community Answers

developer

User  
0 rated :

Oh, it should call - onWhilePlaying - it is an Event

and the interval to push the data (read the stream buffer and process in flash to the JS-API) should 50ms or individual settings depending on cpu-power.


thx

Ethan Feldman

JW Player Support Agent  
0 rated :

I’m afraid we do not expose this sort of data through our APIs.

developer

User  
0 rated :

for eqData and waveformData watch the documentation:
http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/media/SoundMixer.html

and here the functions:

this.waveformData=null;
this.eqData=null;
public function getWaveformData():void
{
flash.media.SoundMixer.computeSpectrum(this.waveformData, false, 0);
this.waveformDataArray = [];
var loc1:*=0;
var loc2:*=this.waveformData.length / 4;
while (loc1 < loc2)
{
this.waveformDataArray.push(int(this.waveformData.readFloat() * 1000) / 1000);
++loc1;
}
return;
}

public function getEQData():void
{
flash.media.SoundMixer.computeSpectrum(this.eqData, true, 0);
this.eqDataArray = [];
var loc1:*=0;
var loc2:*=this.eqData.length / 4;
while (loc1 < loc2)
{
this.eqDataArray.push(int(this.eqData.readFloat() * 1000) / 1000);
++loc1;
}
return;
}



for leftPeak and rightPeak watch the documentation:
http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/media/SoundChannel.html



hope this helps

developer

User  
0 rated :

please let me know, if it possible to integrate ;-)

Ethan Feldman

JW Player Support Agent  
0 rated :

You can always add this as a plugin:

https://github.com/jwplayer/jwplayer-sdks/tree/master/jw6-plugin-sdk

Or add to the source directly:

https://github.com/jwplayer/jwplayer

developer

User  
0 rated :

ok, i will try ;-)


thx for your support

Ethan Feldman

JW Player Support Agent  
0 rated :

np

This question has received the maximum number of answers.