Skip to content

Streaming without Dash + why does the channel merger use channels * 2 inputs? #1

Open
@Avnerus

Description

@Avnerus

Hi!
Thank you for open-sourcing your work.
I and @splnlss @NYTimesR&D have been experimenting with the Web Audio client and were able to migrate the web client in this repo to the legacy player. Instead of preloading the audio files or using a Dash server, we can now use the client via a standard <audio> MediaElementSource with 8 channels, so streaming is done natively. Do you foresee any problems with this solution?
I also have a question about the code, specifically this line:

const merger = context.createChannelMerger(channels * 2);

So if my audio file has 8 channels, this merger will have 16 input channels. However all of the connections to the merger are done via two channels in here:

gain.connect(merger, 0, position === -1 ? 0 : 1);

Could you help me understand how this works?
Thank you!
/Avner

Metadata

Metadata

Labels

documentationImprovements or additions to documentationenhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions