https://kotlinlang.org logo
#webassembly
Title
# webassembly
a

Abdul Basit

12/12/2023, 6:04 AM
Hello, I am try to use Camera on Compose Web. In Common, i have
Copy code
@Composable
expect fun CameraView(
    modifier: Modifier
)
and implementation on each platform. Working best on Android and iOS. Now wondering about Web. What i have done on web is that i have added a
div
tag and once i create a dynamic video element, then i replace that
div
with my
videoElement
because i need to add that to
dom
. I was wondering if there is any better approach like we do in iOS and Android, returning
UIKitView
or
AndroidView
o

Oleksandr Karpovich [JB]

12/12/2023, 9:14 AM
From CfW perspective, the interop with native/html/embedded views has not been thought about yet. Anyway, I think some other developers tried to implement something like that in their projects. I guess it's worth asking in #compose-web
a

Abdul Basit

12/12/2023, 2:16 PM
Let me drop it here, thanks.
s

soufianehamama9

12/14/2023, 2:58 PM
@Abdul Basit did you find something??
a

Abdul Basit

12/14/2023, 3:00 PM
Not yet, but the above mentioned way works
s

soufianehamama9

12/14/2023, 3:08 PM
Thanks i will try it