RoomApi does not make hasVideo false.

ett

Member
- WCS: 5.2.591-54b0ff638d81e3e5350a066f8bf93652816868ac
- wcs-android-sdk-1.1.0.13-10895ac8ee0a1c231a2c4c5e03dab3b3579b223c

I want to publish a stream of only audio in a room.
But I can't make hasVideo false.

Code:
options.setConstraints(new Constraints(true, false));
room.publish(null, options);
Despite specifying Constraints, it sends the following REST request.

Code:
00:13:54,200 INFO            RestClient - API-ASYNC-pool-12-thread-1 SEND REST OBJECT ==>
URL:http://localhost:8081/apps/RoomApp/publishStream
OBJECT:
{
  "nodeId" : "DbnxXbU4HjGDDasKOHLUpHEaG895Za1A@127.0.0.1",
  "appKey" : "roomApp",
  "sessionId" : "/***OMIT***/",
  "mediaSessionId" : "c4f68193-8aa9-461c-86bb-75f8925bc660",
  "name" : "wcs-3vcetu2t8n8",
  "published" : true,
  "hasVideo" : true,    /***EXPECTED: false***/
  "hasAudio" : true,
  "status" : "NEW",
  "record" : false,
  "width" : 0,
  "height" : 0,
  "bitrate" : 0,
  "minBitrate" : 0,
  "maxBitrate" : 0,
  "quality" : 0,
  "history" : false,
  "gop" : 0,
  "fps" : 0,
  "audioBitrate" : 0,
  "codecImpl" : "",
  "transport" : "UDP",
  "cvoExtension" : false,
  "mediaProvider" : "WebRTC",
  "custom" : {
    "name" : "wcs"
  },
  "origin" : null
}
 

ett

Member
But that SDP is correctly audio only.
Only REST CALL seems wrong.


a. options.setConstraints(new Constraints(true, false));
Code:
a=group:BUNDLE audio

  "hasVideo" : true,        /***SHOULD BE false?***/
  "hasAudio" : true,
  "status" : "PUBLISHING",
  "audioCodec" : "opus",
  /***NO KEY "videoCodec"***/
b. options.setConstraints(new Constraints(true, true));
Code:
a=group:BUNDLE audio video

  "hasVideo" : true,
  "hasAudio" : true,
  "status" : "PUBLISHING",
  "audioCodec" : "opus",
  "videoCodec" : "H264",
 

Max

Administrator
Staff member
Good day.
We reproduced the issue and raised internal ticket WCS-2659 to investigate it. We'll let you know results here.
However, it looks like audio only stream is correctly published from Android SDK and can be played from WebSDK Conference example connected to the same room. So, you can just ignore logs.
 

ett

Member
Hi, MAX.
I have another question about hasVideo.
I want to mix and record some audio streams of a Room.

Code:
# flashphoner.properties
record_mixer_streams=true
Code:
CALL:
  /mixer/startup { uri, localStreamName }

OBJECT:
  "sessionId" : "mixer://wcs-7b02bd71-5589-4a73-b08c-3b802b1f1f5a",
  "hasVideo" : false,

CODE:
  options.setConstraints(new Constraints(true, false));
  room.publish(null, options);

RESULT ./records/stream-mixed.mp4:
  Stream #0:0(eng): Audio:
  Stream #0:1(eng): Video:
So, I pass hasVideo:false to /mixer/startup

Code:
CALL:(Add hasVideo:false)
  /mixer/startup { uri, localStreamName, hasVideo: false }

OBJECT:(No diffs)
  "sessionId" : "mixer://wcs-8fe83b1a-d660-44f5-949b-eec9be312b6f",
  "hasVideo" : false,

CODE:(No changes)
  options.setConstraints(new Constraints(true, false));
  room.publish(null, options);

RESULT ./records/stream-mixed.mp4:(EXPECTED!)
  Stream #0:0(eng): Audio:
The result is expected.
However, the hasVideo parameter is NOT documented at mixer/startup
in https://docs.flashphoner.com/display/WCS52EN/API+methods

Is it correct way?
Regards
 

Max

Administrator
Staff member
Good day.
We fixed hasAudio, hasVideo parameters for streams published from Android SDK in Android SDK 1.1 build 1.1.0.22 and Android SDK 1.0 build 1.0.1.75 (for Android 7 and older devices).
 
Top