@@ -15,8 +15,7 @@ import { ClientService } from './services/client.service';
1515import { RecordService } from './services/record.service' ;
1616import { User } from '../types/user' ;
1717import { SetVideoQualityDto } from './dto/set-video-quality.dto' ;
18- import { IApiClient } from 'src/common/clients/api-client.interface' ;
19- // import axios from 'axios';
18+ import { IRecordClient } from 'src/common/clients/record-client.interface' ;
2019
2120@Injectable ( )
2221export class SfuService {
@@ -29,17 +28,14 @@ export class SfuService {
2928 private readonly recordService : RecordService ,
3029 private readonly clientService : ClientService ,
3130 private readonly configService : ConfigService ,
32- @Inject ( 'API_CLIENT ' )
33- private readonly apiClient : IApiClient ,
31+ @Inject ( 'RECORD_CLIENT ' )
32+ private readonly recordClient : IRecordClient ,
3433 ) { }
3534
3635 async createRoom ( clientId : string , user : User ) {
3736 const room = await this . roomService . createRoom ( ) ;
38- // await axios.post(`${this.configService.get('RECORD_SERVER_URL')}/thumbnail`, {
39- // roomId: room.id,
40- // });
4137
42- this . apiClient . post ( ` ${ this . configService . get ( 'RECORD_SERVER_URL' ) } /thumbnail` , { roomId : room . id } ) ;
38+ await this . recordClient . post ( ' /thumbnail' , { roomId : room . id } ) ;
4339
4440 const thumbnail = `${ this . configService . get ( 'PUBLIC_RECORD_SERVER_URL' ) } /statics/thumbnails/${ room . id } .jpg` ;
4541 await this . broadcasterService . createBroadcast (
0 commit comments