オーディオ・フォールバック

音声フォールバックAPIを使用して、ネットワーク品質に応じて音声を動的に優先させる。

音声フォールバックは、接続の問題やネットワーク状況の悪化に関係なく、影響を受ける参加者のビデオを一時的に無効にすることで、すべての参加者の通話を継続します。音声フォールバック機能は、ネットワーク状況にリアルタイムで反応するため、接続状況が悪い場合でも参加者が通話を中断することはありません。状況が改善されると、ビデオ・リカバリ機能によりビデオ・ストリームが再確立されます。

パブリッシャーとサブスクライバーの音声フォールバック機能を組み合わせることで、最適な通話品質を実現します。1人の加入者が音声のみにフォールバックすることも(加入者の状況によってのみ可能)、パブリッシャーがネットワーク状況が悪い場合に音声のみにフォールバックすることも可能です。

パブリッシャー機能とサブスクライブ・オーディオ・フォールバック機能が有効になっている場合、SDKは品質状況の変化を示すイベントをディスパッチします。これらのイベントを使用して Client で通知をトリガーすることも、SDK がデフォルトの UI 通知を表示することもできます。

加入者音声フォールバック

加入者音声フォールバック機能は、加入者側のネットワーク状況の悪化に応じて、受信ビデオストリームを自動的にオフにして音声のみのモードにすることで、通話品質を向上させます。他のクライアントは、加入者側のネットワーク状況に関係なく、ビデオの受信を継続します。この機能はVonage Video Media Routerを介して処理され、ルーティングされたセッションでのみ使用できます。詳細は セッション作成ドキュメント ルーティングされたセッションとリレーされたセッションの違いを理解する。

パブリッシャー・オーディオのフォールバック

パブリッシャーオーディオのフォールバック機能は、パブリッシングクライアントのネットワーク状況がビデオをサポートできない場合に、パブリッシャーがオーディオのみのモードに切り替えることで、通話の品質を向上させます。ネットワーク状況が改善されると、パブリッシャーがビデオを再開します。

パブリッシャーオーディオのフォールバック機能は、リレーセッションとルーティングセッションの両方でサポートされています( Vonage ビデオ・メディア・ルーターとメディア・モード).

パブリッシャーオーディオのフォールバック機能には、公開ストリームの帯域幅と輻輳を監視する機能が強化されています。帯域幅の輻輳がビデオ通信をサポートできない場合、パブリッシャーはオーディオ通信を優先し、オーディオにフォールバックします。

パブリッシャーオーディオのフォールバック機能により、パブリッシングクライアントは、サブスクライバー(中継セッションの場合)またはVonage Video Media Router(ルーティングセッションの場合)から(パケットロス、帯域幅、および輻輳に関する)品質フィードバックを受信します。

ネットワークの劣化に関するパブリッシャーとサブスクライバーの音声フォールバック・イベントの解釈

パブリッシャーおよびサブスクライバーの音声フォールバック・イベントは、どのエンドポイントでネットワークの劣化が発生しているかを直接示すものではありません。その代わりに、ネットワーク品質に関する2つの異なる視点が反映されます。つまり、パブリッシャー自身の統計に対する見解と、Vonage Video Media Routerの集約された見解です。

  • リレーされたセッションでは、パブリッシャーオーディオのフォールバックのみがサ ポートされる。フォールバックイベントはパブリッシャーから発信されるが、これは必ずしもパブリッシャーに ネットワークの問題が発生していることを意味しない。輻輳のメトリクスはエンドツーエンドで計算され、パブリッシャーとサ ブスクライバーの両方から影響を受ける。

  • ルーティングされたセッションでは、パブリッシャーおよびサブスクライバーのフォールバックの両方がサポートされます。Vonage Video Media Router は異なるピア接続遷移を実行したり、ハイブリッド構成で動作したりするため、フォールバックイベントのみから劣化の正確な原因を特定することは困難な場合があります。経験則として、劣化は加入者側にあると仮定してください。パブリッシャーオーディオのフォールバックが有効で、クライアントがフォールバックイベントを受信した直後に ストリーム更新イベント 動画チャンネルが無効になっている場合、パブリッシャーも影響を受ける可能性があります。しかし、パブリッシャのフォールバックは、サブスクライバから報告されるメトリクスによって影響を受ける可能性があります。

オーディオフォールバックの使用

クライアントSDKは、パブリッシャーとサブスクライバーの音声フォールバックのためのイベントを含む。これらのイベントは、パブリッシャーまたはサブスクライバーのビデオが有効または無効になったとき、およびオーディオのフォールバック(およびビデオの回復)により、ビデオが無効になっていることに対する警告があるときを示します。

ストリームを公開する際に、オーディオのフォールバックを有効または無効にできます。

Use the audio fallback API to dynamically prioritize audio in response to network quality.

Note: The audioFallbackEnabled prop of the OTPublisher component will be deprecated. Please use the audioFallback.subscriber setting instead.

Enabling and disabling audio-only fallback

Set the audioFallback property of the properties prop you pass into the OTPublisher component:

// Enable subscriber audio fallback (the default)
// and publisher audio fallback:
<OTPublisher
  properties={{
    audioFallback={
      publisher: true,
    },
  }}
/>
});

// Enable publisher audio fallback and disable subscriber audio fallback:
<OTPublisher
  properties={{
    audioFallback: {
      publisher: true,
      subscriber: false,
    },
  }}
/>

// Enable subscriber audio fallback and disable publisher audio fallback:
<OTPublisher
  properties={{
    audioFallback: {
      publisher: false,
      subscriber: true,
    },
  }}
/>

// Disable both publisher audio fallback (the default)
// and subscriber audio fallback:
<OTPublisher
  properties={{
    audioFallback: {
      subscriber: false,
    },
  }}
/>

The audioFallback object includes two Boolean properties:

  • publisher — Whether to enable (true) or disable (false) publisher audio fallback. With publisher audio fallback enabled, when the stream's quality has degraded significantly (for example, because of network conditions), the publisher disables video in order to preserve audio quality. The default is false (publisher audio fallback is disabled).
  • subscriber — Whether to enable (true) or disable (false) subscriber audio fallback. This setting only applies in routed sessions (sessions that use the Vonage Video Media Router). Subscriber audio fallback is not supported in relayed sessions. With subscriber audio fallback enabled, when the Vonage Video Media Router determines that a stream's quality has degraded significantly for a specific subscriber, it disables the video in that subscriber in order to preserve audio quality. The default is true (subscriber audio fallback is enabled). This setting replaces the audioFallbackEnabled property, which will be deprecated.

Audio fallback events

When publisher audio fallback is enabled, callback methods of the OTPublisher component are invoked in response to changing quality conditions:

  • videoDisableWarning() — Called when the Publisher determines that the stream quality has degraded and the video will be disabled if the quality degrades more.
  • videoDisableWarningLifted() — Called when the Publisher determines that the stream quality has improved to the point at which the video being disabled is not an immediate risk.
  • videoDisabled() — Called when the Publisher determines that the stream quality has degraded and the outgoing video transport has been disabled. Note: while the video is disabled, the Publisher still displays the publisher video (such as the camera image) in the publishing client's UI.
  • videoEnabled() — Called with the reason property set to 'quality' when the Publisher determines that the stream quality has improved and outgoing video transport has been re-enabled.

For example the following code adds event listeners for audio fallback-related events (so that you can provide user interface notifications):

<OTPublisher
  properties={{
    audioFallback: {
      publisher: true,
    }
  }}

  eventHandlers={{
    videoDisableWarning: () => {
      // Add UI notification
    },
    videoDisableWarningLifted: () => {
      // Adjust UI notification
    },
    videoDisabled: () => {
      // Add UI notification
    },
    videoEnabled: () => {
      // Remove UI notification
    },
  }}
/>

From the subscriber’s perspective, the following events indicate that audio fallback has occurred. Although these events are tied to the subscriber, they can occur both due to subscriber audio fallback and as a consequence of publisher audio fallback. In other words, the difference between publisher and subscriber audio fallback is that, in the publisher case, the publishing client may trigger the audio fallback based on its own stream degradation, which is why additional publisher-side events are dispatched. For subscriber audio fallback, the Vonage Video Media Router assesses network degradation affecting the subscriber. In both cases, upon publisher or subscriber audio fallback, subscriber events are always dispatched to indicate that audio fallback has occurred for the receiver.

The OTSubscriber component includes callback methods that are invoked based on events related to the video being enabled or disabled for the subscriber's stream:

videoEnabled() — Called when the video has been enabled after it was previously disabled. videoDisabled() — Called when the video has been disabled. The reason property of the event object indicates why the video was disabled. (This event object is an VideoEnabledChangedEvent object.) videoDisableWarning() — Called when it is determined that the stream quality has degraded and the video will be disabled if the quality degrades more. If the quality degrades further, the Subscriber disables the video and calls the videoDisabled() callback. This event may also be dispatched when using the publisher audio fallback feature if the publisher's stream quality if degraded. videoDisableWarningLifted() — Called when video has been enabled after it was previously disabled. The OTSubscriber videoDisableWarning() and videoDisableWarningLifted() callback methods are only invoked in sessions that use the Media Router (sessions with the media mode set to routed).

For example the following code adds event listeners for audio fallback-related events (so that you can provide user interface notifications):

<OTSubscriber
  eventHandlers={{
    videoDisableWarning: () => {
      // Add UI notification
    },
    videoDisableWarningLifted: () => {
      // Adjust UI notification
    },
    videoDisabled: () => {
      // Add UI notification
    },
    videoEnabled: () => {
      // Remove UI notification
    },
  }}
/>