|
@@ -26,15 +26,14 @@ export class LinkPageComponent implements OnInit {
|
|
|
room?: Parse.Object;
|
|
|
isFollow: boolean = false;
|
|
|
showTool: boolean = true; // 是否显示工具栏
|
|
|
- audio: boolean = false; //是否关闭音频
|
|
|
- camera: boolean = false; //是否切换摄像头
|
|
|
- mute: boolean = false; //是否静音
|
|
|
+ // camera: boolean = false; //是否切换摄像头
|
|
|
+ // mute: boolean = false; //是否静音
|
|
|
constructor(
|
|
|
public toastController: ToastController,
|
|
|
private loadingCtrl: LoadingController,
|
|
|
private alertController: AlertController,
|
|
|
private activateRoute: ActivatedRoute,
|
|
|
- private liveService: LiveService
|
|
|
+ public liveService: LiveService
|
|
|
) {}
|
|
|
|
|
|
ngOnInit() {
|
|
@@ -105,12 +104,21 @@ export class LinkPageComponent implements OnInit {
|
|
|
/* 直播状态 */
|
|
|
onChangeLiveStatus(e: any, type: string) {
|
|
|
e.cancelBubble = true;
|
|
|
- if (type == 'audio' || type == 'camera' || type == 'mute') {
|
|
|
- this[type] = !this[type];
|
|
|
+ switch (type) {
|
|
|
+ case 'audio':
|
|
|
+ this.liveService.updatePublishedAudioTrack();
|
|
|
+ break;
|
|
|
+ case 'camera':
|
|
|
+ break;
|
|
|
+ case 'mute':
|
|
|
+ break;
|
|
|
}
|
|
|
+ // if (type == 'audio' || type == 'camera' || type == 'mute') {
|
|
|
+ // this.liveService.tools[type] = !this.liveService.tools[type];
|
|
|
+ // }
|
|
|
}
|
|
|
/* 结束直播 */
|
|
|
- async endCall(e: any){
|
|
|
+ async endCall(e: any) {
|
|
|
e.cancelBubble = true;
|
|
|
const alert = await this.alertController.create({
|
|
|
cssClass: 'my-custom-class',
|
|
@@ -123,7 +131,7 @@ export class LinkPageComponent implements OnInit {
|
|
|
cssClass: 'secondary',
|
|
|
handler: (blah) => {
|
|
|
console.log('Confirm Cancel: blah');
|
|
|
- this.onExit()
|
|
|
+ this.onExit();
|
|
|
},
|
|
|
},
|
|
|
{
|