sebheron / TikTokLiveSharp

Port of TikTok live library for C#
60 stars 49 forks source link

Not working with WebGL #19

Open MartinMbae opened 2 years ago

MartinMbae commented 2 years ago

When building for WEB, I get the error "Dynamic linking is not supported in WebAssembly builds due to limitations to performance and code size." Is there a workaround for this.

image
brogrammer1337 commented 2 years ago

WebGL does not work for me either. However, I have other errors.

Bildschirmfoto 2022-09-10 um 16 01 36
brogrammer1337 commented 2 years ago

I think I found the solution.

using System.Net.WebSockets

does not work on WebGL or Android/iOS.

This framework would need to be replaced. Can you do that @sebheron ?

sebheron commented 2 years ago

@brogrammer1337 How did you figure this out? Just curious

Maybe, I'll have to look into it.

brogrammer1337 commented 2 years ago

@sebheron I have created a project myself using websockets....

The problem with WebGL is that the normal websockets don't run in the browser. They have to be programmed in javascript and then imported. There are already some solutions for this.

With WebGL it is most certainly due to this problem. I'm just guessing that it's the same problem on iOS and Android. If you google "whether System.Net.WebSockets works on iOS", you will find similar problems.

As I see it, only the framework for the websockets needs to be swapped.

sebheron commented 2 years ago

@brogrammer1337 Ah okay, it's useful to know all this.

There's NativeWebSockets which might solve this problem then. Feel free to give it a go, I'll try this out myself when I get some spare time.