ngOnDestroy method
Executed before the directive is removed from the DOM and destroyed.
See OnDestroy
for a full description.
Implementation
@override
void ngOnDestroy() {
_onReady.close();
_onStateChange.close();
_onPlaybackQualityChange.close();
_onPlaybackRateChange.close();
_onError.close();
_onApiChange.close();
_player?.destroy();
_player = null;
}