Hello All,
We are developing a Livecode application that is using the Browser widget to display a web page. It's an educational app for young learners. The web page has a list of words. When a word is clicked, a picture showing the meaning of the word is displayed and a recording of the word being spoken is played. For example, click 'cat' and you will briefly see a picture of a cat and hear someone saying 'cat'.
I'm developing on macOS 10.12.6 using Livecode Indy 9.0.1. In the Livecode IDE everything is fine, a standalone app for macOS works fine, however, the standalone app for Windows shows the pictures but does not play the audio - no sounds at all (Windows 10).
The web page is using JavaScript to show the graphics and play the audio. The code to play the audio is:
var audio = new Audio('word/' + myFile + '.mp3');
audio.play();
Any thoughts anybody as to why it's not playing sound on Windows 10 (same app works fine in a standard browser, e.g. Firefox)?
Playing sounds in Browser widget on Windows 10
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
- Posts: 15
- Joined: Sat Mar 20, 2010 6:03 pm
-
- Posts: 15
- Joined: Sat Mar 20, 2010 6:03 pm
Re: Playing sounds in Browser widget on Windows 10
The answer to this is that on Windows (and Linux) the Browser widget in LiveCode uses Chromium Embedded Framework (CEF) and its support for MP3 audio is disabled for legal reasons by default. See https://stackoverflow.com/questions/123 ... tml5-audio
It can play WAV file just fine (but these are much larger than MP3), however, I can't get OGG to work at all in the LiveCode IDE on macOS.
It can play WAV file just fine (but these are much larger than MP3), however, I can't get OGG to work at all in the LiveCode IDE on macOS.
Re: Playing sounds in Browser widget on Windows 10
Hi Mark,
as far as I know WebKit, the browser framework on the Mac, which is used by LC and also Safari, does not support OGG files.
Best
Klaus
as far as I know WebKit, the browser framework on the Mac, which is used by LC and also Safari, does not support OGG files.
Best
Klaus