UNPKG

@inworld/web-core

Version:
29 lines (28 loc) 704 B
import { Player } from './player.js'; export class InworldPlayer { constructor(props) { this.player = Player.getInstance(); this.grpcAudioPlayer = props.grpcAudioPlayer; } getMute() { return this.grpcAudioPlayer.getMute(); } mute(mute) { this.grpcAudioPlayer.mute(mute); } async stop() { return this.grpcAudioPlayer.stop(); } clear() { this.grpcAudioPlayer.clearQueue(); } playWorkaroundSound() { this.player.playWorkaroundSound(); } isActive() { return this.grpcAudioPlayer.getIsActive(); } hasPacket(props) { return this.grpcAudioPlayer.hasPacketInQueue(props); } }