Source: lib/config/codec_switching_strategy.js

  1. /*! @license
  2. * Shaka Player
  3. * Copyright 2016 Google LLC
  4. * SPDX-License-Identifier: Apache-2.0
  5. */
  6. goog.provide('shaka.config.CodecSwitchingStrategy');
  7. /**
  8. * @enum {string}
  9. * @export
  10. */
  11. shaka.config.CodecSwitchingStrategy = {
  12. // Allow codec switching which will always involve reloading the
  13. // `MediaSource`.
  14. RELOAD: 'reload',
  15. // Allow codec switching; determine if `SourceBuffer.changeType` is available
  16. // and attempt to use this first, but fall back to reloading `MediaSource` if
  17. // not available.
  18. //
  19. // Note: Some devices that support `SourceBuffer.changeType` can become stuck
  20. // in a pause state.
  21. SMOOTH: 'smooth',
  22. };