Jump to content

running babylon.js on chromium


dbawel
 Share

Recommended Posts

Hello,

I need to run a BJS scene on Chromium. Anyone have any pointers or aware of any current issues? I know of past issues, but none currently. Also, is it still more difficult to run Chromium on Windows as opposed to Linux? I assume so.

Thanks,

DB

Link to comment
Share on other sites

On windows you just have to download a build here and it works perfectly without installation (here i just have to wait 30s to keep Avast check the .exe).

I noticed that in BJS 2.5 & chrome, to run locally a html file with script,  --disable-web-security --allow-file-access-from-files in shortcut parameters doesn't work anymore : you have to run a local webserver.

Link to comment
Share on other sites

I have started running chromium from Ubuntu, version 53.0.285.143.  BJS works fine, except for no .WAV files. I put  --allow-file-access-from-files on the command line, ( but not --disable-web-security) and it works fine here.  Given that I write an exporter, my test cycle of change python, build zip file, update Blender addon, restart Blender, load test scene, export test scene, & refresh page does not need any more steps / dangers of updating a local server.

Even Firefox (on Ubuntu) requires some kind of change to run .WAV files.  More fuel for my in-line sound format.  Thinking about putting in a very low loss compression, which would still be 16 bit samples, expressed as 10 bits.  Make it more competitive with .MP3. Sorry, off topic.

Edited by JCPalmer
Correct info found later to be false
Link to comment
Share on other sites

Hi. I've updated recently the web audio stack of Babylon.js and it's now more Chromium friendly. For that, 2 new things done: https://github.com/BabylonJS/Babylon.js/blob/master/src/Audio/babylon.sound.ts#L113 :

- You can now pass an array of files like ["myaudiofile.mp3", "myaudiofile.ogg"] and I'll load the first one compatible

- If none are compatible, it doesn't break the execution of the engine.

Still, I'm discovering that Wav could not be supported on Linux. I thought Wav was available on all platforms so I haven't add a check for that. Do you think it could worth adding it?

Link to comment
Share on other sites

@davrous - @JCPalmer is correct that Linux certainly supports .WAV containers - however I personally will be using .mp3 and .mp3 - so thank you for the updates. As for what others are doing including JC (I believe) is they require that Wav is supported for current and/or future projects for recording, buffering, and streaming audio. I don't recall the specifics, but I believe there are issues with using compression codecs in streaming audio in real time - but that may not be the complete picture. And for my needs, supporting WAV files will definately be of use in the future. As always, thank you for the update, as I woud have most likely had issues with my current scene to deliver in a couple of weeks.

I still can't figure out where you find the time to support such an immense framework - and almost always have it working perfectly first run.:D

Cheers,

DB

Link to comment
Share on other sites

  • 3 weeks later...

Correction-  Chromium CAN run WAV files.  I did not look at the console message clearly.  I was running from file://.  The console message was coming from Tools.LoadFile.  Seems you can load textures from file//: using --allow-file-access-from-files which uses Tools.LoadImage, but stuff using LoadFile fails.

Once I uploaded to web, page with WAV ran fine.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...