diff --git a/src/core/stream/representation/representation_stream.ts b/src/core/stream/representation/representation_stream.ts index 9075de5598..1a619eebfd 100644 --- a/src/core/stream/representation/representation_stream.ts +++ b/src/core/stream/representation/representation_stream.ts @@ -213,7 +213,7 @@ export default function RepresentationStream( const canStream = new SharedReference(true); playbackObserver.listen((observation) => { - const observationCanStream = observation.canStream ?? true + const observationCanStream = observation.canStream ?? true; if (canStream.getValue() !== observationCanStream) { log.debug("Stream: observation.canStream updated to", observationCanStream); canStream.setValue(observationCanStream); diff --git a/src/experimental/tools/VideoThumbnailLoader/prepare_source_buffer.ts b/src/experimental/tools/VideoThumbnailLoader/prepare_source_buffer.ts index c234e2cfb1..4dc3224bf7 100644 --- a/src/experimental/tools/VideoThumbnailLoader/prepare_source_buffer.ts +++ b/src/experimental/tools/VideoThumbnailLoader/prepare_source_buffer.ts @@ -69,7 +69,7 @@ export default function prepareSourceBuffer( resetMediaElement(videoElement, objectURL); }); } - if (isManagedMediaSource) { + if (isManagedMediaSource && "disableRemotePlayback" in videoElement) { const disableRemotePlaybackPreviousValue = videoElement.disableRemotePlayback; cleanUpSignal.register(() => { /** @@ -78,7 +78,6 @@ export default function prepareSourceBuffer( * by the application before calling the RxPlayer. */ if ( - "disableRemotePlayback" in videoElement && disableRemotePlaybackPreviousValue !== undefined ) { videoElement.disableRemotePlayback = disableRemotePlaybackPreviousValue; diff --git a/src/main_thread/init/multi_thread_content_initializer.ts b/src/main_thread/init/multi_thread_content_initializer.ts index d39686ab55..d2446c3026 100644 --- a/src/main_thread/init/multi_thread_content_initializer.ts +++ b/src/main_thread/init/multi_thread_content_initializer.ts @@ -1814,7 +1814,7 @@ export default class MultiThreadContentInitializer extends ContentInitializer { }); mediaSourceStatus.setValue(MediaSourceInitializationStatus.Attached); - if (isManagedMediaSource) { + if (isManagedMediaSource && "disableRemotePlayback" in mediaElement) { const disableRemotePlaybackPreviousValue = mediaElement.disableRemotePlayback; this._currentMediaSourceCanceller.signal.register(() => { @@ -1824,7 +1824,6 @@ export default class MultiThreadContentInitializer extends ContentInitializer { * before calling the RxPlayer. */ if ( - "disableRemotePlayback" in mediaElement && disableRemotePlaybackPreviousValue !== undefined ) { mediaElement.disableRemotePlayback = diff --git a/src/main_thread/init/utils/create_media_source.ts b/src/main_thread/init/utils/create_media_source.ts index 8ac51437ea..fb72528f0a 100644 --- a/src/main_thread/init/utils/create_media_source.ts +++ b/src/main_thread/init/utils/create_media_source.ts @@ -80,7 +80,7 @@ function createMediaSource( resetMediaElement(mediaElement, oldSrc); const mediaSource = new MainMediaSourceInterface(generateMediaSourceId()); - if (isManagedMediaSource) { + if (isManagedMediaSource && "disableRemotePlayback" in mediaElement) { const disableRemotePlaybackPreviousValue = mediaElement.disableRemotePlayback; unlinkSignal.register(() => { /** @@ -89,7 +89,6 @@ function createMediaSource( * by the application before calling the RxPlayer. */ if ( - "disableRemotePlayback" in mediaElement && disableRemotePlaybackPreviousValue !== undefined ) { mediaElement.disableRemotePlayback = disableRemotePlaybackPreviousValue;