add method

void add(
  1. Media source
)
inherited

Appends Media to the Playlist of the Player instance.

Implementation

void add(Media source) {
  final sourceMediaTypeCStr = source.mediaType.toString().toNativeUtf8();
  final sourceResourceCStr = source.resource.toString().toNativeUtf8();
  PlayerFFI.add(
    id,
    sourceMediaTypeCStr,
    sourceResourceCStr,
  );
  calloc.free(sourceMediaTypeCStr);
  calloc.free(sourceResourceCStr);
}