Fix an issue that the stream does not start properly on the remote side when the video is turned off #1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fix an issue that the stream does not start properly on the remote side when the video is turned off.
This pull request introduces support for dummy video streams to address compatibility issues in certain browsers where audio streams require accompanying video streams to play correctly. Key changes include adding logic for creating and disposing of dummy canvas streams, modifying conditions for video track handling, and ensuring proper cleanup of dummy streams.
Dummy Video Stream Support:
videoIsDummy
property toLocalTracks
class: This property tracks whether the current video stream is a dummy stream. ([static/js/index.jsR68](https://github.com/NII-cloud-operation/ep_webrtc/pull/1/files#diff-545ec6b75710fc34567f877877c541f0924c8ddde8f96af69489209ef551eb94R68)
)createDummyCanvasStream
anddisposeDummyCanvasStream
methods to generate and clean up a dummy video stream using a canvas element. ([[1]](https://github.com/NII-cloud-operation/ep_webrtc/pull/1/files#diff-545ec6b75710fc34567f877877c541f0924c8ddde8f96af69489209ef551eb94R531-R575)
,[[2]](https://github.com/NII-cloud-operation/ep_webrtc/pull/1/files#diff-545ec6b75710fc34567f877877c541f0924c8ddde8f96af69489209ef551eb94R644)
)videoIsDummy
accordingly. ([[1]](https://github.com/NII-cloud-operation/ep_webrtc/pull/1/files#diff-545ec6b75710fc34567f877877c541f0924c8ddde8f96af69489209ef551eb94L451-R456)
,[[2]](https://github.com/NII-cloud-operation/ep_webrtc/pull/1/files#diff-545ec6b75710fc34567f877877c541f0924c8ddde8f96af69489209ef551eb94R497-R499)
)Compatibility Improvements:
playVideo
method: Updated conditions to specifically check for enabled video tracks, preventing indefinite blocking when no video tracks are active. ([static/js/index.jsL629-R679](https://github.com/NII-cloud-operation/ep_webrtc/pull/1/files#diff-545ec6b75710fc34567f877877c541f0924c8ddde8f96af69489209ef551eb94L629-R679)
)Activation Logic Adjustment:
_activated
check in RTC message handling: Ensured that RTC messages are processed only when the RTC instance is activated. ([static/js/index.jsL331-R336](https://github.com/NII-cloud-operation/ep_webrtc/pull/1/files#diff-545ec6b75710fc34567f877877c541f0924c8ddde8f96af69489209ef551eb94L331-R336)
)