On Wed, Jun 18, 2014 at 6:38 PM, AirMike <[email protected]> wrote:

> Videochat between agent and client should last at least couple of minutes
> and I can't allow to lose audiolog of conversation if something happens on
> the browser or computer side and that's why I'm using time slice in
> MediaRecorder so every 3 seconds I'm sending recorded audio chunk to the
> server (on the server side I'm appending new recorded chunk to an existing
> recording)
> At first step I've done this only for remote audio and that work.
> Now I need audiolog to have local and remote audio mixed together and I
> have two options (as I seet it):
>     1. mixed them on the client side and send only one chunk of data to
> server
>     2. send two chunks of data (local and remote) and mixed them on the
> server side
>
> I'm not doing any explicit compression but the result of MediaRecorder
> data available is blob of type audio/ogg.
> It seems I can't decode that blob to AudioBuffer so I can mix them using
> Web Audio API to get one blob as a result.
>

Right, if you use the timeSlice option then the individual blobs can't be
decoded individually.

Seems to me you can implement option 1 using Web Audio: create two
MediaStreamAudioSourceNodes, one for the local and one for the remote audio
MediaStreams, mix them together as the input to a
MediaStreamAudioDestinationNode, feed that node's MediaStream into a
MediaRecorder using the timeSlice option, and send the resulting Blobs of
compressed audio to the server. The server can then concatenate the Blobs
to get a complete resource that can be decompressed later.

Rob
-- 
Jtehsauts  tshaei dS,o n" Wohfy  Mdaon  yhoaus  eanuttehrotraiitny  eovni
le atrhtohu gthot sf oirng iyvoeu rs ihnesa.r"t sS?o  Whhei csha iids  teoa
stiheer :p atroa lsyazye,d  'mYaonu,r  "sGients  uapr,e  tfaokreg iyvoeunr,
'm aotr  atnod  sgaoy ,h o'mGee.t"  uTph eann dt hwea lmka'n?  gBoutt  uIp
waanndt  wyeonut  thoo mken.o w
_______________________________________________
dev-media mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-media

Reply via email to