Skip to content

Commit

Permalink
fix web issues
Browse files Browse the repository at this point in the history
  • Loading branch information
itzTheMeow committed Sep 14, 2023
1 parent 98d00eb commit 508ca2f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion voice/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@revkit/voice",
"version": "0.0.7",
"version": "0.0.8",
"description": "Voice support for browser/node using revkit-based clients.",
"main": "dist/cjs/index.js",
"module": "dist/es6/index.js",
Expand Down
6 changes: 3 additions & 3 deletions voice/src/VoiceClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -281,13 +281,13 @@ export class VoiceClient<
if (!this.recvTransport) throw new Error("Receive transport undefined");
const consumers = this.consumers.get(userId) || {};
const consumerParams = await this.signaling.startConsume(userId, type);
const consumer = await this.recvTransport.consume(consumerParams);
const consumer = <MSC["Consumer"]>await this.recvTransport.consume(consumerParams);
switch (type) {
case "audio":
if (this.deafened) consumer.pause();
consumers.audio = {
consumer: <any>consumer,
callback: this.consumeTrack(type, <any>consumer),
consumer: consumer,
callback: this.consumeTrack(type, <MSC["MediaStreamTrack"]>consumer.track),
};
}

Expand Down
2 changes: 1 addition & 1 deletion voice/src/browser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export default class VoiceClient extends BaseVoiceClient<"browser"> {
public async play(type: ProduceType, track?: MediaStreamTrack | string) {
switch (type) {
case "audio": {
if (!this.audioProducer) throw "No audio producer.";
if (this.audioProducer) throw "Already producing audio.";

try {
if (!(track instanceof MediaStreamTrack)) {
Expand Down

0 comments on commit 508ca2f

Please sign in to comment.