setup method

void setup(
  1. AudioTracks trackListToWrap
)

Method to setup the AudioTrack event listeners on a TextTrack list (AudioTracks).

Implementation

void setup(AudioTracks trackListToWrap) {
  _wrappedTrackList = trackListToWrap;
  innerList = trackListToWrap;

  _wrappedTrackList?.addEventListener(AudioTracksEventTypes.ADDTRACK, forwardingkEventListener);
  _wrappedTrackList?.addEventListener(AudioTracksEventTypes.REMOVETRACK, forwardingkEventListener);
  _wrappedTrackList?.addEventListener(AudioTracksEventTypes.CHANGE, forwardingkEventListener);
}