-
Notifications
You must be signed in to change notification settings - Fork 199
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Experimental WebGL implementation #478
Experimental WebGL implementation #478
Conversation
Fork update before webGL implementation
…/com.unity.webrtc into antoined73-feature/webgl-support # Conflicts: # Runtime/Plugins/WebGL/Context.jslib # Runtime/Plugins/WebGL/RTCDataChannel.jslib # Runtime/Plugins/WebGL/RTCPeerConnection.jslib # Runtime/Scripts/VideoStreamTrack.cs
…/com.unity.webrtc into feature/webgl-support # Conflicts: # Runtime/Plugins/WebGL/Context.jslib # Runtime/Plugins/WebGL/RTCDataChannel.jslib # Runtime/Plugins/WebGL/RTCPeerConnection.jslib # Runtime/Scripts/VideoStreamTrack.cs
Renamed VideoStreamTrack
…/com.unity.webrtc into antoined73-feature/webgl-support # Conflicts: # Runtime/Plugins/WebGL/VideoStreamTrack.jslib.meta
…/com.unity.webrtc into feature/webgl-support
…rom createDataChannel (sender)
# Conflicts: # Runtime/Scripts/AudioStreamTrack.cs # Runtime/Scripts/VideoStreamTrack.cs
…quires the RTCPeerConnection to have a MediaStream to attach to.
# Conflicts: # Runtime/Scripts/AudioStreamTrack.cs
For audio: Not part of this PR, so errors are to be expected. For data channels: as stated in this comment the 'error' is in this case, not an actual error. For stats: I'll take a look, hangup should clean properly, so that needs to be fixed. |
There's a small inconsistency for data channels between the web and standalone. On the web the I suspect the web behaviour is the correct one, but I'm not sure. |
@mukaschultze |
In
after push And push
enviroment
|
In
Sample works fine, but I think |
@nvanofwegen |
Just got back from a long vacation, so I didn't have the time to look at it yet. As for the stats issue and the issues @kannan-xiao4 mentioned, I will inspect those probably somewhere this week. However, I have some things about the webgl implementation in general. This PR is open for half a year now, and every couple of weeks things were added that had to be fixed. Meanwhile, the last rebase is also 5 months old, so I'm pretty sure there are again a lot of issues before this PR can be merged. So what is the roadmap for WebGL? For both this PR and the steps afterwards until it is ready to be merged in develop. The roadmap table in readme.md also hasn't been updated in a while. I'm happy to look at the current issues found, but also patching the last 5 months of development where I'm the only one that can fix it is not something I'm looking forward to... What is the downside of accepting the PR in the coming period, managing the issues here on github, work on the implementation and also let others be able to help? |
@nvanofwegen FYI: I posted this thread for describing our direction. @gtk2k |
No need to apologize! I picked up the work from gtk2k myself! I actually had a lot of fun developing so far. I only think that my lack of a clear understanding of how to proceed took the fun out a bit. About the forum thread, awesome, haven't seen it and already clarifies a bit! With WebGL being a community-based development for the foreseeable future, I do think the proposed approach should be in place rather sooner than later, as this PR is far from a 'release'. In the thread you mention that people can see the progress in this PR, but this PR has become a bit of a dragon (80+ replies). There are several decisions in this PR made about audio, marshalling, refactoring the api, etc, but there is no overview of that. With those new managed issues (like refactoring, marshalling, audio, etc) discussions about the implementation could be better structured and organized and we could have a good overview in one main WebGL issue. |
I've been using mostly the
Totally agree with that |
Thank you for your contribution to WebGL platform support over the long term to this day. About the three points @nvanofwegen mentioned, audio, marshalling, and refactoring audioI think we are considering whether to implement this in the current PR. Since Microphone is not officially supported by Unity, it is possible to implement it by means such as using external assets, but I would like to avoid it as much as possible. marshallingEarlier, @karasusan drew a diagram and commented refactoringRefactor once all the tests pass with the current PR. After that, I think it would be better to consider audio and marshalling, but how about it? If there is something I can help, I would like to help. @karasusan package.jsonには相対アドレスが書かれていますが、これは本来Unity側で認識してくれて、実際のファイルを読み込んでくれるものなのでしょうか? ちなみに Windows (11)です。 試しに、Windowsでのシンボリックリンクに置き換えてみたのですが(Runtime, Editor, TestsフォルダもWindowsシンボリックリンクに変更)、今度はプロジェクトを開くと以下の状態でずっとローディングのままとなってしまいます。(CPU使用率が上がりっぱなしで、一応何らかの処理は行われているようですが。。。) どのようにすればプロジェクトを(Windows)Unityで開けるのでしょうか? |
Sorry for everyone but writing in Japanese is easier for me 🙂 @gtk2k 指摘のあった Windows11 が原因ではないとは思いますが、テスト環境が手元にないので確証はないです。 |
( Excuse me for continuing in Japanese. ) ですが、WebGLにプラットフォームを切り替えるときに Sampleの*.wavファイルで Import が進まなくなってしまいます。 |
@nvanofwegen Hi, our team discussed about this topic.
What our team do
If you have questions, please feel free to ask me. |
* webgl initial plugin * merge with @gtk2k prototype (part 1) * Add newtonsoft json parser in package dependencies * merge with @gtk2k prototype (part 2) * webgl lib compile fixes * WebGL build can be done * bugfix : remove useless condition that brake linux compatibility * Initial WebGL webrtc plugins * Merge branch 'feature/webgl-support' of https://github.com/antoined73/com.unity.webrtc into antoined73-feature/webgl-support * Added OnTextMessage on RTCDataChannel Renamed VideoStreamTrack * Remove duplicate method RegisterRenderingWebRTCPlugin in WebTC.cs * Merge branch 'feature/webgl-support' of https://github.com/antoined73/com.unity.webrtc into antoined73-feature/webgl-support * Signaling is not part of WebRTC specification * Browser crash on DataChannel options using newtonsoft * Added missing ContextUnRegisterMediaStreamObserver, not implemented yet * Removed audio/video offer options * Added missing ReceiverGetStreams, not implemented yet * RTCIceCandidates on WebGL * Moved RTCDataChannel onmessage listeren to OnDataChannel (receiver) from createDataChannel (sender) * Added VideoTrack with MediaStream created by WebGL's getUserMedia. Requires the RTCPeerConnection to have a MediaStream to attach to. * Fixed CreateAudioTrack * Fixed adding getUserMedia stream tracks to unity MediaStream * Enabled open/close/message on both creation and ondatachannel objects * Negotiation workaround Often the candidate message is handled earlier than the description (probably due coroutines when setting the description) For now the icecandidate handling waits 1 second, which is sufficient. But a fix would be to store an ICECandidate queue on the peer connection and handle the queue when the description is set * Workaround to parse datachannel options, jsonutility/newtonsoft have trouble with the Optional fields * Samples: working DataChannels and PeerConnection - Fixed MediaStream getTracks with deserializer - Added adapter.js, should improve browser compatibility - Using objects instead of 'this' in jslib for peer events * Added TextMessage event handling for DataChannels sample * Fix for UpdateRendererTexture 'no video' issue * Temp to show video tracks created by peer.ontrack * getTracks using WebRTC.Deserialize, prevents creation of existing tracks * Using Deserializer for RTP objects * Firefox requires a string, instead of int for credentialType * Fixed optional fields serialization in RTCConfiguration * Disabled context check. Context is already removed when disposing peer/data/media objects * Improved UWManaged array. C# objects can be disposed but still accessed at a later stage * Delete transceiver * Fixed DeleteMediaStreamTrack parameters * Registering stream for videotrack is not needed * Removing video tracks from local/remote video list object on DeleteMediaStreamTrack * Added RegisterMediaStreamObserver, not tested * DataChannel options parsing done in jslib file * Moved parsing of RTCConfiguration * Updated webrtc.dll * Wip: create audiotrack * Corrected RTCConfiguration parsing with new optional fields using enums * Fixed webcam stream from getUserMedia Improved creation of HTMLMediaElements, local and remote tracks are created on AddTrack and ontrack respectively, which enables the receiver to play the received audio stream. The local video track is currently only needed to display the local webcam stream, but is created for every videotrack (todo) * Added a check for RTCDataChannels onclose/open. onclose is fired when already disposed in unity. * Fixed icecandidate struct * Missing import and removed peer label (for now) * Fixed some enum values (including ice/peer connection state) * RTCStats. Not fully checked for every enum/statstype. Note: Requires "jillejr.newtonsoft.json-for-unity" * Don't show video elements * Use strToPtr * RTPParameters * RTPParameters * RTPParameters: removed debug log and added todo * setCodec support, only supported in chrome * Datachannel config parsing to support firefox * Removed debug log * Removed debug logs * Removed dual initializers (sourcetree bug?) * Moved OnRemoveTrack * Added guard for sender track * Moved #!UNITY_WEBGL inside WebRTC.Sync * Reducing the number of #if !UNITY_WEBL directives * Using RTCOfferOptions object * Added todo's * Removed commented lines * Removed comments lines in RTCStats * Removed/optimized some #if webgl directives * Added WebGLSample * Default flip, so the correct image is transported over webrtc * Updated local render method with flip * Updated samples to allow webgl builds * Some comments/codestyle changes * Added getUserMedia TODO * Reverted Android meta change * fix test-case * revert asmdef * fixed compile error * fix compile error (cherry picked from commit 8eb9e4b) * add webgl platform to CI test (cherry picked from commit a478886) * fix yaml (cherry picked from commit 00939df785d1b5da64d7e3ab0795600e4f17d1a1) * fix yaml * fix * fix bug * fix yaml * fix permission * add job to test for webgl platform * WIP test runner and jslib fixes - Runs [Test] methods - Parameterized tests are disabled [TestCase] - Added webgl platform exclude to [UnityTest] - VideoReceiver disabled - AudioStream disabled - (todo) NativeAPI - Fixed several native method bugs * wip NativeAPI test enabled most test cases needs json dll * Passing DataChannelTest * Fixed several tests - Transceiver direction - Ice candidate component (added todo/comments) - MediaStreamAddTrack return value - ContextCreate methods with labels - Dummy TrackSource methods - AudioTrack id (added custom guid field) - MediaStream id (added custom guid field) - Fixed NativeAPITest for WebGL MediaStream tracks length * More test fixes - Replaced return with array [errortype,object] - AddTrack retursn both sender and errortype - SetDescription returns errortype and message. TODO: make async/await to actually return the error(type) * Fixed test cases - Applied OptionalFields for PeerConnection config - Fixed IceTransportPolicy enum - Fixed Set Description of PeerConnection - Enabled VideoReceiveTest (but are commented out) - Added TODOs * fix yaml for package test * Add Preserve attribute for avoiding code stripping * Fixed Transceiver SetCodecsPreferences * Fixed incorrect assert in SenderGetParameter test * Excluded failing tests + added todos * Fixed SetLocalDescriptionWithoutDescription * Added WebGL sample to build settings * add edtitor version for auto-testing on CI * Replaced Pointer_Stringify with UTF8ToString to support 2021.2 * fix: undefined `side` variable * fix: undefined `err` variable * fix: pass byt length to `DataChannelNativeOnMessage` callback * ops... Co-authored-by: Antoine Dezarnaud <dezartoine@hotmail.fr> Co-authored-by: Antoine Dezarnaud <antoine.dezarnaud-ext@epicnpoc.com> Co-authored-by: kazuki <karasusan@gmail.com> Co-authored-by: Muka Schultze <samuelschultze@gmail.com> Co-authored-by: gtk2k <gtk2k@yahoo.co.jp>
* webgl initial plugin * merge with @gtk2k prototype (part 1) * Add newtonsoft json parser in package dependencies * merge with @gtk2k prototype (part 2) * webgl lib compile fixes * WebGL build can be done * bugfix : remove useless condition that brake linux compatibility * Initial WebGL webrtc plugins * Merge branch 'feature/webgl-support' of https://github.com/antoined73/com.unity.webrtc into antoined73-feature/webgl-support * Added OnTextMessage on RTCDataChannel Renamed VideoStreamTrack * Remove duplicate method RegisterRenderingWebRTCPlugin in WebTC.cs * Merge branch 'feature/webgl-support' of https://github.com/antoined73/com.unity.webrtc into antoined73-feature/webgl-support * Signaling is not part of WebRTC specification * Browser crash on DataChannel options using newtonsoft * Added missing ContextUnRegisterMediaStreamObserver, not implemented yet * Removed audio/video offer options * Added missing ReceiverGetStreams, not implemented yet * RTCIceCandidates on WebGL * Moved RTCDataChannel onmessage listeren to OnDataChannel (receiver) from createDataChannel (sender) * Added VideoTrack with MediaStream created by WebGL's getUserMedia. Requires the RTCPeerConnection to have a MediaStream to attach to. * Fixed CreateAudioTrack * Fixed adding getUserMedia stream tracks to unity MediaStream * Enabled open/close/message on both creation and ondatachannel objects * Negotiation workaround Often the candidate message is handled earlier than the description (probably due coroutines when setting the description) For now the icecandidate handling waits 1 second, which is sufficient. But a fix would be to store an ICECandidate queue on the peer connection and handle the queue when the description is set * Workaround to parse datachannel options, jsonutility/newtonsoft have trouble with the Optional fields * Samples: working DataChannels and PeerConnection - Fixed MediaStream getTracks with deserializer - Added adapter.js, should improve browser compatibility - Using objects instead of 'this' in jslib for peer events * Added TextMessage event handling for DataChannels sample * Fix for UpdateRendererTexture 'no video' issue * Temp to show video tracks created by peer.ontrack * getTracks using WebRTC.Deserialize, prevents creation of existing tracks * Using Deserializer for RTP objects * Firefox requires a string, instead of int for credentialType * Fixed optional fields serialization in RTCConfiguration * Disabled context check. Context is already removed when disposing peer/data/media objects * Improved UWManaged array. C# objects can be disposed but still accessed at a later stage * Delete transceiver * Fixed DeleteMediaStreamTrack parameters * Registering stream for videotrack is not needed * Removing video tracks from local/remote video list object on DeleteMediaStreamTrack * Added RegisterMediaStreamObserver, not tested * DataChannel options parsing done in jslib file * Moved parsing of RTCConfiguration * Updated webrtc.dll * Wip: create audiotrack * Corrected RTCConfiguration parsing with new optional fields using enums * Fixed webcam stream from getUserMedia Improved creation of HTMLMediaElements, local and remote tracks are created on AddTrack and ontrack respectively, which enables the receiver to play the received audio stream. The local video track is currently only needed to display the local webcam stream, but is created for every videotrack (todo) * Added a check for RTCDataChannels onclose/open. onclose is fired when already disposed in unity. * Fixed icecandidate struct * Missing import and removed peer label (for now) * Fixed some enum values (including ice/peer connection state) * RTCStats. Not fully checked for every enum/statstype. Note: Requires "jillejr.newtonsoft.json-for-unity" * Don't show video elements * Use strToPtr * RTPParameters * RTPParameters * RTPParameters: removed debug log and added todo * setCodec support, only supported in chrome * Datachannel config parsing to support firefox * Removed debug log * Removed debug logs * Removed dual initializers (sourcetree bug?) * Moved OnRemoveTrack * Added guard for sender track * Moved #!UNITY_WEBGL inside WebRTC.Sync * Reducing the number of #if !UNITY_WEBL directives * Using RTCOfferOptions object * Added todo's * Removed commented lines * Removed comments lines in RTCStats * Removed/optimized some #if webgl directives * Added WebGLSample * Default flip, so the correct image is transported over webrtc * Updated local render method with flip * Updated samples to allow webgl builds * Some comments/codestyle changes * Added getUserMedia TODO * Reverted Android meta change * fix test-case * revert asmdef * fixed compile error * fix compile error (cherry picked from commit 8eb9e4b) * add webgl platform to CI test (cherry picked from commit a478886) * fix yaml (cherry picked from commit 00939df785d1b5da64d7e3ab0795600e4f17d1a1) * fix yaml * fix * fix bug * fix yaml * fix permission * add job to test for webgl platform * WIP test runner and jslib fixes - Runs [Test] methods - Parameterized tests are disabled [TestCase] - Added webgl platform exclude to [UnityTest] - VideoReceiver disabled - AudioStream disabled - (todo) NativeAPI - Fixed several native method bugs * wip NativeAPI test enabled most test cases needs json dll * Passing DataChannelTest * Fixed several tests - Transceiver direction - Ice candidate component (added todo/comments) - MediaStreamAddTrack return value - ContextCreate methods with labels - Dummy TrackSource methods - AudioTrack id (added custom guid field) - MediaStream id (added custom guid field) - Fixed NativeAPITest for WebGL MediaStream tracks length * More test fixes - Replaced return with array [errortype,object] - AddTrack retursn both sender and errortype - SetDescription returns errortype and message. TODO: make async/await to actually return the error(type) * Fixed test cases - Applied OptionalFields for PeerConnection config - Fixed IceTransportPolicy enum - Fixed Set Description of PeerConnection - Enabled VideoReceiveTest (but are commented out) - Added TODOs * fix yaml for package test * Add Preserve attribute for avoiding code stripping * Fixed Transceiver SetCodecsPreferences * Fixed incorrect assert in SenderGetParameter test * Excluded failing tests + added todos * Fixed SetLocalDescriptionWithoutDescription * Added WebGL sample to build settings * add edtitor version for auto-testing on CI * Replaced Pointer_Stringify with UTF8ToString to support 2021.2 * fix: undefined `side` variable * fix: undefined `err` variable * fix: pass byt length to `DataChannelNativeOnMessage` callback * ops... Co-authored-by: Antoine Dezarnaud <dezartoine@hotmail.fr> Co-authored-by: Antoine Dezarnaud <antoine.dezarnaud-ext@epicnpoc.com> Co-authored-by: kazuki <karasusan@gmail.com> Co-authored-by: Muka Schultze <samuelschultze@gmail.com> Co-authored-by: gtk2k <gtk2k@yahoo.co.jp>
* webgl initial plugin * merge with @gtk2k prototype (part 1) * Add newtonsoft json parser in package dependencies * merge with @gtk2k prototype (part 2) * webgl lib compile fixes * WebGL build can be done * bugfix : remove useless condition that brake linux compatibility * Initial WebGL webrtc plugins * Merge branch 'feature/webgl-support' of https://github.com/antoined73/com.unity.webrtc into antoined73-feature/webgl-support * Added OnTextMessage on RTCDataChannel Renamed VideoStreamTrack * Remove duplicate method RegisterRenderingWebRTCPlugin in WebTC.cs * Merge branch 'feature/webgl-support' of https://github.com/antoined73/com.unity.webrtc into antoined73-feature/webgl-support * Signaling is not part of WebRTC specification * Browser crash on DataChannel options using newtonsoft * Added missing ContextUnRegisterMediaStreamObserver, not implemented yet * Removed audio/video offer options * Added missing ReceiverGetStreams, not implemented yet * RTCIceCandidates on WebGL * Moved RTCDataChannel onmessage listeren to OnDataChannel (receiver) from createDataChannel (sender) * Added VideoTrack with MediaStream created by WebGL's getUserMedia. Requires the RTCPeerConnection to have a MediaStream to attach to. * Fixed CreateAudioTrack * Fixed adding getUserMedia stream tracks to unity MediaStream * Enabled open/close/message on both creation and ondatachannel objects * Negotiation workaround Often the candidate message is handled earlier than the description (probably due coroutines when setting the description) For now the icecandidate handling waits 1 second, which is sufficient. But a fix would be to store an ICECandidate queue on the peer connection and handle the queue when the description is set * Workaround to parse datachannel options, jsonutility/newtonsoft have trouble with the Optional fields * Samples: working DataChannels and PeerConnection - Fixed MediaStream getTracks with deserializer - Added adapter.js, should improve browser compatibility - Using objects instead of 'this' in jslib for peer events * Added TextMessage event handling for DataChannels sample * Fix for UpdateRendererTexture 'no video' issue * Temp to show video tracks created by peer.ontrack * getTracks using WebRTC.Deserialize, prevents creation of existing tracks * Using Deserializer for RTP objects * Firefox requires a string, instead of int for credentialType * Fixed optional fields serialization in RTCConfiguration * Disabled context check. Context is already removed when disposing peer/data/media objects * Improved UWManaged array. C# objects can be disposed but still accessed at a later stage * Delete transceiver * Fixed DeleteMediaStreamTrack parameters * Registering stream for videotrack is not needed * Removing video tracks from local/remote video list object on DeleteMediaStreamTrack * Added RegisterMediaStreamObserver, not tested * DataChannel options parsing done in jslib file * Moved parsing of RTCConfiguration * Updated webrtc.dll * Wip: create audiotrack * Corrected RTCConfiguration parsing with new optional fields using enums * Fixed webcam stream from getUserMedia Improved creation of HTMLMediaElements, local and remote tracks are created on AddTrack and ontrack respectively, which enables the receiver to play the received audio stream. The local video track is currently only needed to display the local webcam stream, but is created for every videotrack (todo) * Added a check for RTCDataChannels onclose/open. onclose is fired when already disposed in unity. * Fixed icecandidate struct * Missing import and removed peer label (for now) * Fixed some enum values (including ice/peer connection state) * RTCStats. Not fully checked for every enum/statstype. Note: Requires "jillejr.newtonsoft.json-for-unity" * Don't show video elements * Use strToPtr * RTPParameters * RTPParameters * RTPParameters: removed debug log and added todo * setCodec support, only supported in chrome * Datachannel config parsing to support firefox * Removed debug log * Removed debug logs * Removed dual initializers (sourcetree bug?) * Moved OnRemoveTrack * Added guard for sender track * Moved #!UNITY_WEBGL inside WebRTC.Sync * Reducing the number of #if !UNITY_WEBL directives * Using RTCOfferOptions object * Added todo's * Removed commented lines * Removed comments lines in RTCStats * Removed/optimized some #if webgl directives * Added WebGLSample * Default flip, so the correct image is transported over webrtc * Updated local render method with flip * Updated samples to allow webgl builds * Some comments/codestyle changes * Added getUserMedia TODO * Reverted Android meta change * fix test-case * revert asmdef * fixed compile error * fix compile error (cherry picked from commit 8eb9e4b) * add webgl platform to CI test (cherry picked from commit a478886) * fix yaml (cherry picked from commit 00939df785d1b5da64d7e3ab0795600e4f17d1a1) * fix yaml * fix * fix bug * fix yaml * fix permission * add job to test for webgl platform * WIP test runner and jslib fixes - Runs [Test] methods - Parameterized tests are disabled [TestCase] - Added webgl platform exclude to [UnityTest] - VideoReceiver disabled - AudioStream disabled - (todo) NativeAPI - Fixed several native method bugs * wip NativeAPI test enabled most test cases needs json dll * Passing DataChannelTest * Fixed several tests - Transceiver direction - Ice candidate component (added todo/comments) - MediaStreamAddTrack return value - ContextCreate methods with labels - Dummy TrackSource methods - AudioTrack id (added custom guid field) - MediaStream id (added custom guid field) - Fixed NativeAPITest for WebGL MediaStream tracks length * More test fixes - Replaced return with array [errortype,object] - AddTrack retursn both sender and errortype - SetDescription returns errortype and message. TODO: make async/await to actually return the error(type) * Fixed test cases - Applied OptionalFields for PeerConnection config - Fixed IceTransportPolicy enum - Fixed Set Description of PeerConnection - Enabled VideoReceiveTest (but are commented out) - Added TODOs * fix yaml for package test * Add Preserve attribute for avoiding code stripping * Fixed Transceiver SetCodecsPreferences * Fixed incorrect assert in SenderGetParameter test * Excluded failing tests + added todos * Fixed SetLocalDescriptionWithoutDescription * Added WebGL sample to build settings * add edtitor version for auto-testing on CI * Replaced Pointer_Stringify with UTF8ToString to support 2021.2 * fix: undefined `side` variable * fix: undefined `err` variable * fix: pass byt length to `DataChannelNativeOnMessage` callback * ops... Co-authored-by: Antoine Dezarnaud <dezartoine@hotmail.fr> Co-authored-by: Antoine Dezarnaud <antoine.dezarnaud-ext@epicnpoc.com> Co-authored-by: kazuki <karasusan@gmail.com> Co-authored-by: Muka Schultze <samuelschultze@gmail.com> Co-authored-by: gtk2k <gtk2k@yahoo.co.jp>
* webgl initial plugin * merge with @gtk2k prototype (part 1) * Add newtonsoft json parser in package dependencies * merge with @gtk2k prototype (part 2) * webgl lib compile fixes * WebGL build can be done * bugfix : remove useless condition that brake linux compatibility * Initial WebGL webrtc plugins * Merge branch 'feature/webgl-support' of https://github.com/antoined73/com.unity.webrtc into antoined73-feature/webgl-support * Added OnTextMessage on RTCDataChannel Renamed VideoStreamTrack * Remove duplicate method RegisterRenderingWebRTCPlugin in WebTC.cs * Merge branch 'feature/webgl-support' of https://github.com/antoined73/com.unity.webrtc into antoined73-feature/webgl-support * Signaling is not part of WebRTC specification * Browser crash on DataChannel options using newtonsoft * Added missing ContextUnRegisterMediaStreamObserver, not implemented yet * Removed audio/video offer options * Added missing ReceiverGetStreams, not implemented yet * RTCIceCandidates on WebGL * Moved RTCDataChannel onmessage listeren to OnDataChannel (receiver) from createDataChannel (sender) * Added VideoTrack with MediaStream created by WebGL's getUserMedia. Requires the RTCPeerConnection to have a MediaStream to attach to. * Fixed CreateAudioTrack * Fixed adding getUserMedia stream tracks to unity MediaStream * Enabled open/close/message on both creation and ondatachannel objects * Negotiation workaround Often the candidate message is handled earlier than the description (probably due coroutines when setting the description) For now the icecandidate handling waits 1 second, which is sufficient. But a fix would be to store an ICECandidate queue on the peer connection and handle the queue when the description is set * Workaround to parse datachannel options, jsonutility/newtonsoft have trouble with the Optional fields * Samples: working DataChannels and PeerConnection - Fixed MediaStream getTracks with deserializer - Added adapter.js, should improve browser compatibility - Using objects instead of 'this' in jslib for peer events * Added TextMessage event handling for DataChannels sample * Fix for UpdateRendererTexture 'no video' issue * Temp to show video tracks created by peer.ontrack * getTracks using WebRTC.Deserialize, prevents creation of existing tracks * Using Deserializer for RTP objects * Firefox requires a string, instead of int for credentialType * Fixed optional fields serialization in RTCConfiguration * Disabled context check. Context is already removed when disposing peer/data/media objects * Improved UWManaged array. C# objects can be disposed but still accessed at a later stage * Delete transceiver * Fixed DeleteMediaStreamTrack parameters * Registering stream for videotrack is not needed * Removing video tracks from local/remote video list object on DeleteMediaStreamTrack * Added RegisterMediaStreamObserver, not tested * DataChannel options parsing done in jslib file * Moved parsing of RTCConfiguration * Updated webrtc.dll * Wip: create audiotrack * Corrected RTCConfiguration parsing with new optional fields using enums * Fixed webcam stream from getUserMedia Improved creation of HTMLMediaElements, local and remote tracks are created on AddTrack and ontrack respectively, which enables the receiver to play the received audio stream. The local video track is currently only needed to display the local webcam stream, but is created for every videotrack (todo) * Added a check for RTCDataChannels onclose/open. onclose is fired when already disposed in unity. * Fixed icecandidate struct * Missing import and removed peer label (for now) * Fixed some enum values (including ice/peer connection state) * RTCStats. Not fully checked for every enum/statstype. Note: Requires "jillejr.newtonsoft.json-for-unity" * Don't show video elements * Use strToPtr * RTPParameters * RTPParameters * RTPParameters: removed debug log and added todo * setCodec support, only supported in chrome * Datachannel config parsing to support firefox * Removed debug log * Removed debug logs * Removed dual initializers (sourcetree bug?) * Moved OnRemoveTrack * Added guard for sender track * Moved #!UNITY_WEBGL inside WebRTC.Sync * Reducing the number of #if !UNITY_WEBL directives * Using RTCOfferOptions object * Added todo's * Removed commented lines * Removed comments lines in RTCStats * Removed/optimized some #if webgl directives * Added WebGLSample * Default flip, so the correct image is transported over webrtc * Updated local render method with flip * Updated samples to allow webgl builds * Some comments/codestyle changes * Added getUserMedia TODO * Reverted Android meta change * fix test-case * revert asmdef * fixed compile error * fix compile error (cherry picked from commit 8eb9e4b) * add webgl platform to CI test (cherry picked from commit a478886) * fix yaml (cherry picked from commit 00939df785d1b5da64d7e3ab0795600e4f17d1a1) * fix yaml * fix * fix bug * fix yaml * fix permission * add job to test for webgl platform * WIP test runner and jslib fixes - Runs [Test] methods - Parameterized tests are disabled [TestCase] - Added webgl platform exclude to [UnityTest] - VideoReceiver disabled - AudioStream disabled - (todo) NativeAPI - Fixed several native method bugs * wip NativeAPI test enabled most test cases needs json dll * Passing DataChannelTest * Fixed several tests - Transceiver direction - Ice candidate component (added todo/comments) - MediaStreamAddTrack return value - ContextCreate methods with labels - Dummy TrackSource methods - AudioTrack id (added custom guid field) - MediaStream id (added custom guid field) - Fixed NativeAPITest for WebGL MediaStream tracks length * More test fixes - Replaced return with array [errortype,object] - AddTrack retursn both sender and errortype - SetDescription returns errortype and message. TODO: make async/await to actually return the error(type) * Fixed test cases - Applied OptionalFields for PeerConnection config - Fixed IceTransportPolicy enum - Fixed Set Description of PeerConnection - Enabled VideoReceiveTest (but are commented out) - Added TODOs * fix yaml for package test * Add Preserve attribute for avoiding code stripping * Fixed Transceiver SetCodecsPreferences * Fixed incorrect assert in SenderGetParameter test * Excluded failing tests + added todos * Fixed SetLocalDescriptionWithoutDescription * Added WebGL sample to build settings * add edtitor version for auto-testing on CI * Replaced Pointer_Stringify with UTF8ToString to support 2021.2 * fix: undefined `side` variable * fix: undefined `err` variable * fix: pass byt length to `DataChannelNativeOnMessage` callback * ops... Co-authored-by: Antoine Dezarnaud <dezartoine@hotmail.fr> Co-authored-by: Antoine Dezarnaud <antoine.dezarnaud-ext@epicnpoc.com> Co-authored-by: kazuki <karasusan@gmail.com> Co-authored-by: Muka Schultze <samuelschultze@gmail.com> Co-authored-by: gtk2k <gtk2k@yahoo.co.jp>
* webgl initial plugin * merge with @gtk2k prototype (part 1) * Add newtonsoft json parser in package dependencies * merge with @gtk2k prototype (part 2) * webgl lib compile fixes * WebGL build can be done * bugfix : remove useless condition that brake linux compatibility * Initial WebGL webrtc plugins * Merge branch 'feature/webgl-support' of https://github.com/antoined73/com.unity.webrtc into antoined73-feature/webgl-support * Added OnTextMessage on RTCDataChannel Renamed VideoStreamTrack * Remove duplicate method RegisterRenderingWebRTCPlugin in WebTC.cs * Merge branch 'feature/webgl-support' of https://github.com/antoined73/com.unity.webrtc into antoined73-feature/webgl-support * Signaling is not part of WebRTC specification * Browser crash on DataChannel options using newtonsoft * Added missing ContextUnRegisterMediaStreamObserver, not implemented yet * Removed audio/video offer options * Added missing ReceiverGetStreams, not implemented yet * RTCIceCandidates on WebGL * Moved RTCDataChannel onmessage listeren to OnDataChannel (receiver) from createDataChannel (sender) * Added VideoTrack with MediaStream created by WebGL's getUserMedia. Requires the RTCPeerConnection to have a MediaStream to attach to. * Fixed CreateAudioTrack * Fixed adding getUserMedia stream tracks to unity MediaStream * Enabled open/close/message on both creation and ondatachannel objects * Negotiation workaround Often the candidate message is handled earlier than the description (probably due coroutines when setting the description) For now the icecandidate handling waits 1 second, which is sufficient. But a fix would be to store an ICECandidate queue on the peer connection and handle the queue when the description is set * Workaround to parse datachannel options, jsonutility/newtonsoft have trouble with the Optional fields * Samples: working DataChannels and PeerConnection - Fixed MediaStream getTracks with deserializer - Added adapter.js, should improve browser compatibility - Using objects instead of 'this' in jslib for peer events * Added TextMessage event handling for DataChannels sample * Fix for UpdateRendererTexture 'no video' issue * Temp to show video tracks created by peer.ontrack * getTracks using WebRTC.Deserialize, prevents creation of existing tracks * Using Deserializer for RTP objects * Firefox requires a string, instead of int for credentialType * Fixed optional fields serialization in RTCConfiguration * Disabled context check. Context is already removed when disposing peer/data/media objects * Improved UWManaged array. C# objects can be disposed but still accessed at a later stage * Delete transceiver * Fixed DeleteMediaStreamTrack parameters * Registering stream for videotrack is not needed * Removing video tracks from local/remote video list object on DeleteMediaStreamTrack * Added RegisterMediaStreamObserver, not tested * DataChannel options parsing done in jslib file * Moved parsing of RTCConfiguration * Updated webrtc.dll * Wip: create audiotrack * Corrected RTCConfiguration parsing with new optional fields using enums * Fixed webcam stream from getUserMedia Improved creation of HTMLMediaElements, local and remote tracks are created on AddTrack and ontrack respectively, which enables the receiver to play the received audio stream. The local video track is currently only needed to display the local webcam stream, but is created for every videotrack (todo) * Added a check for RTCDataChannels onclose/open. onclose is fired when already disposed in unity. * Fixed icecandidate struct * Missing import and removed peer label (for now) * Fixed some enum values (including ice/peer connection state) * RTCStats. Not fully checked for every enum/statstype. Note: Requires "jillejr.newtonsoft.json-for-unity" * Don't show video elements * Use strToPtr * RTPParameters * RTPParameters * RTPParameters: removed debug log and added todo * setCodec support, only supported in chrome * Datachannel config parsing to support firefox * Removed debug log * Removed debug logs * Removed dual initializers (sourcetree bug?) * Moved OnRemoveTrack * Added guard for sender track * Moved #!UNITY_WEBGL inside WebRTC.Sync * Reducing the number of #if !UNITY_WEBL directives * Using RTCOfferOptions object * Added todo's * Removed commented lines * Removed comments lines in RTCStats * Removed/optimized some #if webgl directives * Added WebGLSample * Default flip, so the correct image is transported over webrtc * Updated local render method with flip * Updated samples to allow webgl builds * Some comments/codestyle changes * Added getUserMedia TODO * Reverted Android meta change * fix test-case * revert asmdef * fixed compile error * fix compile error (cherry picked from commit 8eb9e4b) * add webgl platform to CI test (cherry picked from commit a478886) * fix yaml (cherry picked from commit 00939df785d1b5da64d7e3ab0795600e4f17d1a1) * fix yaml * fix * fix bug * fix yaml * fix permission * add job to test for webgl platform * WIP test runner and jslib fixes - Runs [Test] methods - Parameterized tests are disabled [TestCase] - Added webgl platform exclude to [UnityTest] - VideoReceiver disabled - AudioStream disabled - (todo) NativeAPI - Fixed several native method bugs * wip NativeAPI test enabled most test cases needs json dll * Passing DataChannelTest * Fixed several tests - Transceiver direction - Ice candidate component (added todo/comments) - MediaStreamAddTrack return value - ContextCreate methods with labels - Dummy TrackSource methods - AudioTrack id (added custom guid field) - MediaStream id (added custom guid field) - Fixed NativeAPITest for WebGL MediaStream tracks length * More test fixes - Replaced return with array [errortype,object] - AddTrack retursn both sender and errortype - SetDescription returns errortype and message. TODO: make async/await to actually return the error(type) * Fixed test cases - Applied OptionalFields for PeerConnection config - Fixed IceTransportPolicy enum - Fixed Set Description of PeerConnection - Enabled VideoReceiveTest (but are commented out) - Added TODOs * fix yaml for package test * Add Preserve attribute for avoiding code stripping * Fixed Transceiver SetCodecsPreferences * Fixed incorrect assert in SenderGetParameter test * Excluded failing tests + added todos * Fixed SetLocalDescriptionWithoutDescription * Added WebGL sample to build settings * add edtitor version for auto-testing on CI * Replaced Pointer_Stringify with UTF8ToString to support 2021.2 * fix: undefined `side` variable * fix: undefined `err` variable * fix: pass byt length to `DataChannelNativeOnMessage` callback * ops... Co-authored-by: Antoine Dezarnaud <dezartoine@hotmail.fr> Co-authored-by: Antoine Dezarnaud <antoine.dezarnaud-ext@epicnpoc.com> Co-authored-by: kazuki <karasusan@gmail.com> Co-authored-by: Muka Schultze <samuelschultze@gmail.com> Co-authored-by: gtk2k <gtk2k@yahoo.co.jp>
* webgl initial plugin * merge with @gtk2k prototype (part 1) * Add newtonsoft json parser in package dependencies * merge with @gtk2k prototype (part 2) * webgl lib compile fixes * WebGL build can be done * bugfix : remove useless condition that brake linux compatibility * Initial WebGL webrtc plugins * Merge branch 'feature/webgl-support' of https://github.com/antoined73/com.unity.webrtc into antoined73-feature/webgl-support * Added OnTextMessage on RTCDataChannel Renamed VideoStreamTrack * Remove duplicate method RegisterRenderingWebRTCPlugin in WebTC.cs * Merge branch 'feature/webgl-support' of https://github.com/antoined73/com.unity.webrtc into antoined73-feature/webgl-support * Signaling is not part of WebRTC specification * Browser crash on DataChannel options using newtonsoft * Added missing ContextUnRegisterMediaStreamObserver, not implemented yet * Removed audio/video offer options * Added missing ReceiverGetStreams, not implemented yet * RTCIceCandidates on WebGL * Moved RTCDataChannel onmessage listeren to OnDataChannel (receiver) from createDataChannel (sender) * Added VideoTrack with MediaStream created by WebGL's getUserMedia. Requires the RTCPeerConnection to have a MediaStream to attach to. * Fixed CreateAudioTrack * Fixed adding getUserMedia stream tracks to unity MediaStream * Enabled open/close/message on both creation and ondatachannel objects * Negotiation workaround Often the candidate message is handled earlier than the description (probably due coroutines when setting the description) For now the icecandidate handling waits 1 second, which is sufficient. But a fix would be to store an ICECandidate queue on the peer connection and handle the queue when the description is set * Workaround to parse datachannel options, jsonutility/newtonsoft have trouble with the Optional fields * Samples: working DataChannels and PeerConnection - Fixed MediaStream getTracks with deserializer - Added adapter.js, should improve browser compatibility - Using objects instead of 'this' in jslib for peer events * Added TextMessage event handling for DataChannels sample * Fix for UpdateRendererTexture 'no video' issue * Temp to show video tracks created by peer.ontrack * getTracks using WebRTC.Deserialize, prevents creation of existing tracks * Using Deserializer for RTP objects * Firefox requires a string, instead of int for credentialType * Fixed optional fields serialization in RTCConfiguration * Disabled context check. Context is already removed when disposing peer/data/media objects * Improved UWManaged array. C# objects can be disposed but still accessed at a later stage * Delete transceiver * Fixed DeleteMediaStreamTrack parameters * Registering stream for videotrack is not needed * Removing video tracks from local/remote video list object on DeleteMediaStreamTrack * Added RegisterMediaStreamObserver, not tested * DataChannel options parsing done in jslib file * Moved parsing of RTCConfiguration * Updated webrtc.dll * Wip: create audiotrack * Corrected RTCConfiguration parsing with new optional fields using enums * Fixed webcam stream from getUserMedia Improved creation of HTMLMediaElements, local and remote tracks are created on AddTrack and ontrack respectively, which enables the receiver to play the received audio stream. The local video track is currently only needed to display the local webcam stream, but is created for every videotrack (todo) * Added a check for RTCDataChannels onclose/open. onclose is fired when already disposed in unity. * Fixed icecandidate struct * Missing import and removed peer label (for now) * Fixed some enum values (including ice/peer connection state) * RTCStats. Not fully checked for every enum/statstype. Note: Requires "jillejr.newtonsoft.json-for-unity" * Don't show video elements * Use strToPtr * RTPParameters * RTPParameters * RTPParameters: removed debug log and added todo * setCodec support, only supported in chrome * Datachannel config parsing to support firefox * Removed debug log * Removed debug logs * Removed dual initializers (sourcetree bug?) * Moved OnRemoveTrack * Added guard for sender track * Moved #!UNITY_WEBGL inside WebRTC.Sync * Reducing the number of #if !UNITY_WEBL directives * Using RTCOfferOptions object * Added todo's * Removed commented lines * Removed comments lines in RTCStats * Removed/optimized some #if webgl directives * Added WebGLSample * Default flip, so the correct image is transported over webrtc * Updated local render method with flip * Updated samples to allow webgl builds * Some comments/codestyle changes * Added getUserMedia TODO * Reverted Android meta change * fix test-case * revert asmdef * fixed compile error * fix compile error (cherry picked from commit 8eb9e4b) * add webgl platform to CI test (cherry picked from commit a478886) * fix yaml (cherry picked from commit 00939df785d1b5da64d7e3ab0795600e4f17d1a1) * fix yaml * fix * fix bug * fix yaml * fix permission * add job to test for webgl platform * WIP test runner and jslib fixes - Runs [Test] methods - Parameterized tests are disabled [TestCase] - Added webgl platform exclude to [UnityTest] - VideoReceiver disabled - AudioStream disabled - (todo) NativeAPI - Fixed several native method bugs * wip NativeAPI test enabled most test cases needs json dll * Passing DataChannelTest * Fixed several tests - Transceiver direction - Ice candidate component (added todo/comments) - MediaStreamAddTrack return value - ContextCreate methods with labels - Dummy TrackSource methods - AudioTrack id (added custom guid field) - MediaStream id (added custom guid field) - Fixed NativeAPITest for WebGL MediaStream tracks length * More test fixes - Replaced return with array [errortype,object] - AddTrack retursn both sender and errortype - SetDescription returns errortype and message. TODO: make async/await to actually return the error(type) * Fixed test cases - Applied OptionalFields for PeerConnection config - Fixed IceTransportPolicy enum - Fixed Set Description of PeerConnection - Enabled VideoReceiveTest (but are commented out) - Added TODOs * fix yaml for package test * Add Preserve attribute for avoiding code stripping * Fixed Transceiver SetCodecsPreferences * Fixed incorrect assert in SenderGetParameter test * Excluded failing tests + added todos * Fixed SetLocalDescriptionWithoutDescription * Added WebGL sample to build settings * add edtitor version for auto-testing on CI * Replaced Pointer_Stringify with UTF8ToString to support 2021.2 * fix: undefined `side` variable * fix: undefined `err` variable * fix: pass byt length to `DataChannelNativeOnMessage` callback * ops... Co-authored-by: Antoine Dezarnaud <dezartoine@hotmail.fr> Co-authored-by: Antoine Dezarnaud <antoine.dezarnaud-ext@epicnpoc.com> Co-authored-by: kazuki <karasusan@gmail.com> Co-authored-by: Muka Schultze <samuelschultze@gmail.com> Co-authored-by: gtk2k <gtk2k@yahoo.co.jp>
* webgl initial plugin * merge with @gtk2k prototype (part 1) * Add newtonsoft json parser in package dependencies * merge with @gtk2k prototype (part 2) * webgl lib compile fixes * WebGL build can be done * bugfix : remove useless condition that brake linux compatibility * Initial WebGL webrtc plugins * Merge branch 'feature/webgl-support' of https://github.com/antoined73/com.unity.webrtc into antoined73-feature/webgl-support * Added OnTextMessage on RTCDataChannel Renamed VideoStreamTrack * Remove duplicate method RegisterRenderingWebRTCPlugin in WebTC.cs * Merge branch 'feature/webgl-support' of https://github.com/antoined73/com.unity.webrtc into antoined73-feature/webgl-support * Signaling is not part of WebRTC specification * Browser crash on DataChannel options using newtonsoft * Added missing ContextUnRegisterMediaStreamObserver, not implemented yet * Removed audio/video offer options * Added missing ReceiverGetStreams, not implemented yet * RTCIceCandidates on WebGL * Moved RTCDataChannel onmessage listeren to OnDataChannel (receiver) from createDataChannel (sender) * Added VideoTrack with MediaStream created by WebGL's getUserMedia. Requires the RTCPeerConnection to have a MediaStream to attach to. * Fixed CreateAudioTrack * Fixed adding getUserMedia stream tracks to unity MediaStream * Enabled open/close/message on both creation and ondatachannel objects * Negotiation workaround Often the candidate message is handled earlier than the description (probably due coroutines when setting the description) For now the icecandidate handling waits 1 second, which is sufficient. But a fix would be to store an ICECandidate queue on the peer connection and handle the queue when the description is set * Workaround to parse datachannel options, jsonutility/newtonsoft have trouble with the Optional fields * Samples: working DataChannels and PeerConnection - Fixed MediaStream getTracks with deserializer - Added adapter.js, should improve browser compatibility - Using objects instead of 'this' in jslib for peer events * Added TextMessage event handling for DataChannels sample * Fix for UpdateRendererTexture 'no video' issue * Temp to show video tracks created by peer.ontrack * getTracks using WebRTC.Deserialize, prevents creation of existing tracks * Using Deserializer for RTP objects * Firefox requires a string, instead of int for credentialType * Fixed optional fields serialization in RTCConfiguration * Disabled context check. Context is already removed when disposing peer/data/media objects * Improved UWManaged array. C# objects can be disposed but still accessed at a later stage * Delete transceiver * Fixed DeleteMediaStreamTrack parameters * Registering stream for videotrack is not needed * Removing video tracks from local/remote video list object on DeleteMediaStreamTrack * Added RegisterMediaStreamObserver, not tested * DataChannel options parsing done in jslib file * Moved parsing of RTCConfiguration * Updated webrtc.dll * Wip: create audiotrack * Corrected RTCConfiguration parsing with new optional fields using enums * Fixed webcam stream from getUserMedia Improved creation of HTMLMediaElements, local and remote tracks are created on AddTrack and ontrack respectively, which enables the receiver to play the received audio stream. The local video track is currently only needed to display the local webcam stream, but is created for every videotrack (todo) * Added a check for RTCDataChannels onclose/open. onclose is fired when already disposed in unity. * Fixed icecandidate struct * Missing import and removed peer label (for now) * Fixed some enum values (including ice/peer connection state) * RTCStats. Not fully checked for every enum/statstype. Note: Requires "jillejr.newtonsoft.json-for-unity" * Don't show video elements * Use strToPtr * RTPParameters * RTPParameters * RTPParameters: removed debug log and added todo * setCodec support, only supported in chrome * Datachannel config parsing to support firefox * Removed debug log * Removed debug logs * Removed dual initializers (sourcetree bug?) * Moved OnRemoveTrack * Added guard for sender track * Moved #!UNITY_WEBGL inside WebRTC.Sync * Reducing the number of #if !UNITY_WEBL directives * Using RTCOfferOptions object * Added todo's * Removed commented lines * Removed comments lines in RTCStats * Removed/optimized some #if webgl directives * Added WebGLSample * Default flip, so the correct image is transported over webrtc * Updated local render method with flip * Updated samples to allow webgl builds * Some comments/codestyle changes * Added getUserMedia TODO * Reverted Android meta change * fix test-case * revert asmdef * fixed compile error * fix compile error (cherry picked from commit 8eb9e4b) * add webgl platform to CI test (cherry picked from commit a478886) * fix yaml (cherry picked from commit 00939df785d1b5da64d7e3ab0795600e4f17d1a1) * fix yaml * fix * fix bug * fix yaml * fix permission * add job to test for webgl platform * WIP test runner and jslib fixes - Runs [Test] methods - Parameterized tests are disabled [TestCase] - Added webgl platform exclude to [UnityTest] - VideoReceiver disabled - AudioStream disabled - (todo) NativeAPI - Fixed several native method bugs * wip NativeAPI test enabled most test cases needs json dll * Passing DataChannelTest * Fixed several tests - Transceiver direction - Ice candidate component (added todo/comments) - MediaStreamAddTrack return value - ContextCreate methods with labels - Dummy TrackSource methods - AudioTrack id (added custom guid field) - MediaStream id (added custom guid field) - Fixed NativeAPITest for WebGL MediaStream tracks length * More test fixes - Replaced return with array [errortype,object] - AddTrack retursn both sender and errortype - SetDescription returns errortype and message. TODO: make async/await to actually return the error(type) * Fixed test cases - Applied OptionalFields for PeerConnection config - Fixed IceTransportPolicy enum - Fixed Set Description of PeerConnection - Enabled VideoReceiveTest (but are commented out) - Added TODOs * fix yaml for package test * Add Preserve attribute for avoiding code stripping * Fixed Transceiver SetCodecsPreferences * Fixed incorrect assert in SenderGetParameter test * Excluded failing tests + added todos * Fixed SetLocalDescriptionWithoutDescription * Added WebGL sample to build settings * add edtitor version for auto-testing on CI * Replaced Pointer_Stringify with UTF8ToString to support 2021.2 * fix: undefined `side` variable * fix: undefined `err` variable * fix: pass byt length to `DataChannelNativeOnMessage` callback * ops... Co-authored-by: Antoine Dezarnaud <dezartoine@hotmail.fr> Co-authored-by: Antoine Dezarnaud <antoine.dezarnaud-ext@epicnpoc.com> Co-authored-by: kazuki <karasusan@gmail.com> Co-authored-by: Muka Schultze <samuelschultze@gmail.com> Co-authored-by: gtk2k <gtk2k@yahoo.co.jp>
* webgl initial plugin * merge with @gtk2k prototype (part 1) * Add newtonsoft json parser in package dependencies * merge with @gtk2k prototype (part 2) * webgl lib compile fixes * WebGL build can be done * bugfix : remove useless condition that brake linux compatibility * Initial WebGL webrtc plugins * Merge branch 'feature/webgl-support' of https://github.com/antoined73/com.unity.webrtc into antoined73-feature/webgl-support * Added OnTextMessage on RTCDataChannel Renamed VideoStreamTrack * Remove duplicate method RegisterRenderingWebRTCPlugin in WebTC.cs * Merge branch 'feature/webgl-support' of https://github.com/antoined73/com.unity.webrtc into antoined73-feature/webgl-support * Signaling is not part of WebRTC specification * Browser crash on DataChannel options using newtonsoft * Added missing ContextUnRegisterMediaStreamObserver, not implemented yet * Removed audio/video offer options * Added missing ReceiverGetStreams, not implemented yet * RTCIceCandidates on WebGL * Moved RTCDataChannel onmessage listeren to OnDataChannel (receiver) from createDataChannel (sender) * Added VideoTrack with MediaStream created by WebGL's getUserMedia. Requires the RTCPeerConnection to have a MediaStream to attach to. * Fixed CreateAudioTrack * Fixed adding getUserMedia stream tracks to unity MediaStream * Enabled open/close/message on both creation and ondatachannel objects * Negotiation workaround Often the candidate message is handled earlier than the description (probably due coroutines when setting the description) For now the icecandidate handling waits 1 second, which is sufficient. But a fix would be to store an ICECandidate queue on the peer connection and handle the queue when the description is set * Workaround to parse datachannel options, jsonutility/newtonsoft have trouble with the Optional fields * Samples: working DataChannels and PeerConnection - Fixed MediaStream getTracks with deserializer - Added adapter.js, should improve browser compatibility - Using objects instead of 'this' in jslib for peer events * Added TextMessage event handling for DataChannels sample * Fix for UpdateRendererTexture 'no video' issue * Temp to show video tracks created by peer.ontrack * getTracks using WebRTC.Deserialize, prevents creation of existing tracks * Using Deserializer for RTP objects * Firefox requires a string, instead of int for credentialType * Fixed optional fields serialization in RTCConfiguration * Disabled context check. Context is already removed when disposing peer/data/media objects * Improved UWManaged array. C# objects can be disposed but still accessed at a later stage * Delete transceiver * Fixed DeleteMediaStreamTrack parameters * Registering stream for videotrack is not needed * Removing video tracks from local/remote video list object on DeleteMediaStreamTrack * Added RegisterMediaStreamObserver, not tested * DataChannel options parsing done in jslib file * Moved parsing of RTCConfiguration * Updated webrtc.dll * Wip: create audiotrack * Corrected RTCConfiguration parsing with new optional fields using enums * Fixed webcam stream from getUserMedia Improved creation of HTMLMediaElements, local and remote tracks are created on AddTrack and ontrack respectively, which enables the receiver to play the received audio stream. The local video track is currently only needed to display the local webcam stream, but is created for every videotrack (todo) * Added a check for RTCDataChannels onclose/open. onclose is fired when already disposed in unity. * Fixed icecandidate struct * Missing import and removed peer label (for now) * Fixed some enum values (including ice/peer connection state) * RTCStats. Not fully checked for every enum/statstype. Note: Requires "jillejr.newtonsoft.json-for-unity" * Don't show video elements * Use strToPtr * RTPParameters * RTPParameters * RTPParameters: removed debug log and added todo * setCodec support, only supported in chrome * Datachannel config parsing to support firefox * Removed debug log * Removed debug logs * Removed dual initializers (sourcetree bug?) * Moved OnRemoveTrack * Added guard for sender track * Moved #!UNITY_WEBGL inside WebRTC.Sync * Reducing the number of #if !UNITY_WEBL directives * Using RTCOfferOptions object * Added todo's * Removed commented lines * Removed comments lines in RTCStats * Removed/optimized some #if webgl directives * Added WebGLSample * Default flip, so the correct image is transported over webrtc * Updated local render method with flip * Updated samples to allow webgl builds * Some comments/codestyle changes * Added getUserMedia TODO * Reverted Android meta change * fix test-case * revert asmdef * fixed compile error * fix compile error (cherry picked from commit 8eb9e4b) * add webgl platform to CI test (cherry picked from commit a478886) * fix yaml (cherry picked from commit 00939df785d1b5da64d7e3ab0795600e4f17d1a1) * fix yaml * fix * fix bug * fix yaml * fix permission * add job to test for webgl platform * WIP test runner and jslib fixes - Runs [Test] methods - Parameterized tests are disabled [TestCase] - Added webgl platform exclude to [UnityTest] - VideoReceiver disabled - AudioStream disabled - (todo) NativeAPI - Fixed several native method bugs * wip NativeAPI test enabled most test cases needs json dll * Passing DataChannelTest * Fixed several tests - Transceiver direction - Ice candidate component (added todo/comments) - MediaStreamAddTrack return value - ContextCreate methods with labels - Dummy TrackSource methods - AudioTrack id (added custom guid field) - MediaStream id (added custom guid field) - Fixed NativeAPITest for WebGL MediaStream tracks length * More test fixes - Replaced return with array [errortype,object] - AddTrack retursn both sender and errortype - SetDescription returns errortype and message. TODO: make async/await to actually return the error(type) * Fixed test cases - Applied OptionalFields for PeerConnection config - Fixed IceTransportPolicy enum - Fixed Set Description of PeerConnection - Enabled VideoReceiveTest (but are commented out) - Added TODOs * fix yaml for package test * Add Preserve attribute for avoiding code stripping * Fixed Transceiver SetCodecsPreferences * Fixed incorrect assert in SenderGetParameter test * Excluded failing tests + added todos * Fixed SetLocalDescriptionWithoutDescription * Added WebGL sample to build settings * add edtitor version for auto-testing on CI * Replaced Pointer_Stringify with UTF8ToString to support 2021.2 * fix: undefined `side` variable * fix: undefined `err` variable * fix: pass byt length to `DataChannelNativeOnMessage` callback * ops... Co-authored-by: Antoine Dezarnaud <dezartoine@hotmail.fr> Co-authored-by: Antoine Dezarnaud <antoine.dezarnaud-ext@epicnpoc.com> Co-authored-by: kazuki <karasusan@gmail.com> Co-authored-by: Muka Schultze <samuelschultze@gmail.com> Co-authored-by: gtk2k <gtk2k@yahoo.co.jp>
* webgl initial plugin * merge with @gtk2k prototype (part 1) * Add newtonsoft json parser in package dependencies * merge with @gtk2k prototype (part 2) * webgl lib compile fixes * WebGL build can be done * bugfix : remove useless condition that brake linux compatibility * Initial WebGL webrtc plugins * Merge branch 'feature/webgl-support' of https://github.com/antoined73/com.unity.webrtc into antoined73-feature/webgl-support * Added OnTextMessage on RTCDataChannel Renamed VideoStreamTrack * Remove duplicate method RegisterRenderingWebRTCPlugin in WebTC.cs * Merge branch 'feature/webgl-support' of https://github.com/antoined73/com.unity.webrtc into antoined73-feature/webgl-support * Signaling is not part of WebRTC specification * Browser crash on DataChannel options using newtonsoft * Added missing ContextUnRegisterMediaStreamObserver, not implemented yet * Removed audio/video offer options * Added missing ReceiverGetStreams, not implemented yet * RTCIceCandidates on WebGL * Moved RTCDataChannel onmessage listeren to OnDataChannel (receiver) from createDataChannel (sender) * Added VideoTrack with MediaStream created by WebGL's getUserMedia. Requires the RTCPeerConnection to have a MediaStream to attach to. * Fixed CreateAudioTrack * Fixed adding getUserMedia stream tracks to unity MediaStream * Enabled open/close/message on both creation and ondatachannel objects * Negotiation workaround Often the candidate message is handled earlier than the description (probably due coroutines when setting the description) For now the icecandidate handling waits 1 second, which is sufficient. But a fix would be to store an ICECandidate queue on the peer connection and handle the queue when the description is set * Workaround to parse datachannel options, jsonutility/newtonsoft have trouble with the Optional fields * Samples: working DataChannels and PeerConnection - Fixed MediaStream getTracks with deserializer - Added adapter.js, should improve browser compatibility - Using objects instead of 'this' in jslib for peer events * Added TextMessage event handling for DataChannels sample * Fix for UpdateRendererTexture 'no video' issue * Temp to show video tracks created by peer.ontrack * getTracks using WebRTC.Deserialize, prevents creation of existing tracks * Using Deserializer for RTP objects * Firefox requires a string, instead of int for credentialType * Fixed optional fields serialization in RTCConfiguration * Disabled context check. Context is already removed when disposing peer/data/media objects * Improved UWManaged array. C# objects can be disposed but still accessed at a later stage * Delete transceiver * Fixed DeleteMediaStreamTrack parameters * Registering stream for videotrack is not needed * Removing video tracks from local/remote video list object on DeleteMediaStreamTrack * Added RegisterMediaStreamObserver, not tested * DataChannel options parsing done in jslib file * Moved parsing of RTCConfiguration * Updated webrtc.dll * Wip: create audiotrack * Corrected RTCConfiguration parsing with new optional fields using enums * Fixed webcam stream from getUserMedia Improved creation of HTMLMediaElements, local and remote tracks are created on AddTrack and ontrack respectively, which enables the receiver to play the received audio stream. The local video track is currently only needed to display the local webcam stream, but is created for every videotrack (todo) * Added a check for RTCDataChannels onclose/open. onclose is fired when already disposed in unity. * Fixed icecandidate struct * Missing import and removed peer label (for now) * Fixed some enum values (including ice/peer connection state) * RTCStats. Not fully checked for every enum/statstype. Note: Requires "jillejr.newtonsoft.json-for-unity" * Don't show video elements * Use strToPtr * RTPParameters * RTPParameters * RTPParameters: removed debug log and added todo * setCodec support, only supported in chrome * Datachannel config parsing to support firefox * Removed debug log * Removed debug logs * Removed dual initializers (sourcetree bug?) * Moved OnRemoveTrack * Added guard for sender track * Moved #!UNITY_WEBGL inside WebRTC.Sync * Reducing the number of #if !UNITY_WEBL directives * Using RTCOfferOptions object * Added todo's * Removed commented lines * Removed comments lines in RTCStats * Removed/optimized some #if webgl directives * Added WebGLSample * Default flip, so the correct image is transported over webrtc * Updated local render method with flip * Updated samples to allow webgl builds * Some comments/codestyle changes * Added getUserMedia TODO * Reverted Android meta change * fix test-case * revert asmdef * fixed compile error * fix compile error (cherry picked from commit 8eb9e4b) * add webgl platform to CI test (cherry picked from commit a478886) * fix yaml (cherry picked from commit 00939df785d1b5da64d7e3ab0795600e4f17d1a1) * fix yaml * fix * fix bug * fix yaml * fix permission * add job to test for webgl platform * WIP test runner and jslib fixes - Runs [Test] methods - Parameterized tests are disabled [TestCase] - Added webgl platform exclude to [UnityTest] - VideoReceiver disabled - AudioStream disabled - (todo) NativeAPI - Fixed several native method bugs * wip NativeAPI test enabled most test cases needs json dll * Passing DataChannelTest * Fixed several tests - Transceiver direction - Ice candidate component (added todo/comments) - MediaStreamAddTrack return value - ContextCreate methods with labels - Dummy TrackSource methods - AudioTrack id (added custom guid field) - MediaStream id (added custom guid field) - Fixed NativeAPITest for WebGL MediaStream tracks length * More test fixes - Replaced return with array [errortype,object] - AddTrack retursn both sender and errortype - SetDescription returns errortype and message. TODO: make async/await to actually return the error(type) * Fixed test cases - Applied OptionalFields for PeerConnection config - Fixed IceTransportPolicy enum - Fixed Set Description of PeerConnection - Enabled VideoReceiveTest (but are commented out) - Added TODOs * fix yaml for package test * Add Preserve attribute for avoiding code stripping * Fixed Transceiver SetCodecsPreferences * Fixed incorrect assert in SenderGetParameter test * Excluded failing tests + added todos * Fixed SetLocalDescriptionWithoutDescription * Added WebGL sample to build settings * add edtitor version for auto-testing on CI * Replaced Pointer_Stringify with UTF8ToString to support 2021.2 * fix: undefined `side` variable * fix: undefined `err` variable * fix: pass byt length to `DataChannelNativeOnMessage` callback * ops... Co-authored-by: Antoine Dezarnaud <dezartoine@hotmail.fr> Co-authored-by: Antoine Dezarnaud <antoine.dezarnaud-ext@epicnpoc.com> Co-authored-by: kazuki <karasusan@gmail.com> Co-authored-by: Muka Schultze <samuelschultze@gmail.com> Co-authored-by: gtk2k <gtk2k@yahoo.co.jp>
* webgl initial plugin * merge with @gtk2k prototype (part 1) * Add newtonsoft json parser in package dependencies * merge with @gtk2k prototype (part 2) * webgl lib compile fixes * WebGL build can be done * bugfix : remove useless condition that brake linux compatibility * Initial WebGL webrtc plugins * Merge branch 'feature/webgl-support' of https://github.com/antoined73/com.unity.webrtc into antoined73-feature/webgl-support * Added OnTextMessage on RTCDataChannel Renamed VideoStreamTrack * Remove duplicate method RegisterRenderingWebRTCPlugin in WebTC.cs * Merge branch 'feature/webgl-support' of https://github.com/antoined73/com.unity.webrtc into antoined73-feature/webgl-support * Signaling is not part of WebRTC specification * Browser crash on DataChannel options using newtonsoft * Added missing ContextUnRegisterMediaStreamObserver, not implemented yet * Removed audio/video offer options * Added missing ReceiverGetStreams, not implemented yet * RTCIceCandidates on WebGL * Moved RTCDataChannel onmessage listeren to OnDataChannel (receiver) from createDataChannel (sender) * Added VideoTrack with MediaStream created by WebGL's getUserMedia. Requires the RTCPeerConnection to have a MediaStream to attach to. * Fixed CreateAudioTrack * Fixed adding getUserMedia stream tracks to unity MediaStream * Enabled open/close/message on both creation and ondatachannel objects * Negotiation workaround Often the candidate message is handled earlier than the description (probably due coroutines when setting the description) For now the icecandidate handling waits 1 second, which is sufficient. But a fix would be to store an ICECandidate queue on the peer connection and handle the queue when the description is set * Workaround to parse datachannel options, jsonutility/newtonsoft have trouble with the Optional fields * Samples: working DataChannels and PeerConnection - Fixed MediaStream getTracks with deserializer - Added adapter.js, should improve browser compatibility - Using objects instead of 'this' in jslib for peer events * Added TextMessage event handling for DataChannels sample * Fix for UpdateRendererTexture 'no video' issue * Temp to show video tracks created by peer.ontrack * getTracks using WebRTC.Deserialize, prevents creation of existing tracks * Using Deserializer for RTP objects * Firefox requires a string, instead of int for credentialType * Fixed optional fields serialization in RTCConfiguration * Disabled context check. Context is already removed when disposing peer/data/media objects * Improved UWManaged array. C# objects can be disposed but still accessed at a later stage * Delete transceiver * Fixed DeleteMediaStreamTrack parameters * Registering stream for videotrack is not needed * Removing video tracks from local/remote video list object on DeleteMediaStreamTrack * Added RegisterMediaStreamObserver, not tested * DataChannel options parsing done in jslib file * Moved parsing of RTCConfiguration * Updated webrtc.dll * Wip: create audiotrack * Corrected RTCConfiguration parsing with new optional fields using enums * Fixed webcam stream from getUserMedia Improved creation of HTMLMediaElements, local and remote tracks are created on AddTrack and ontrack respectively, which enables the receiver to play the received audio stream. The local video track is currently only needed to display the local webcam stream, but is created for every videotrack (todo) * Added a check for RTCDataChannels onclose/open. onclose is fired when already disposed in unity. * Fixed icecandidate struct * Missing import and removed peer label (for now) * Fixed some enum values (including ice/peer connection state) * RTCStats. Not fully checked for every enum/statstype. Note: Requires "jillejr.newtonsoft.json-for-unity" * Don't show video elements * Use strToPtr * RTPParameters * RTPParameters * RTPParameters: removed debug log and added todo * setCodec support, only supported in chrome * Datachannel config parsing to support firefox * Removed debug log * Removed debug logs * Removed dual initializers (sourcetree bug?) * Moved OnRemoveTrack * Added guard for sender track * Moved #!UNITY_WEBGL inside WebRTC.Sync * Reducing the number of #if !UNITY_WEBL directives * Using RTCOfferOptions object * Added todo's * Removed commented lines * Removed comments lines in RTCStats * Removed/optimized some #if webgl directives * Added WebGLSample * Default flip, so the correct image is transported over webrtc * Updated local render method with flip * Updated samples to allow webgl builds * Some comments/codestyle changes * Added getUserMedia TODO * Reverted Android meta change * fix test-case * revert asmdef * fixed compile error * fix compile error (cherry picked from commit 8eb9e4b) * add webgl platform to CI test (cherry picked from commit a478886) * fix yaml (cherry picked from commit 00939df785d1b5da64d7e3ab0795600e4f17d1a1) * fix yaml * fix * fix bug * fix yaml * fix permission * add job to test for webgl platform * WIP test runner and jslib fixes - Runs [Test] methods - Parameterized tests are disabled [TestCase] - Added webgl platform exclude to [UnityTest] - VideoReceiver disabled - AudioStream disabled - (todo) NativeAPI - Fixed several native method bugs * wip NativeAPI test enabled most test cases needs json dll * Passing DataChannelTest * Fixed several tests - Transceiver direction - Ice candidate component (added todo/comments) - MediaStreamAddTrack return value - ContextCreate methods with labels - Dummy TrackSource methods - AudioTrack id (added custom guid field) - MediaStream id (added custom guid field) - Fixed NativeAPITest for WebGL MediaStream tracks length * More test fixes - Replaced return with array [errortype,object] - AddTrack retursn both sender and errortype - SetDescription returns errortype and message. TODO: make async/await to actually return the error(type) * Fixed test cases - Applied OptionalFields for PeerConnection config - Fixed IceTransportPolicy enum - Fixed Set Description of PeerConnection - Enabled VideoReceiveTest (but are commented out) - Added TODOs * fix yaml for package test * Add Preserve attribute for avoiding code stripping * Fixed Transceiver SetCodecsPreferences * Fixed incorrect assert in SenderGetParameter test * Excluded failing tests + added todos * Fixed SetLocalDescriptionWithoutDescription * Added WebGL sample to build settings * add edtitor version for auto-testing on CI * Replaced Pointer_Stringify with UTF8ToString to support 2021.2 * fix: undefined `side` variable * fix: undefined `err` variable * fix: pass byt length to `DataChannelNativeOnMessage` callback * ops... Co-authored-by: Antoine Dezarnaud <dezartoine@hotmail.fr> Co-authored-by: Antoine Dezarnaud <antoine.dezarnaud-ext@epicnpoc.com> Co-authored-by: kazuki <karasusan@gmail.com> Co-authored-by: Muka Schultze <samuelschultze@gmail.com> Co-authored-by: gtk2k <gtk2k@yahoo.co.jp>
* webgl initial plugin * merge with @gtk2k prototype (part 1) * Add newtonsoft json parser in package dependencies * merge with @gtk2k prototype (part 2) * webgl lib compile fixes * WebGL build can be done * bugfix : remove useless condition that brake linux compatibility * Initial WebGL webrtc plugins * Merge branch 'feature/webgl-support' of https://github.com/antoined73/com.unity.webrtc into antoined73-feature/webgl-support * Added OnTextMessage on RTCDataChannel Renamed VideoStreamTrack * Remove duplicate method RegisterRenderingWebRTCPlugin in WebTC.cs * Merge branch 'feature/webgl-support' of https://github.com/antoined73/com.unity.webrtc into antoined73-feature/webgl-support * Signaling is not part of WebRTC specification * Browser crash on DataChannel options using newtonsoft * Added missing ContextUnRegisterMediaStreamObserver, not implemented yet * Removed audio/video offer options * Added missing ReceiverGetStreams, not implemented yet * RTCIceCandidates on WebGL * Moved RTCDataChannel onmessage listeren to OnDataChannel (receiver) from createDataChannel (sender) * Added VideoTrack with MediaStream created by WebGL's getUserMedia. Requires the RTCPeerConnection to have a MediaStream to attach to. * Fixed CreateAudioTrack * Fixed adding getUserMedia stream tracks to unity MediaStream * Enabled open/close/message on both creation and ondatachannel objects * Negotiation workaround Often the candidate message is handled earlier than the description (probably due coroutines when setting the description) For now the icecandidate handling waits 1 second, which is sufficient. But a fix would be to store an ICECandidate queue on the peer connection and handle the queue when the description is set * Workaround to parse datachannel options, jsonutility/newtonsoft have trouble with the Optional fields * Samples: working DataChannels and PeerConnection - Fixed MediaStream getTracks with deserializer - Added adapter.js, should improve browser compatibility - Using objects instead of 'this' in jslib for peer events * Added TextMessage event handling for DataChannels sample * Fix for UpdateRendererTexture 'no video' issue * Temp to show video tracks created by peer.ontrack * getTracks using WebRTC.Deserialize, prevents creation of existing tracks * Using Deserializer for RTP objects * Firefox requires a string, instead of int for credentialType * Fixed optional fields serialization in RTCConfiguration * Disabled context check. Context is already removed when disposing peer/data/media objects * Improved UWManaged array. C# objects can be disposed but still accessed at a later stage * Delete transceiver * Fixed DeleteMediaStreamTrack parameters * Registering stream for videotrack is not needed * Removing video tracks from local/remote video list object on DeleteMediaStreamTrack * Added RegisterMediaStreamObserver, not tested * DataChannel options parsing done in jslib file * Moved parsing of RTCConfiguration * Updated webrtc.dll * Wip: create audiotrack * Corrected RTCConfiguration parsing with new optional fields using enums * Fixed webcam stream from getUserMedia Improved creation of HTMLMediaElements, local and remote tracks are created on AddTrack and ontrack respectively, which enables the receiver to play the received audio stream. The local video track is currently only needed to display the local webcam stream, but is created for every videotrack (todo) * Added a check for RTCDataChannels onclose/open. onclose is fired when already disposed in unity. * Fixed icecandidate struct * Missing import and removed peer label (for now) * Fixed some enum values (including ice/peer connection state) * RTCStats. Not fully checked for every enum/statstype. Note: Requires "jillejr.newtonsoft.json-for-unity" * Don't show video elements * Use strToPtr * RTPParameters * RTPParameters * RTPParameters: removed debug log and added todo * setCodec support, only supported in chrome * Datachannel config parsing to support firefox * Removed debug log * Removed debug logs * Removed dual initializers (sourcetree bug?) * Moved OnRemoveTrack * Added guard for sender track * Moved #!UNITY_WEBGL inside WebRTC.Sync * Reducing the number of #if !UNITY_WEBL directives * Using RTCOfferOptions object * Added todo's * Removed commented lines * Removed comments lines in RTCStats * Removed/optimized some #if webgl directives * Added WebGLSample * Default flip, so the correct image is transported over webrtc * Updated local render method with flip * Updated samples to allow webgl builds * Some comments/codestyle changes * Added getUserMedia TODO * Reverted Android meta change * fix test-case * revert asmdef * fixed compile error * fix compile error (cherry picked from commit 8eb9e4b) * add webgl platform to CI test (cherry picked from commit a478886) * fix yaml (cherry picked from commit 00939df785d1b5da64d7e3ab0795600e4f17d1a1) * fix yaml * fix * fix bug * fix yaml * fix permission * add job to test for webgl platform * WIP test runner and jslib fixes - Runs [Test] methods - Parameterized tests are disabled [TestCase] - Added webgl platform exclude to [UnityTest] - VideoReceiver disabled - AudioStream disabled - (todo) NativeAPI - Fixed several native method bugs * wip NativeAPI test enabled most test cases needs json dll * Passing DataChannelTest * Fixed several tests - Transceiver direction - Ice candidate component (added todo/comments) - MediaStreamAddTrack return value - ContextCreate methods with labels - Dummy TrackSource methods - AudioTrack id (added custom guid field) - MediaStream id (added custom guid field) - Fixed NativeAPITest for WebGL MediaStream tracks length * More test fixes - Replaced return with array [errortype,object] - AddTrack retursn both sender and errortype - SetDescription returns errortype and message. TODO: make async/await to actually return the error(type) * Fixed test cases - Applied OptionalFields for PeerConnection config - Fixed IceTransportPolicy enum - Fixed Set Description of PeerConnection - Enabled VideoReceiveTest (but are commented out) - Added TODOs * fix yaml for package test * Add Preserve attribute for avoiding code stripping * Fixed Transceiver SetCodecsPreferences * Fixed incorrect assert in SenderGetParameter test * Excluded failing tests + added todos * Fixed SetLocalDescriptionWithoutDescription * Added WebGL sample to build settings * add edtitor version for auto-testing on CI * Replaced Pointer_Stringify with UTF8ToString to support 2021.2 * fix: undefined `side` variable * fix: undefined `err` variable * fix: pass byt length to `DataChannelNativeOnMessage` callback * ops... Co-authored-by: Antoine Dezarnaud <dezartoine@hotmail.fr> Co-authored-by: Antoine Dezarnaud <antoine.dezarnaud-ext@epicnpoc.com> Co-authored-by: kazuki <karasusan@gmail.com> Co-authored-by: Muka Schultze <samuelschultze@gmail.com> Co-authored-by: gtk2k <gtk2k@yahoo.co.jp>
First and foremost, thanking @gtk2k for making the fundamental code which was used to make this contribution.
Summary
This PR adds experimental functionality for the WebGL platform, including:
A demo can be accessed here: https://d1ddjbgn3ezoae.cloudfront.net
Known issues/limitations
Audio
Video
Firefox
http://localhost:port
(which is the hostname when you Build and Run and Unity hosts the files). However, the hostnamehttp://localhost:port/path
works. So serving the files with your own toolkit can be used as a workaround (eg jetbrains/vscode/apache/nginx)Improvements/todo