See https://chromium.googlesource.com/chromium/src/+/master/docs/mac_build_instructions.md
git clone depot_tools
add to path (not using ~ but $HOME) in .bash_profile
sudo sysctl kern.maxvnodes=$((512*1024))
mkdir chromium ; cd chromium
fetch chromium
gclient sync
gclient runhooks
cd src
# Enable proprietary video codecs
export GYP_DEFINES="proprietary_codecs=1 ffmpeg_branding=Chrome"```
# Generate config
cgn gen out/Default
# Speed up build settings (opens editor)
gn args out/Default
# Build arguments go here.
# See "gn args <out_dir> --list" for available build arguments.
is_debug = false
is_component_build = true
symbol_level = 0
media_use_ffmpeg = true
media_use_libvpx = true
proprietary_codecs = true
ffmpeg_branding = "Chrome"
ninja -C out/Default chrome
- Autoplay jwplayer : https://support.jwplayer.com/customer/portal/articles/1428525
- Html5 test: https://html5test.com
- Autoplay policy changes in chrome: https://www.chromium.org/audio-video/autoplay
- Developer notes on autoplay: https://developers.google.com/web/updates/2017/09/autoplay-policy-changes#iframe
It seems jwplayer checks on the Headless useragent
const browser = await puppeteer.launch({
executablePath: executable,
headless: true,
//args: [ '--enable-speech-api']
args: [ '--user-agent="Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.50 Safari/537.36"']
});
d24221c is commit id tested
mkdir chromium && cd chromium
fetch --nohooks chromium --nosvn=True
gclient sync --with_branch_heads --nohooks # May not even need this.
cd src # Assuming that you are already in the above 'chromium' directory.
git fetch origin refs/branch-heads/<branch> # <branch> would be something like '1942'.
git checkout FETCH_HEAD
gclient sync
fetch --nohooks chromium --nosvn=True
const puppeteer = require('puppeteer');
(async() => {
const executable = "/Users/patrick/dev/chromium/src/out/Default/Chromium.app/Contents/MacOS/Chromium"
const browser = await puppeteer.launch({
executablePath: executable,
headless: true
});
function timeout(ms) {
return new Promise(resolve => setTimeout(resolve, ms));
};
const page = await browser.newPage();
page.on('console', msg => console.log(msg.text));
await page.goto('https://support.jwplayer.com/customer/portal/articles/1428525', {waitUntil: 'networkidle2'});
//await page.goto('https://html5test.com/', {waitUntil: 'networkidle2'});
await page.screenshot({ path: 'a.png' , fullPage: true })
await timeout(5000);
browser.close();
)}();