Advertisement
Guest User

Untitled

a guest
Nov 24th, 2021
49
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.83 KB | None | 0 0
  1. /**
  2. * IMPORTANT (PLEASE READ THIS):
  3. *
  4. * This is not the "configuration file" of mediasoup. This is the configuration
  5. * file of the mediasoup-demo app. mediasoup itself is a server-side library, it
  6. * does not read any "configuration file". Instead it exposes an API. This demo
  7. * application just reads settings from this file (once copied to config.js) and
  8. * calls the mediasoup API with those settings when appropriate.
  9. */
  10.  
  11. const os = require('os');
  12.  
  13. module.exports =
  14. {
  15. // Listening hostname (just for `gulp live` task).
  16. domain : process.env.DOMAIN || '130.61.168.227',
  17. // Signaling settings (protoo WebSocket server and HTTP API server).
  18. https :
  19. {
  20. listenIp : '0.0.0.0',
  21. // NOTE: Don't change listenPort (client app assumes 4443).
  22. listenPort : process.env.PROTOO_LISTEN_PORT || 4443,
  23. // NOTE: Set your own valid certificate files.
  24. tls :
  25. {
  26. cert : `/home/ubuntu/nginx-selfsigned.crt`,
  27. key : `/home/ubuntu/nginx-selfsigned.key`
  28. }
  29. },
  30. // mediasoup settings.
  31. mediasoup :
  32. {
  33. // Number of mediasoup workers to launch.
  34. numWorkers : Object.keys(os.cpus()).length,
  35. // mediasoup WorkerSettings.
  36. // See https://mediasoup.org/documentation/v3/mediasoup/api/#WorkerSettings
  37. workerSettings :
  38. {
  39. logLevel : 'warn',
  40. logTags :
  41. [
  42. 'info',
  43. 'ice',
  44. 'dtls',
  45. 'rtp',
  46. 'srtp',
  47. 'rtcp',
  48. 'rtx',
  49. 'bwe',
  50. 'score',
  51. 'simulcast',
  52. 'svc',
  53. 'sctp'
  54. ],
  55. rtcMinPort : 10000,
  56. rtcMaxPort : 10100
  57. },
  58. // mediasoup Router options.
  59. // See https://mediasoup.org/documentation/v3/mediasoup/api/#RouterOptions
  60. routerOptions :
  61. {
  62. mediaCodecs :
  63. [
  64. // {
  65. // kind : 'audio',
  66. // mimeType : 'audio/opus',
  67. // clockRate : 48000,
  68. // channels : 2
  69. // },
  70. // {
  71. // kind : 'video',
  72. // mimeType : 'video/VP8',
  73. // clockRate : 90000,
  74. // parameters :
  75. // {
  76. // 'x-google-start-bitrate' : 1000
  77. // }
  78. // },
  79. // {
  80. // kind : 'video',
  81. // mimeType : 'video/VP9',
  82. // clockRate : 90000,
  83. // parameters :
  84. // {
  85. // 'profile-id' : 2,
  86. // 'x-google-start-bitrate' : 1000
  87. // }
  88. // },
  89. // {
  90. // kind : 'video',
  91. // mimeType : 'video/h264',
  92. // clockRate : 90000,
  93. // parameters :
  94. // {
  95. // 'packetization-mode' : 1,
  96. // 'profile-level-id' : '4d0032',
  97. // 'level-asymmetry-allowed' : 1,
  98. // 'x-google-start-bitrate' : 1000
  99. // }
  100. // },
  101. {
  102. kind : 'video',
  103. mimeType : 'video/h264',
  104. clockRate : 90000,
  105. parameters :
  106. {
  107. 'packetization-mode' : 1,
  108. 'profile-level-id' : '42e01f',
  109. 'level-asymmetry-allowed' : 1,
  110. 'x-google-start-bitrate' : 1000
  111. }
  112. }
  113. ]
  114. },
  115. // mediasoup WebRtcTransport options for WebRTC endpoints (mediasoup-client,
  116. // libmediasoupclient).
  117. // See https://mediasoup.org/documentation/v3/mediasoup/api/#WebRtcTransportOptions
  118. webRtcTransportOptions :
  119. {
  120. listenIps :
  121. [
  122. {
  123. ip : '0.0.0.0',
  124. announcedIp : 'MY_PUBLIC_IP',
  125.  
  126. }
  127. ],
  128. // port : 40001,
  129. // enableTcp : true,
  130. initialAvailableOutgoingBitrate : 1000000,
  131. minimumAvailableOutgoingBitrate : 600000,
  132. maxSctpMessageSize : 262144,
  133. // Additional options that are not part of WebRtcTransportOptions.
  134. maxIncomingBitrate : 1500000
  135. },
  136. // mediasoup PlainTransport options for legacy RTP endpoints (FFmpeg,
  137. // GStreamer).
  138. // See https://mediasoup.org/documentation/v3/mediasoup/api/#PlainTransportOptions
  139. plainTransportOptions :
  140. {
  141. listenIp :
  142. [{
  143. ip : '0.0.0.0',
  144. announcedIp : 'MY_PUBLIC_IP',
  145.  
  146. }],
  147. maxSctpMessageSize : 262144
  148. }
  149. }
  150.  
  151. };
  152.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement