Jump to content
  • 0

Does ams videojs-webrtc-plugin support playing in cluster mode ?


rahul7827
 Share

Question

Hello Team

Hope you are doing well as always.

Currently I am facing issue in the player side, I am using the Initial version of AMS videojs-webrtc player, where configurations are accepted as :

this.options.mediaServerUrl = options.streamUrl.split('?')[0];
this.options.streamName = this.getUrlParameter('streamId');
this.options.token = this.getUrlParameter('token');
this.options.subscriberId = this.getUrlParameter('subscriberId');
this.options.subscriberCode = this.getUrlParameter('subscriberCode');

this.webRTCAdaptor = new WebRTCAdaptor({
	      websocketUrl: this.options.mediaServerUrl,

In the player side I am doing this like :

    const rooms = "wss://Domain.tld/AppName/websocket?target=origin&streamId="+this.room;
    const iceServers = '[ { "urls": "stun:stun1.l.google.com:19302" } ]';

        const examplePlayer  = this.player;
        const streamUrl = rooms
        
        if (window.antmediaWebrtc) {
          window.antmediaWebrtc.webRTCAdaptor.stop(window.antmediaWebrtc.options.streamName)
          return window.antmediaWebrtc.initiateWebRTCAdaptor({
            streamUrl,
            iceServers,
          });
        }

While debugging videojs-antmedia-webrtc.js I found "this.options.mediaServerUrl = options.streamUrl.split('?')[0];"

Due to which my websocket url parameter "target=origin" is ignored, and i am getting error "websocket connection failed".

 

Also in the latest version (AMS videojs, not tried as of now) i found this :

ws://[ant-address]/[app]/[streamId].webrtc?token=[token(opt)]&subscriberId=[subscriberId(opt)]&subscriberCode=[TOTP-code(opt)]

Here also target parameter is missing.

 

Query :

1. If i upgrade to the latest videojs player, Would the problem would be auto fixed or we have to customize target params in the videojs-antmedia-webrtc.js. (Upgrading to the latest version would be painful, bcz a lot of testing would required in staging and production environment).

2. Can we customize the target params in the first version of videojs player, will it work ?

Link to comment
Share on other sites

  • Answers 1
  • Created
  • Last Reply

Top Posters For This Question

Top Posters For This Question

1 answer to this question

Recommended Posts

 Share

×
×
  • Create New...