Music-Bot-for-Jitsi / jitsi-api-client

A typescript client for the jitsi api
https://deno.land/x/jitsi_api_client/
GNU Affero General Public License v3.0
0 stars 0 forks source link

Cannot be served via https #13

Open p-fruck opened 2 years ago

p-fruck commented 2 years ago

Description

At the moment, the api client cannot be served via https, because the require function which takes import.meta.url as an parameter must be a file.

Steps to reproduce:

Steps to reproduce the behavior:

  1. Include the api client in a project
  2. Try to join a conference
  3. See error

What was supposed to happen?

It should be possible to include the client via web.

Log If your log provides any additional information by chance, please paste it here. Remove this section if it is not necessary.

 deno run --location=https://jimmi.xyz/fake/ --allow-read --allow-net --allow-env t.ts 
error: Uncaught TypeError: The URL must be of scheme file
    throw new ERR_INVALID_URL_SCHEME("file");
          ^
    at fileURLToPath (https://deno.land/std@0.129.0/node/url.ts:1198:11)
    at createRequire (https://deno.land/std@0.129.0/node/module.ts:685:20)
    at https://raw.githubusercontent.com/Music-Bot-for-Jitsi/jitsi-api-client/main/bundles/werift.min.js:3:17