Hide video screen on audio only call streamCreated

You get a video call screen in the app by default for each participant, I only want to see the video of the device itself so for example myself and subscribe to all other audio participants without seeing them as an empty video screen.

I have tried to add the subscriberProperties, but even then the video block in html is available.

this.session.on('streamCreated', (event: StreamEvent) => {
      var subscriberProperties = {insertMode: 'append', subscribeToAudio: true, subscribeToVideo : event.stream.hasVideo};

      const subscriber = this.session.subscribe(event.stream, undefined);

      subscriber.on('streamPlaying', (e: StreamManagerEvent) => {
        this.updateLayout();
        (<HTMLElement>subscriber.videos[0].video).parentElement.classList.remove('custom-class');
      });

      const newUser = new UserModel();
      newUser.setStreamManager(subscriber);
      newUser.setConnectionId(event.stream.connection.connectionId);
      const nickname = event.stream.connection.data.split('%')[0];
      try {
        newUser.setNickname(JSON.parse(nickname).clientData);
      } catch (err) {
        newUser.setNickname(nickname);
      }
      newUser.setType('remote');
      newUser.setUserAvatar(this.openViduSrv.getRandomAvatar());

      this.remoteUsers.push(newUser);
      this.sendSignalUserAvatar(this.localUser);
      this.buttonsVisibility = 'out';
    });

So how can I subscribe to the audio stream without adding something to the html?

If you don’t add any Video or Audio HTML Elements you won’t hear the audio subscribed.

As workaround, you can hide the video element when the videoActive property is set to false throught css.

Here, OpenVidu Call make smaller the video when videoActive is false. You can do the same hiding the video instead.