ue-softphone-sdk 2.2.2 → 2.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api/bye.d.ts +16 -0
- package/dist/api/dtmf.d.ts +15 -0
- package/dist/api/emitter.d.ts +88 -0
- package/dist/api/exceptions/content-type-unsupported.d.ts +8 -0
- package/dist/api/exceptions/index.d.ts +5 -0
- package/dist/api/exceptions/request-pending.d.ts +9 -0
- package/dist/api/exceptions/session-description-handler.d.ts +8 -0
- package/dist/api/exceptions/session-terminated.d.ts +8 -0
- package/dist/api/exceptions/state-transition.d.ts +8 -0
- package/dist/api/index.d.ts +58 -0
- package/dist/api/info.d.ts +16 -0
- package/dist/api/invitation-accept-options.d.ts +19 -0
- package/dist/api/invitation-progress-options.d.ts +38 -0
- package/dist/api/invitation-reject-options.d.ts +25 -0
- package/dist/api/invitation.d.ts +179 -0
- package/dist/api/inviter-cancel-options.d.ts +9 -0
- package/dist/api/inviter-invite-options.d.ts +28 -0
- package/dist/api/inviter-options.d.ts +43 -0
- package/dist/api/inviter.d.ts +236 -0
- package/dist/api/message.d.ts +16 -0
- package/dist/api/messager-message-options.d.ts +11 -0
- package/dist/api/messager-options.d.ts +17 -0
- package/dist/api/messager.d.ts +26 -0
- package/dist/api/notification.d.ts +16 -0
- package/dist/api/notifier.d.ts +8 -0
- package/dist/api/publisher-options.d.ts +33 -0
- package/dist/api/publisher-publish-options.d.ts +6 -0
- package/dist/api/publisher-state.d.ts +21 -0
- package/dist/api/publisher-unpublish-options.d.ts +6 -0
- package/dist/api/publisher.d.ts +65 -0
- package/dist/api/referral.d.ts +38 -0
- package/dist/api/registerer-options.d.ts +46 -0
- package/dist/api/registerer-register-options.d.ts +11 -0
- package/dist/api/registerer-state.d.ts +21 -0
- package/dist/api/registerer-unregister-options.d.ts +16 -0
- package/dist/api/registerer.d.ts +144 -0
- package/dist/api/session-bye-options.d.ts +11 -0
- package/dist/api/session-delegate.d.ts +73 -0
- package/dist/api/session-description-handler-factory.d.ts +15 -0
- package/dist/api/session-description-handler.d.ts +74 -0
- package/dist/api/session-info-options.d.ts +11 -0
- package/dist/api/session-invite-options.d.ts +28 -0
- package/dist/api/session-message-options.d.ts +11 -0
- package/dist/api/session-options.d.ts +8 -0
- package/dist/api/session-refer-options.d.ts +14 -0
- package/dist/api/session-state.d.ts +45 -0
- package/dist/api/session.d.ts +359 -0
- package/dist/api/subscriber-options.d.ts +11 -0
- package/dist/api/subscriber-subscribe-options.d.ts +6 -0
- package/dist/api/subscriber.d.ts +94 -0
- package/dist/api/subscription-delegate.d.ts +12 -0
- package/dist/api/subscription-options.d.ts +8 -0
- package/dist/api/subscription-state.d.ts +19 -0
- package/dist/api/subscription-subscribe-options.d.ts +6 -0
- package/dist/api/subscription-unsubscribe-options.d.ts +6 -0
- package/dist/api/subscription.d.ts +84 -0
- package/dist/api/transport-state.d.ts +37 -0
- package/dist/api/transport.d.ts +159 -0
- package/dist/api/user-agent-delegate.d.ts +84 -0
- package/dist/api/user-agent-options.d.ts +253 -0
- package/dist/api/user-agent-state.d.ts +14 -0
- package/dist/api/user-agent.d.ts +200 -0
- package/dist/core/dialogs/dialog-state.d.ts +34 -0
- package/dist/core/dialogs/dialog.d.ts +161 -0
- package/dist/core/dialogs/index.d.ts +4 -0
- package/dist/core/dialogs/session-dialog.d.ts +196 -0
- package/dist/core/dialogs/subscription-dialog.d.ts +120 -0
- package/dist/core/exceptions/exception.d.ts +8 -0
- package/dist/core/exceptions/index.d.ts +3 -0
- package/dist/core/exceptions/transaction-state-error.d.ts +8 -0
- package/dist/core/exceptions/transport-error.d.ts +8 -0
- package/dist/core/index.d.ts +15 -0
- package/dist/core/log/index.d.ts +3 -0
- package/dist/core/log/levels.d.ts +10 -0
- package/dist/core/log/logger-factory.d.ts +21 -0
- package/dist/core/log/logger.d.ts +19 -0
- package/dist/core/messages/body.d.ts +64 -0
- package/dist/core/messages/digest-authentication.d.ts +51 -0
- package/dist/core/messages/incoming-message.d.ts +79 -0
- package/dist/core/messages/incoming-request-message.d.ts +10 -0
- package/dist/core/messages/incoming-request.d.ts +67 -0
- package/dist/core/messages/incoming-response-message.d.ts +10 -0
- package/dist/core/messages/incoming-response.d.ts +12 -0
- package/dist/core/messages/index.d.ts +13 -0
- package/dist/core/messages/md5.d.ts +32 -0
- package/dist/core/messages/methods/ack.d.ts +18 -0
- package/dist/core/messages/methods/bye.d.ts +21 -0
- package/dist/core/messages/methods/cancel.d.ts +21 -0
- package/dist/core/messages/methods/constants.d.ts +20 -0
- package/dist/core/messages/methods/index.d.ts +13 -0
- package/dist/core/messages/methods/info.d.ts +21 -0
- package/dist/core/messages/methods/invite.d.ts +86 -0
- package/dist/core/messages/methods/message.d.ts +21 -0
- package/dist/core/messages/methods/notify.d.ts +21 -0
- package/dist/core/messages/methods/prack.d.ts +21 -0
- package/dist/core/messages/methods/publish.d.ts +21 -0
- package/dist/core/messages/methods/refer.d.ts +21 -0
- package/dist/core/messages/methods/register.d.ts +21 -0
- package/dist/core/messages/methods/subscribe.d.ts +54 -0
- package/dist/core/messages/outgoing-request-message.d.ts +94 -0
- package/dist/core/messages/outgoing-request.d.ts +67 -0
- package/dist/core/messages/outgoing-response.d.ts +42 -0
- package/dist/core/messages/parser.d.ts +14 -0
- package/dist/core/messages/utils.d.ts +24 -0
- package/dist/core/session/index.d.ts +2 -0
- package/dist/core/session/session-delegate.d.ts +70 -0
- package/dist/core/session/session.d.ts +134 -0
- package/dist/core/subscription/index.d.ts +2 -0
- package/dist/core/subscription/subscription-delegate.d.ts +27 -0
- package/dist/core/subscription/subscription.d.ts +55 -0
- package/dist/core/timers.d.ts +20 -0
- package/dist/core/transactions/client-transaction.d.ts +45 -0
- package/dist/core/transactions/index.d.ts +10 -0
- package/dist/core/transactions/invite-client-transaction.d.ts +116 -0
- package/dist/core/transactions/invite-server-transaction.d.ts +127 -0
- package/dist/core/transactions/non-invite-client-transaction.d.ts +69 -0
- package/dist/core/transactions/non-invite-server-transaction.d.ts +57 -0
- package/dist/core/transactions/server-transaction.d.ts +35 -0
- package/dist/core/transactions/transaction-state.d.ts +13 -0
- package/dist/core/transactions/transaction-user.d.ts +72 -0
- package/dist/core/transactions/transaction.d.ts +79 -0
- package/dist/core/transport.d.ts +31 -0
- package/dist/core/user-agent-core/allowed-methods.d.ts +4 -0
- package/dist/core/user-agent-core/index.d.ts +3 -0
- package/dist/core/user-agent-core/user-agent-core-configuration.d.ts +99 -0
- package/dist/core/user-agent-core/user-agent-core-delegate.d.ts +37 -0
- package/dist/core/user-agent-core/user-agent-core.d.ts +179 -0
- package/dist/core/user-agents/bye-user-agent-client.d.ts +10 -0
- package/dist/core/user-agents/bye-user-agent-server.d.ts +10 -0
- package/dist/core/user-agents/cancel-user-agent-client.d.ts +10 -0
- package/dist/core/user-agents/index.d.ts +26 -0
- package/dist/core/user-agents/info-user-agent-client.d.ts +10 -0
- package/dist/core/user-agents/info-user-agent-server.d.ts +10 -0
- package/dist/core/user-agents/invite-user-agent-client.d.ts +35 -0
- package/dist/core/user-agents/invite-user-agent-server.d.ts +77 -0
- package/dist/core/user-agents/message-user-agent-client.d.ts +10 -0
- package/dist/core/user-agents/message-user-agent-server.d.ts +10 -0
- package/dist/core/user-agents/notify-user-agent-client.d.ts +10 -0
- package/dist/core/user-agents/notify-user-agent-server.d.ts +16 -0
- package/dist/core/user-agents/prack-user-agent-client.d.ts +10 -0
- package/dist/core/user-agents/prack-user-agent-server.d.ts +16 -0
- package/dist/core/user-agents/publish-user-agent-client.d.ts +10 -0
- package/dist/core/user-agents/re-invite-user-agent-client.d.ts +18 -0
- package/dist/core/user-agents/re-invite-user-agent-server.d.ts +41 -0
- package/dist/core/user-agents/re-subscribe-user-agent-client.d.ts +17 -0
- package/dist/core/user-agents/re-subscribe-user-agent-server.d.ts +10 -0
- package/dist/core/user-agents/refer-user-agent-client.d.ts +10 -0
- package/dist/core/user-agents/refer-user-agent-server.d.ts +16 -0
- package/dist/core/user-agents/register-user-agent-client.d.ts +10 -0
- package/dist/core/user-agents/register-user-agent-server.d.ts +11 -0
- package/dist/core/user-agents/subscribe-user-agent-client.d.ts +65 -0
- package/dist/core/user-agents/subscribe-user-agent-server.d.ts +11 -0
- package/dist/core/user-agents/user-agent-client.d.ts +103 -0
- package/dist/core/user-agents/user-agent-server.d.ts +79 -0
- package/dist/grammar/grammar.d.ts +26 -0
- package/dist/grammar/index.d.ts +4 -0
- package/dist/grammar/name-addr-header.d.ts +24 -0
- package/dist/grammar/parameters.d.ts +16 -0
- package/dist/grammar/pegjs/dist/grammar.d.ts +50 -0
- package/dist/grammar/uri.d.ts +62 -0
- package/dist/{types/index.d.ts → index.d.ts} +7 -3
- package/dist/main.d.ts +9 -0
- package/dist/new-index.d.ts +199 -0
- package/dist/platform/web/index.d.ts +4 -0
- package/dist/platform/web/modifiers/index.d.ts +5 -0
- package/dist/platform/web/modifiers/modifiers.d.ts +41 -0
- package/dist/platform/web/session-description-handler/index.d.ts +14 -0
- package/dist/platform/web/session-description-handler/media-stream-factory-default.d.ts +6 -0
- package/dist/platform/web/session-description-handler/media-stream-factory.d.ts +6 -0
- package/dist/platform/web/session-description-handler/peer-connection-configuration-default.d.ts +5 -0
- package/dist/platform/web/session-description-handler/peer-connection-delegate.d.ts +63 -0
- package/dist/platform/web/session-description-handler/session-description-handler-configuration.d.ts +16 -0
- package/dist/platform/web/session-description-handler/session-description-handler-factory-default.d.ts +11 -0
- package/dist/platform/web/session-description-handler/session-description-handler-factory-options.d.ts +9 -0
- package/dist/platform/web/session-description-handler/session-description-handler-factory.d.ts +16 -0
- package/dist/platform/web/session-description-handler/session-description-handler-options.d.ts +47 -0
- package/dist/platform/web/session-description-handler/session-description-handler.d.ts +212 -0
- package/dist/platform/web/simple-user/index.d.ts +7 -0
- package/dist/platform/web/simple-user/simple-user-delegate.d.ts +72 -0
- package/dist/platform/web/simple-user/simple-user-options.d.ts +90 -0
- package/dist/platform/web/simple-user/simple-user.d.ts +226 -0
- package/dist/platform/web/transport/index.d.ts +6 -0
- package/dist/platform/web/transport/transport-options.d.ts +30 -0
- package/dist/platform/web/transport/transport.d.ts +125 -0
- package/dist/ue-softphone-sdk.js +2 -1
- package/dist/ue-softphone-sdk.js.map +1 -0
- package/dist/version.d.ts +1 -0
- package/dist/webPhoneSdk.d.ts +24 -0
- package/dist/webrtc.d.ts +17 -0
- package/{rollup-new.config.mjs → new-rollup.config.mjs} +1 -1
- package/package.json +6 -6
- package/rollup.config.js +15 -14
- package/src/api/api-extractor.json +358 -0
- package/src/api/bye.ts +27 -0
- package/src/api/dtmf.ts +27 -0
- package/src/api/emitter.ts +110 -0
- package/src/api/exceptions/content-type-unsupported.ts +11 -0
- package/src/api/exceptions/index.ts +5 -0
- package/src/api/exceptions/request-pending.ts +12 -0
- package/src/api/exceptions/session-description-handler.ts +11 -0
- package/src/api/exceptions/session-terminated.ts +11 -0
- package/src/api/exceptions/state-transition.ts +11 -0
- package/src/api/index.ts +58 -0
- package/src/api/info.ts +27 -0
- package/src/api/invitation-accept-options.ts +20 -0
- package/src/api/invitation-progress-options.ts +36 -0
- package/src/api/invitation-reject-options.ts +22 -0
- package/src/api/invitation.ts +816 -0
- package/src/api/inviter-cancel-options.ts +9 -0
- package/src/api/inviter-invite-options.ts +29 -0
- package/src/api/inviter-options.ts +44 -0
- package/src/api/inviter.ts +1126 -0
- package/src/api/message.ts +27 -0
- package/src/api/messager-message-options.ts +12 -0
- package/src/api/messager-options.ts +18 -0
- package/src/api/messager.ts +89 -0
- package/src/api/notification.ts +27 -0
- package/src/api/notifier.ts +7 -0
- package/src/api/publisher-options.ts +34 -0
- package/src/api/publisher-publish-options.ts +6 -0
- package/src/api/publisher-state.ts +21 -0
- package/src/api/publisher-unpublish-options.ts +6 -0
- package/src/api/publisher.ts +418 -0
- package/src/api/referral.ts +89 -0
- package/src/api/registerer-options.ts +55 -0
- package/src/api/registerer-register-options.ts +12 -0
- package/src/api/registerer-state.ts +21 -0
- package/src/api/registerer-unregister-options.ts +17 -0
- package/src/api/registerer.ts +814 -0
- package/src/api/session-bye-options.ts +12 -0
- package/src/api/session-delegate.ts +80 -0
- package/src/api/session-description-handler-factory.ts +16 -0
- package/src/api/session-description-handler.ts +89 -0
- package/src/api/session-info-options.ts +12 -0
- package/src/api/session-invite-options.ts +29 -0
- package/src/api/session-message-options.ts +12 -0
- package/src/api/session-options.ts +8 -0
- package/src/api/session-refer-options.ts +15 -0
- package/src/api/session-state.ts +45 -0
- package/src/api/session.ts +1448 -0
- package/src/api/subscriber-options.ts +12 -0
- package/src/api/subscriber-subscribe-options.ts +6 -0
- package/src/api/subscriber.ts +536 -0
- package/src/api/subscription-delegate.ts +13 -0
- package/src/api/subscription-options.ts +8 -0
- package/src/api/subscription-state.ts +19 -0
- package/src/api/subscription-subscribe-options.ts +6 -0
- package/src/api/subscription-unsubscribe-options.ts +6 -0
- package/src/api/subscription.ts +161 -0
- package/src/api/transport-state.ts +37 -0
- package/src/api/transport.ts +169 -0
- package/src/api/user-agent-delegate.ts +95 -0
- package/src/api/user-agent-options.ts +322 -0
- package/src/api/user-agent-state.ts +14 -0
- package/src/api/user-agent.ts +1014 -0
- package/src/core/api-extractor.json +358 -0
- package/src/core/dialogs/dialog-state.ts +35 -0
- package/src/core/dialogs/dialog.ts +605 -0
- package/src/core/dialogs/index.ts +4 -0
- package/src/core/dialogs/session-dialog.ts +996 -0
- package/src/core/dialogs/subscription-dialog.ts +557 -0
- package/src/core/exceptions/exception.ts +11 -0
- package/src/core/exceptions/index.ts +3 -0
- package/src/core/exceptions/transaction-state-error.ts +11 -0
- package/src/core/exceptions/transport-error.ts +11 -0
- package/src/core/index.ts +19 -0
- package/src/core/log/index.ts +3 -0
- package/src/core/log/levels.ts +10 -0
- package/src/core/log/logger-factory.ts +119 -0
- package/src/core/log/logger.ts +42 -0
- package/src/core/messages/body.ts +171 -0
- package/src/core/messages/digest-authentication.ts +190 -0
- package/src/core/messages/incoming-message.ts +152 -0
- package/src/core/messages/incoming-request-message.ts +14 -0
- package/src/core/messages/incoming-request.ts +75 -0
- package/src/core/messages/incoming-response-message.ts +14 -0
- package/src/core/messages/incoming-response.ts +13 -0
- package/src/core/messages/index.ts +18 -0
- package/src/core/messages/md5.ts +437 -0
- package/src/core/messages/methods/ack.ts +22 -0
- package/src/core/messages/methods/bye.ts +22 -0
- package/src/core/messages/methods/cancel.ts +22 -0
- package/src/core/messages/methods/constants.ts +21 -0
- package/src/core/messages/methods/index.ts +13 -0
- package/src/core/messages/methods/info.ts +22 -0
- package/src/core/messages/methods/invite.ts +104 -0
- package/src/core/messages/methods/message.ts +22 -0
- package/src/core/messages/methods/notify.ts +22 -0
- package/src/core/messages/methods/prack.ts +22 -0
- package/src/core/messages/methods/publish.ts +22 -0
- package/src/core/messages/methods/refer.ts +22 -0
- package/src/core/messages/methods/register.ts +22 -0
- package/src/core/messages/methods/subscribe.ts +59 -0
- package/src/core/messages/outgoing-request-message.ts +299 -0
- package/src/core/messages/outgoing-request.ts +77 -0
- package/src/core/messages/outgoing-response.ts +174 -0
- package/src/core/messages/parser.ts +265 -0
- package/src/core/messages/utils.ts +144 -0
- package/src/core/session/index.ts +2 -0
- package/src/core/session/session-delegate.ts +88 -0
- package/src/core/session/session.ts +158 -0
- package/src/core/subscription/index.ts +2 -0
- package/src/core/subscription/subscription-delegate.ts +30 -0
- package/src/core/subscription/subscription.ts +61 -0
- package/src/core/timers.ts +24 -0
- package/src/core/transactions/client-transaction.ts +78 -0
- package/src/core/transactions/index.ts +10 -0
- package/src/core/transactions/invite-client-transaction.ts +504 -0
- package/src/core/transactions/invite-server-transaction.ts +432 -0
- package/src/core/transactions/non-invite-client-transaction.ts +257 -0
- package/src/core/transactions/non-invite-server-transaction.ts +241 -0
- package/src/core/transactions/server-transaction.ts +47 -0
- package/src/core/transactions/transaction-state.ts +13 -0
- package/src/core/transactions/transaction-user.ts +82 -0
- package/src/core/transactions/transaction.ts +149 -0
- package/src/core/transport.ts +32 -0
- package/src/core/user-agent-core/allowed-methods.ts +19 -0
- package/src/core/user-agent-core/index.ts +3 -0
- package/src/core/user-agent-core/user-agent-core-configuration.ts +111 -0
- package/src/core/user-agent-core/user-agent-core-delegate.ts +50 -0
- package/src/core/user-agent-core/user-agent-core.ts +905 -0
- package/src/core/user-agents/bye-user-agent-client.ts +16 -0
- package/src/core/user-agents/bye-user-agent-server.ts +14 -0
- package/src/core/user-agents/cancel-user-agent-client.ts +14 -0
- package/src/core/user-agents/index.ts +26 -0
- package/src/core/user-agents/info-user-agent-client.ts +15 -0
- package/src/core/user-agents/info-user-agent-server.ts +14 -0
- package/src/core/user-agents/invite-user-agent-client.ts +405 -0
- package/src/core/user-agents/invite-user-agent-server.ts +269 -0
- package/src/core/user-agents/message-user-agent-client.ts +14 -0
- package/src/core/user-agents/message-user-agent-server.ts +14 -0
- package/src/core/user-agents/notify-user-agent-client.ts +15 -0
- package/src/core/user-agents/notify-user-agent-server.ts +30 -0
- package/src/core/user-agents/prack-user-agent-client.ts +16 -0
- package/src/core/user-agents/prack-user-agent-server.ts +37 -0
- package/src/core/user-agents/publish-user-agent-client.ts +14 -0
- package/src/core/user-agents/re-invite-user-agent-client.ts +127 -0
- package/src/core/user-agents/re-invite-user-agent-server.ts +109 -0
- package/src/core/user-agents/re-subscribe-user-agent-client.ts +78 -0
- package/src/core/user-agents/re-subscribe-user-agent-server.ts +14 -0
- package/src/core/user-agents/refer-user-agent-client.ts +15 -0
- package/src/core/user-agents/refer-user-agent-server.ts +30 -0
- package/src/core/user-agents/register-user-agent-client.ts +14 -0
- package/src/core/user-agents/register-user-agent-server.ts +14 -0
- package/src/core/user-agents/subscribe-user-agent-client.ts +341 -0
- package/src/core/user-agents/subscribe-user-agent-server.ts +14 -0
- package/src/core/user-agents/user-agent-client.ts +378 -0
- package/src/core/user-agents/user-agent-server.ts +276 -0
- package/src/grammar/grammar.ts +55 -0
- package/src/grammar/index.ts +4 -0
- package/src/grammar/name-addr-header.ts +58 -0
- package/src/grammar/parameters.ts +45 -0
- package/src/grammar/pegjs/README.md +9 -0
- package/src/grammar/pegjs/dist/grammar.ts +1557 -0
- package/src/grammar/pegjs/src/grammar.pegjs +1009 -0
- package/src/grammar/uri.ts +370 -0
- package/src/index.ts +59 -28
- package/src/lib/socket.io.esm.min.js +7 -0
- package/src/main.ts +26 -0
- package/src/new-index.ts +2478 -0
- package/src/platform/react/README.md +1 -0
- package/src/platform/web/index.ts +4 -0
- package/src/platform/web/modifiers/index.ts +5 -0
- package/src/platform/web/modifiers/modifiers.ts +180 -0
- package/src/platform/web/session-description-handler/api-extractor.json +358 -0
- package/src/platform/web/session-description-handler/index.ts +14 -0
- package/src/platform/web/session-description-handler/media-stream-factory-default.ts +22 -0
- package/src/platform/web/session-description-handler/media-stream-factory.ts +10 -0
- package/src/platform/web/session-description-handler/peer-connection-configuration-default.ts +17 -0
- package/src/platform/web/session-description-handler/peer-connection-delegate.ts +72 -0
- package/src/platform/web/session-description-handler/session-description-handler-configuration.ts +17 -0
- package/src/platform/web/session-description-handler/session-description-handler-factory-default.ts +45 -0
- package/src/platform/web/session-description-handler/session-description-handler-factory-options.ts +10 -0
- package/src/platform/web/session-description-handler/session-description-handler-factory.ts +17 -0
- package/src/platform/web/session-description-handler/session-description-handler-options.ts +56 -0
- package/src/platform/web/session-description-handler/session-description-handler.ts +938 -0
- package/src/platform/web/simple-user/api-extractor.json +358 -0
- package/src/platform/web/simple-user/index.ts +7 -0
- package/src/platform/web/simple-user/simple-user-delegate.ts +82 -0
- package/src/platform/web/simple-user/simple-user-options.ts +102 -0
- package/src/platform/web/simple-user/simple-user.ts +1099 -0
- package/src/platform/web/transport/api-extractor.json +358 -0
- package/src/platform/web/transport/index.ts +6 -0
- package/src/platform/web/transport/transport-options.ts +34 -0
- package/src/platform/web/transport/transport.ts +742 -0
- package/src/version.ts +8 -0
- package/src/webPhoneSdk.ts +67 -0
- package/src/webrtc.ts +318 -0
- package/tsconfig.json +26 -10
- /package/dist/{types/config.d.ts → config.d.ts} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
See [documentation](../.././../docs/react-native.md).
|
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
import { SessionDescriptionHandlerModifier } from "../../../api";
|
|
2
|
+
|
|
3
|
+
const stripPayload = (sdp: string, payload: string): string => {
|
|
4
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
5
|
+
const mediaDescs: Array<any> = [];
|
|
6
|
+
|
|
7
|
+
const lines: Array<string> = sdp.split(/\r\n/);
|
|
8
|
+
|
|
9
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
10
|
+
let currentMediaDesc: any;
|
|
11
|
+
for (let i = 0; i < lines.length;) {
|
|
12
|
+
const line: string = lines[i];
|
|
13
|
+
if (/^m=(?:audio|video)/.test(line)) {
|
|
14
|
+
currentMediaDesc = {
|
|
15
|
+
index: i,
|
|
16
|
+
stripped: []
|
|
17
|
+
};
|
|
18
|
+
mediaDescs.push(currentMediaDesc);
|
|
19
|
+
} else if (currentMediaDesc) {
|
|
20
|
+
const rtpmap = /^a=rtpmap:(\d+) ([^/]+)\//.exec(line);
|
|
21
|
+
if (rtpmap && payload === rtpmap[2]) {
|
|
22
|
+
lines.splice(i, 1);
|
|
23
|
+
currentMediaDesc.stripped.push(rtpmap[1]);
|
|
24
|
+
continue; // Don't increment 'i'
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
i++;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
for (const mediaDesc of mediaDescs) {
|
|
32
|
+
const mline: Array<string> = lines[mediaDesc.index].split(" ");
|
|
33
|
+
|
|
34
|
+
// Ignore the first 3 parameters of the mline. The codec information is after that
|
|
35
|
+
for (let j = 3; j < mline.length;) {
|
|
36
|
+
if (mediaDesc.stripped.indexOf(mline[j]) !== -1) {
|
|
37
|
+
mline.splice(j, 1);
|
|
38
|
+
continue;
|
|
39
|
+
}
|
|
40
|
+
j++;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
lines[mediaDesc.index] = mline.join(" ");
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
return lines.join("\r\n");
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
const stripMediaDescription = (sdp: string, description: string): string => {
|
|
50
|
+
const descriptionRegExp = new RegExp("m=" + description + ".*$", "gm");
|
|
51
|
+
const groupRegExp = new RegExp("^a=group:.*$", "gm");
|
|
52
|
+
|
|
53
|
+
if (descriptionRegExp.test(sdp)) {
|
|
54
|
+
let midLineToRemove;
|
|
55
|
+
sdp = sdp.split(/^m=/gm).filter((section) => {
|
|
56
|
+
if (section.substr(0, description.length) === description) {
|
|
57
|
+
midLineToRemove = section.match(/^a=mid:.*$/gm);
|
|
58
|
+
if (midLineToRemove) {
|
|
59
|
+
const step = midLineToRemove[0].match(/:.+$/g);
|
|
60
|
+
if (step) {
|
|
61
|
+
midLineToRemove = step[0].substr(1);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
return false;
|
|
65
|
+
}
|
|
66
|
+
return true;
|
|
67
|
+
}).join("m=");
|
|
68
|
+
const groupLine = sdp.match(groupRegExp);
|
|
69
|
+
if (groupLine && groupLine.length === 1) {
|
|
70
|
+
let groupLinePortion = groupLine[0];
|
|
71
|
+
// eslint-disable-next-line no-useless-escape
|
|
72
|
+
const groupRegExpReplace = new RegExp("\ *" + midLineToRemove + "[^\ ]*", "g");
|
|
73
|
+
groupLinePortion = groupLinePortion.replace(groupRegExpReplace, "");
|
|
74
|
+
sdp = sdp.split(groupRegExp).join(groupLinePortion);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
return sdp;
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* Modifier.
|
|
82
|
+
* @public
|
|
83
|
+
*/
|
|
84
|
+
export function stripTcpCandidates(description: RTCSessionDescriptionInit): Promise<RTCSessionDescriptionInit> {
|
|
85
|
+
description.sdp = (description.sdp || "").replace(/^a=candidate:\d+ \d+ tcp .*?\r\n/img, "");
|
|
86
|
+
return Promise.resolve(description);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* Modifier.
|
|
91
|
+
* @public
|
|
92
|
+
*/
|
|
93
|
+
export function stripTelephoneEvent(description: RTCSessionDescriptionInit): Promise<RTCSessionDescriptionInit> {
|
|
94
|
+
description.sdp = stripPayload(description.sdp || "", "telephone-event");
|
|
95
|
+
return Promise.resolve(description);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* Modifier.
|
|
100
|
+
* @public
|
|
101
|
+
*/
|
|
102
|
+
export function cleanJitsiSdpImageattr(description: RTCSessionDescriptionInit): Promise<RTCSessionDescriptionInit> {
|
|
103
|
+
description.sdp = (description.sdp || "").replace(/^(a=imageattr:.*?)(x|y)=\[0-/gm, "$1$2=[1:");
|
|
104
|
+
return Promise.resolve(description);
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* Modifier.
|
|
109
|
+
* @public
|
|
110
|
+
*/
|
|
111
|
+
export function stripG722(description: RTCSessionDescriptionInit): Promise<RTCSessionDescriptionInit> {
|
|
112
|
+
description.sdp = stripPayload(description.sdp || "", "G722");
|
|
113
|
+
return Promise.resolve(description);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* Modifier.
|
|
118
|
+
* @public
|
|
119
|
+
*/
|
|
120
|
+
export function stripRtpPayload(payload: string): SessionDescriptionHandlerModifier {
|
|
121
|
+
return (description: RTCSessionDescriptionInit): Promise<RTCSessionDescriptionInit> => {
|
|
122
|
+
description.sdp = stripPayload(description.sdp || "", payload);
|
|
123
|
+
return Promise.resolve(description);
|
|
124
|
+
};
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* Modifier.
|
|
129
|
+
* @public
|
|
130
|
+
*/
|
|
131
|
+
export function stripVideo(description: RTCSessionDescriptionInit): Promise<RTCSessionDescriptionInit> {
|
|
132
|
+
description.sdp = stripMediaDescription(description.sdp || "", "video");
|
|
133
|
+
return Promise.resolve(description);
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* Modifier.
|
|
138
|
+
* @public
|
|
139
|
+
*/
|
|
140
|
+
export function addMidLines(description: RTCSessionDescriptionInit): Promise<RTCSessionDescriptionInit> {
|
|
141
|
+
let sdp = description.sdp || "";
|
|
142
|
+
if (sdp.search(/^a=mid.*$/gm) === -1) {
|
|
143
|
+
const mlines = sdp.match(/^m=.*$/gm);
|
|
144
|
+
const sdpArray = sdp.split(/^m=.*$/gm);
|
|
145
|
+
if (mlines) {
|
|
146
|
+
mlines.forEach((elem, idx) => {
|
|
147
|
+
mlines[idx] = elem + "\na=mid:" + idx;
|
|
148
|
+
});
|
|
149
|
+
}
|
|
150
|
+
sdpArray.forEach((elem, idx) => {
|
|
151
|
+
if (mlines && mlines[idx]) {
|
|
152
|
+
sdpArray[idx] = elem + mlines[idx];
|
|
153
|
+
}
|
|
154
|
+
});
|
|
155
|
+
sdp = sdpArray.join("");
|
|
156
|
+
description.sdp = sdp;
|
|
157
|
+
}
|
|
158
|
+
return Promise.resolve(description);
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
/**
|
|
162
|
+
* The modifier that should be used when the session would like to place the call on hold.
|
|
163
|
+
* @param description - The description that will be modified.
|
|
164
|
+
*/
|
|
165
|
+
export function holdModifier(description: RTCSessionDescriptionInit): Promise<RTCSessionDescriptionInit> {
|
|
166
|
+
if (!description.sdp || !description.type) {
|
|
167
|
+
throw new Error("Invalid SDP");
|
|
168
|
+
}
|
|
169
|
+
let sdp = description.sdp;
|
|
170
|
+
const type = description.type;
|
|
171
|
+
if (sdp) {
|
|
172
|
+
if (!/a=(sendrecv|sendonly|recvonly|inactive)/.test(sdp)) {
|
|
173
|
+
sdp = sdp.replace(/(m=[^\r]*\r\n)/g, "$1a=sendonly\r\n");
|
|
174
|
+
} else {
|
|
175
|
+
sdp = sdp.replace(/a=sendrecv\r\n/g, "a=sendonly\r\n");
|
|
176
|
+
sdp = sdp.replace(/a=recvonly\r\n/g, "a=inactive\r\n");
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
return Promise.resolve({ sdp, type });
|
|
180
|
+
}
|
|
@@ -0,0 +1,358 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Config file for API Extractor. For more info, please visit: https://api-extractor.com
|
|
3
|
+
*/
|
|
4
|
+
{
|
|
5
|
+
"$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Optionally specifies another JSON config file that this file extends from. This provides a way for
|
|
9
|
+
* standard settings to be shared across multiple projects.
|
|
10
|
+
*
|
|
11
|
+
* If the path starts with "./" or "../", the path is resolved relative to the folder of the file that contains
|
|
12
|
+
* the "extends" field. Otherwise, the first path segment is interpreted as an NPM package name, and will be
|
|
13
|
+
* resolved using NodeJS require().
|
|
14
|
+
*
|
|
15
|
+
* SUPPORTED TOKENS: none
|
|
16
|
+
* DEFAULT VALUE: ""
|
|
17
|
+
*/
|
|
18
|
+
// "extends": "./shared/api-extractor-base.json"
|
|
19
|
+
// "extends": "my-package/include/api-extractor-base.json"
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Determines the "<projectFolder>" token that can be used with other config file settings. The project folder
|
|
23
|
+
* typically contains the tsconfig.json and package.json config files, but the path is user-defined.
|
|
24
|
+
*
|
|
25
|
+
* The path is resolved relative to the folder of the config file that contains the setting.
|
|
26
|
+
*
|
|
27
|
+
* The default value for "projectFolder" is the token "<lookup>", which means the folder is determined by traversing
|
|
28
|
+
* parent folders, starting from the folder containing api-extractor.json, and stopping at the first folder
|
|
29
|
+
* that contains a tsconfig.json file. If a tsconfig.json file cannot be found in this way, then an error
|
|
30
|
+
* will be reported.
|
|
31
|
+
*
|
|
32
|
+
* SUPPORTED TOKENS: <lookup>
|
|
33
|
+
* DEFAULT VALUE: "<lookup>"
|
|
34
|
+
*/
|
|
35
|
+
// "projectFolder": "..",
|
|
36
|
+
"projectFolder": "../../../..",
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* (REQUIRED) Specifies the .d.ts file to be used as the starting point for analysis. API Extractor
|
|
40
|
+
* analyzes the symbols exported by this module.
|
|
41
|
+
*
|
|
42
|
+
* The file extension must be ".d.ts" and not ".ts".
|
|
43
|
+
*
|
|
44
|
+
* The path is resolved relative to the folder of the config file that contains the setting; to change this,
|
|
45
|
+
* prepend a folder token such as "<projectFolder>".
|
|
46
|
+
*
|
|
47
|
+
* SUPPORTED TOKENS: <projectFolder>, <packageName>, <unscopedPackageName>
|
|
48
|
+
*/
|
|
49
|
+
"mainEntryPointFilePath": "<projectFolder>/lib/platform/web/session-description-handler/index.d.ts",
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Determines how the TypeScript compiler engine will be invoked by API Extractor.
|
|
53
|
+
*/
|
|
54
|
+
"compiler": {
|
|
55
|
+
/**
|
|
56
|
+
* Specifies the path to the tsconfig.json file to be used by API Extractor when analyzing the project.
|
|
57
|
+
*
|
|
58
|
+
* The path is resolved relative to the folder of the config file that contains the setting; to change this,
|
|
59
|
+
* prepend a folder token such as "<projectFolder>".
|
|
60
|
+
*
|
|
61
|
+
* Note: This setting will be ignored if "overrideTsconfig" is used.
|
|
62
|
+
*
|
|
63
|
+
* SUPPORTED TOKENS: <projectFolder>, <packageName>, <unscopedPackageName>
|
|
64
|
+
* DEFAULT VALUE: "<projectFolder>/tsconfig.json"
|
|
65
|
+
*/
|
|
66
|
+
// "tsconfigFilePath": "<projectFolder>/tsconfig.json",
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* Provides a compiler configuration that will be used instead of reading the tsconfig.json file from disk.
|
|
70
|
+
* The object must conform to the TypeScript tsconfig schema:
|
|
71
|
+
*
|
|
72
|
+
* http://json.schemastore.org/tsconfig
|
|
73
|
+
*
|
|
74
|
+
* If omitted, then the tsconfig.json file will be read from the "projectFolder".
|
|
75
|
+
*
|
|
76
|
+
* DEFAULT VALUE: no overrideTsconfig section
|
|
77
|
+
*/
|
|
78
|
+
"overrideTsconfig": {
|
|
79
|
+
"compilerOptions": {
|
|
80
|
+
"declaration": true,
|
|
81
|
+
"declarationMap": true,
|
|
82
|
+
"outDir": "../lib",
|
|
83
|
+
"strict": true,
|
|
84
|
+
"target": "es5",
|
|
85
|
+
"lib": [
|
|
86
|
+
"es2017",
|
|
87
|
+
"dom"
|
|
88
|
+
]
|
|
89
|
+
},
|
|
90
|
+
"include": [
|
|
91
|
+
"**/*.ts"
|
|
92
|
+
]
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* This option causes the compiler to be invoked with the --skipLibCheck option. This option is not recommended
|
|
96
|
+
* and may cause API Extractor to produce incomplete or incorrect declarations, but it may be required when
|
|
97
|
+
* dependencies contain declarations that are incompatible with the TypeScript engine that API Extractor uses
|
|
98
|
+
* for its analysis. Where possible, the underlying issue should be fixed rather than relying on skipLibCheck.
|
|
99
|
+
*
|
|
100
|
+
* DEFAULT VALUE: false
|
|
101
|
+
*/
|
|
102
|
+
// "skipLibCheck": true,
|
|
103
|
+
},
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* Configures how the API report file (*.api.md) will be generated.
|
|
107
|
+
*/
|
|
108
|
+
"apiReport": {
|
|
109
|
+
/**
|
|
110
|
+
* (REQUIRED) Whether to generate an API report.
|
|
111
|
+
*/
|
|
112
|
+
"enabled": true,
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* The filename for the API report files. It will be combined with "reportFolder" or "reportTempFolder" to produce
|
|
116
|
+
* a full file path.
|
|
117
|
+
*
|
|
118
|
+
* The file extension should be ".api.md", and the string should not contain a path separator such as "\" or "/".
|
|
119
|
+
*
|
|
120
|
+
* SUPPORTED TOKENS: <packageName>, <unscopedPackageName>
|
|
121
|
+
* DEFAULT VALUE: "<unscopedPackageName>.api.md"
|
|
122
|
+
*/
|
|
123
|
+
// "reportFileName": "<unscopedPackageName>.api.md",
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* Specifies the folder where the API report file is written. The file name portion is determined by
|
|
127
|
+
* the "reportFileName" setting.
|
|
128
|
+
*
|
|
129
|
+
* The API report file is normally tracked by Git. Changes to it can be used to trigger a branch policy,
|
|
130
|
+
* e.g. for an API review.
|
|
131
|
+
*
|
|
132
|
+
* The path is resolved relative to the folder of the config file that contains the setting; to change this,
|
|
133
|
+
* prepend a folder token such as "<projectFolder>".
|
|
134
|
+
*
|
|
135
|
+
* SUPPORTED TOKENS: <projectFolder>, <packageName>, <unscopedPackageName>
|
|
136
|
+
* DEFAULT VALUE: "<projectFolder>/etc/"
|
|
137
|
+
*/
|
|
138
|
+
"reportFolder": "<projectFolder>/etc/session-description-handler",
|
|
139
|
+
|
|
140
|
+
/**
|
|
141
|
+
* Specifies the folder where the temporary report file is written. The file name portion is determined by
|
|
142
|
+
* the "reportFileName" setting.
|
|
143
|
+
*
|
|
144
|
+
* After the temporary file is written to disk, it is compared with the file in the "reportFolder".
|
|
145
|
+
* If they are different, a production build will fail.
|
|
146
|
+
*
|
|
147
|
+
* The path is resolved relative to the folder of the config file that contains the setting; to change this,
|
|
148
|
+
* prepend a folder token such as "<projectFolder>".
|
|
149
|
+
*
|
|
150
|
+
* SUPPORTED TOKENS: <projectFolder>, <packageName>, <unscopedPackageName>
|
|
151
|
+
* DEFAULT VALUE: "<projectFolder>/temp/"
|
|
152
|
+
*/
|
|
153
|
+
"reportTempFolder": "<projectFolder>/temp/session-description-handler"
|
|
154
|
+
},
|
|
155
|
+
|
|
156
|
+
/**
|
|
157
|
+
* Configures how the doc model file (*.api.json) will be generated.
|
|
158
|
+
*/
|
|
159
|
+
"docModel": {
|
|
160
|
+
/**
|
|
161
|
+
* (REQUIRED) Whether to generate a doc model file.
|
|
162
|
+
*/
|
|
163
|
+
"enabled": true,
|
|
164
|
+
|
|
165
|
+
/**
|
|
166
|
+
* The output path for the doc model file. The file extension should be ".api.json".
|
|
167
|
+
*
|
|
168
|
+
* The path is resolved relative to the folder of the config file that contains the setting; to change this,
|
|
169
|
+
* prepend a folder token such as "<projectFolder>".
|
|
170
|
+
*
|
|
171
|
+
* SUPPORTED TOKENS: <projectFolder>, <packageName>, <unscopedPackageName>
|
|
172
|
+
* DEFAULT VALUE: "<projectFolder>/temp/<unscopedPackageName>.api.json"
|
|
173
|
+
*/
|
|
174
|
+
"apiJsonFilePath": "<projectFolder>/temp/session-description-handler/<unscopedPackageName>.api.json"
|
|
175
|
+
},
|
|
176
|
+
|
|
177
|
+
/**
|
|
178
|
+
* Configures how the .d.ts rollup file will be generated.
|
|
179
|
+
*/
|
|
180
|
+
"dtsRollup": {
|
|
181
|
+
/**
|
|
182
|
+
* (REQUIRED) Whether to generate the .d.ts rollup file.
|
|
183
|
+
*/
|
|
184
|
+
"enabled": false,
|
|
185
|
+
|
|
186
|
+
/**
|
|
187
|
+
* Specifies the output path for a .d.ts rollup file to be generated without any trimming.
|
|
188
|
+
* This file will include all declarations that are exported by the main entry point.
|
|
189
|
+
*
|
|
190
|
+
* If the path is an empty string, then this file will not be written.
|
|
191
|
+
*
|
|
192
|
+
* The path is resolved relative to the folder of the config file that contains the setting; to change this,
|
|
193
|
+
* prepend a folder token such as "<projectFolder>".
|
|
194
|
+
*
|
|
195
|
+
* SUPPORTED TOKENS: <projectFolder>, <packageName>, <unscopedPackageName>
|
|
196
|
+
* DEFAULT VALUE: "<projectFolder>/dist/<unscopedPackageName>.d.ts"
|
|
197
|
+
*/
|
|
198
|
+
// "untrimmedFilePath": "<projectFolder>/dist/sip-platform-web.d.ts",
|
|
199
|
+
|
|
200
|
+
/**
|
|
201
|
+
* Specifies the output path for a .d.ts rollup file to be generated with trimming for a "beta" release.
|
|
202
|
+
* This file will include only declarations that are marked as "@public" or "@beta".
|
|
203
|
+
*
|
|
204
|
+
* The path is resolved relative to the folder of the config file that contains the setting; to change this,
|
|
205
|
+
* prepend a folder token such as "<projectFolder>".
|
|
206
|
+
*
|
|
207
|
+
* SUPPORTED TOKENS: <projectFolder>, <packageName>, <unscopedPackageName>
|
|
208
|
+
* DEFAULT VALUE: ""
|
|
209
|
+
*/
|
|
210
|
+
// "betaTrimmedFilePath": "<projectFolder>/dist/<unscopedPackageName>-beta.d.ts",
|
|
211
|
+
|
|
212
|
+
|
|
213
|
+
/**
|
|
214
|
+
* Specifies the output path for a .d.ts rollup file to be generated with trimming for a "public" release.
|
|
215
|
+
* This file will include only declarations that are marked as "@public".
|
|
216
|
+
*
|
|
217
|
+
* If the path is an empty string, then this file will not be written.
|
|
218
|
+
*
|
|
219
|
+
* The path is resolved relative to the folder of the config file that contains the setting; to change this,
|
|
220
|
+
* prepend a folder token such as "<projectFolder>".
|
|
221
|
+
*
|
|
222
|
+
* SUPPORTED TOKENS: <projectFolder>, <packageName>, <unscopedPackageName>
|
|
223
|
+
* DEFAULT VALUE: ""
|
|
224
|
+
*/
|
|
225
|
+
// "publicTrimmedFilePath": "<projectFolder>/dist/<unscopedPackageName>-public.d.ts",
|
|
226
|
+
|
|
227
|
+
/**
|
|
228
|
+
* When a declaration is trimmed, by default it will be replaced by a code comment such as
|
|
229
|
+
* "Excluded from this release type: exampleMember". Set "omitTrimmingComments" to true to remove the
|
|
230
|
+
* declaration completely.
|
|
231
|
+
*
|
|
232
|
+
* DEFAULT VALUE: false
|
|
233
|
+
*/
|
|
234
|
+
// "omitTrimmingComments": true
|
|
235
|
+
},
|
|
236
|
+
|
|
237
|
+
/**
|
|
238
|
+
* Configures how the tsdoc-metadata.json file will be generated.
|
|
239
|
+
*/
|
|
240
|
+
"tsdocMetadata": {
|
|
241
|
+
/**
|
|
242
|
+
* Whether to generate the tsdoc-metadata.json file.
|
|
243
|
+
*
|
|
244
|
+
* DEFAULT VALUE: true
|
|
245
|
+
*/
|
|
246
|
+
// "enabled": true,
|
|
247
|
+
|
|
248
|
+
/**
|
|
249
|
+
* Specifies where the TSDoc metadata file should be written.
|
|
250
|
+
*
|
|
251
|
+
* The path is resolved relative to the folder of the config file that contains the setting; to change this,
|
|
252
|
+
* prepend a folder token such as "<projectFolder>".
|
|
253
|
+
*
|
|
254
|
+
* The default value is "<lookup>", which causes the path to be automatically inferred from the "tsdocMetadata",
|
|
255
|
+
* "typings" or "main" fields of the project's package.json. If none of these fields are set, the lookup
|
|
256
|
+
* falls back to "tsdoc-metadata.json" in the package folder.
|
|
257
|
+
*
|
|
258
|
+
* SUPPORTED TOKENS: <projectFolder>, <packageName>, <unscopedPackageName>
|
|
259
|
+
* DEFAULT VALUE: "<lookup>"
|
|
260
|
+
*/
|
|
261
|
+
// "tsdocMetadataFilePath": "<projectFolder>/dist/tsdoc-metadata.json"
|
|
262
|
+
},
|
|
263
|
+
|
|
264
|
+
/**
|
|
265
|
+
* Configures how API Extractor reports error and warning messages produced during analysis.
|
|
266
|
+
*
|
|
267
|
+
* There are three sources of messages: compiler messages, API Extractor messages, and TSDoc messages.
|
|
268
|
+
*/
|
|
269
|
+
"messages": {
|
|
270
|
+
/**
|
|
271
|
+
* Configures handling of diagnostic messages reported by the TypeScript compiler engine while analyzing
|
|
272
|
+
* the input .d.ts files.
|
|
273
|
+
*
|
|
274
|
+
* TypeScript message identifiers start with "TS" followed by an integer. For example: "TS2551"
|
|
275
|
+
*
|
|
276
|
+
* DEFAULT VALUE: A single "default" entry with logLevel=warning.
|
|
277
|
+
*/
|
|
278
|
+
"compilerMessageReporting": {
|
|
279
|
+
/**
|
|
280
|
+
* Configures the default routing for messages that don't match an explicit rule in this table.
|
|
281
|
+
*/
|
|
282
|
+
"default": {
|
|
283
|
+
/**
|
|
284
|
+
* Specifies whether the message should be written to the the tool's output log. Note that
|
|
285
|
+
* the "addToApiReportFile" property may supersede this option.
|
|
286
|
+
*
|
|
287
|
+
* Possible values: "error", "warning", "none"
|
|
288
|
+
*
|
|
289
|
+
* Errors cause the build to fail and return a nonzero exit code. Warnings cause a production build fail
|
|
290
|
+
* and return a nonzero exit code. For a non-production build (e.g. when "api-extractor run" includes
|
|
291
|
+
* the "--local" option), the warning is displayed but the build will not fail.
|
|
292
|
+
*
|
|
293
|
+
* DEFAULT VALUE: "warning"
|
|
294
|
+
*/
|
|
295
|
+
"logLevel": "warning",
|
|
296
|
+
|
|
297
|
+
/**
|
|
298
|
+
* When addToApiReportFile is true: If API Extractor is configured to write an API report file (.api.md),
|
|
299
|
+
* then the message will be written inside that file; otherwise, the message is instead logged according to
|
|
300
|
+
* the "logLevel" option.
|
|
301
|
+
*
|
|
302
|
+
* DEFAULT VALUE: false
|
|
303
|
+
*/
|
|
304
|
+
// "addToApiReportFile": false
|
|
305
|
+
},
|
|
306
|
+
|
|
307
|
+
// "TS2551": {
|
|
308
|
+
// "logLevel": "warning",
|
|
309
|
+
// "addToApiReportFile": true
|
|
310
|
+
// },
|
|
311
|
+
//
|
|
312
|
+
// . . .
|
|
313
|
+
},
|
|
314
|
+
|
|
315
|
+
/**
|
|
316
|
+
* Configures handling of messages reported by API Extractor during its analysis.
|
|
317
|
+
*
|
|
318
|
+
* API Extractor message identifiers start with "ae-". For example: "ae-extra-release-tag"
|
|
319
|
+
*
|
|
320
|
+
* DEFAULT VALUE: See api-extractor-defaults.json for the complete table of extractorMessageReporting mappings
|
|
321
|
+
*/
|
|
322
|
+
"extractorMessageReporting": {
|
|
323
|
+
"default": {
|
|
324
|
+
"logLevel": "warning",
|
|
325
|
+
// "addToApiReportFile": false
|
|
326
|
+
},
|
|
327
|
+
|
|
328
|
+
// "ae-extra-release-tag": {
|
|
329
|
+
// "logLevel": "warning",
|
|
330
|
+
// "addToApiReportFile": true
|
|
331
|
+
// },
|
|
332
|
+
//
|
|
333
|
+
// . . .
|
|
334
|
+
},
|
|
335
|
+
|
|
336
|
+
/**
|
|
337
|
+
* Configures handling of messages reported by the TSDoc parser when analyzing code comments.
|
|
338
|
+
*
|
|
339
|
+
* TSDoc message identifiers start with "tsdoc-". For example: "tsdoc-link-tag-unescaped-text"
|
|
340
|
+
*
|
|
341
|
+
* DEFAULT VALUE: A single "default" entry with logLevel=warning.
|
|
342
|
+
*/
|
|
343
|
+
"tsdocMessageReporting": {
|
|
344
|
+
"default": {
|
|
345
|
+
"logLevel": "warning",
|
|
346
|
+
// "addToApiReportFile": false
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
// "tsdoc-link-tag-unescaped-text": {
|
|
350
|
+
// "logLevel": "warning",
|
|
351
|
+
// "addToApiReportFile": true
|
|
352
|
+
// },
|
|
353
|
+
//
|
|
354
|
+
// . . .
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A SessionDescriptionHandler for web browsers.
|
|
3
|
+
* @packageDocumentation
|
|
4
|
+
*/
|
|
5
|
+
export * from "./media-stream-factory-default";
|
|
6
|
+
export * from "./media-stream-factory";
|
|
7
|
+
export * from "./peer-connection-configuration-default";
|
|
8
|
+
export * from "./peer-connection-delegate";
|
|
9
|
+
export * from "./session-description-handler-configuration";
|
|
10
|
+
export * from "./session-description-handler-factory-default";
|
|
11
|
+
export * from "./session-description-handler-factory-options";
|
|
12
|
+
export * from "./session-description-handler-factory";
|
|
13
|
+
export * from "./session-description-handler-options";
|
|
14
|
+
export * from "./session-description-handler";
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { MediaStreamFactory } from "./media-stream-factory";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Function which returns a MediaStreamFactory.
|
|
5
|
+
* @public
|
|
6
|
+
*/
|
|
7
|
+
export function defaultMediaStreamFactory(): MediaStreamFactory {
|
|
8
|
+
return (constraints: MediaStreamConstraints): Promise<MediaStream> => {
|
|
9
|
+
// if no audio or video, return a media stream without tracks
|
|
10
|
+
if (!constraints.audio && !constraints.video) {
|
|
11
|
+
return Promise.resolve(new MediaStream());
|
|
12
|
+
}
|
|
13
|
+
// getUserMedia() is a powerful feature which can only be used in secure contexts; in insecure contexts,
|
|
14
|
+
// navigator.mediaDevices is undefined, preventing access to getUserMedia(). A secure context is, in short,
|
|
15
|
+
// a page loaded using HTTPS or the file:/// URL scheme, or a page loaded from localhost.
|
|
16
|
+
// https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/getUserMedia#Privacy_and_security
|
|
17
|
+
if (navigator.mediaDevices === undefined) {
|
|
18
|
+
return Promise.reject(new Error("Media devices not available in insecure contexts."));
|
|
19
|
+
}
|
|
20
|
+
return navigator.mediaDevices.getUserMedia.call(navigator.mediaDevices, constraints);
|
|
21
|
+
};
|
|
22
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { SessionDescriptionHandler } from "./session-description-handler";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Interface of factory function which produces a MediaStream.
|
|
5
|
+
* @public
|
|
6
|
+
*/
|
|
7
|
+
export type MediaStreamFactory = (
|
|
8
|
+
constraints: MediaStreamConstraints,
|
|
9
|
+
sessionDescriptionHandler: SessionDescriptionHandler
|
|
10
|
+
) => Promise<MediaStream>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
2
|
+
/**
|
|
3
|
+
* Function which returns an RTCConfiguration.
|
|
4
|
+
* @public
|
|
5
|
+
*/
|
|
6
|
+
export function defaultPeerConnectionConfiguration(): RTCConfiguration {
|
|
7
|
+
const configuration: RTCConfiguration = {
|
|
8
|
+
bundlePolicy: "balanced", // Note: max-bundle is not supported by the demo backend currently (5/15/17)
|
|
9
|
+
certificates: undefined,
|
|
10
|
+
iceCandidatePoolSize: 0,
|
|
11
|
+
iceServers: [{ urls: "stun:stun.l.google.com:19302" }], // TURN URL example: "turn:88.88.88.0:3478", "test", "test"
|
|
12
|
+
iceTransportPolicy: "all",
|
|
13
|
+
peerIdentity: undefined,
|
|
14
|
+
rtcpMuxPolicy: "require"
|
|
15
|
+
};
|
|
16
|
+
return configuration;
|
|
17
|
+
}
|