IWithMutableAudio.cs 1.2 KB

1234567891011121314151617181920212223242526272829303132333435
  1. // Copyright (c) 2022 Vuplex Inc. All rights reserved.
  2. //
  3. // Licensed under the Vuplex Commercial Software Library License, you may
  4. // not use this file except in compliance with the License. You may obtain
  5. // a copy of the License at
  6. //
  7. // https://vuplex.com/commercial-library-license
  8. //
  9. // Unless required by applicable law or agreed to in writing, software
  10. // distributed under the License is distributed on an "AS IS" BASIS,
  11. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. // See the License for the specific language governing permissions and
  13. // limitations under the License.
  14. namespace Vuplex.WebView {
  15. /// <summary>
  16. /// An interface implemented by a webview if it supports muting audio.
  17. /// </summary>
  18. /// <example>
  19. /// <code>
  20. /// await webViewPrefab.WaitUntilInitialized();
  21. /// var mutableWebView = webViewPrefab.WebView as IWithMutableAudio;
  22. /// if (mutableWebView != null) {
  23. /// mutableWebView.SetAudioMuted(true);
  24. /// }
  25. /// </code>
  26. /// </example>
  27. public interface IWithMutableAudio {
  28. /// <summary>
  29. /// Sets whether audio is muted. The default is `false`.
  30. /// </summary>
  31. void SetAudioMuted(bool muted);
  32. }
  33. }