This message was deleted.
# helpdesk
s
This message was deleted.
m
cc @polite-kilobyte-67570
p
Hi I think I solved the problem by using
importmap
to get the
import
functionality working. In particular, for
livekit-client
package import from `npm`:
Copy code
<script type="importmap">
  { "imports": {
      "livekit-client": "<https://ga.jspm.io/npm:livekit-client@1.9.6/dist/livekit-client.esm.mjs>"
  } }
</script>
Once this is established, I could then define
<script type="module"></script>
and finally within this script block the
import
functionality works. Hope this helps out anyone who might be stuck with vanilla JS for platform compatibility reasons. Though having a Livekit JS variable that could be accessed directly would ideally be easier.
p
hey @prehistoric-ocean-34446, your workaround should work just fine (on all browsers that support js modules natively). For setups like yours we bundle an additional umd version. If you load the
umd
version of livekit client, you can access it with
window.LivekitClient
directly in the browser. Hope that helps. You can also load it directly in a script tag from unpackage from
<https://www.unpkg.com/livekit-client@1.9.6>