2020-01-21 23:22:17 +03:00
|
|
|
/**
|
|
|
|
* Copyright (c) Microsoft Corporation.
|
|
|
|
*
|
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
* you may not use this file except in compliance with the License.
|
|
|
|
* You may obtain a copy of the License at
|
|
|
|
*
|
|
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
*
|
|
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
* See the License for the specific language governing permissions and
|
|
|
|
* limitations under the License.
|
|
|
|
*/
|
2020-04-25 05:14:10 +03:00
|
|
|
|
2022-01-24 22:25:24 +03:00
|
|
|
let install;
|
2020-03-24 10:08:00 +03:00
|
|
|
|
2022-01-24 22:25:24 +03:00
|
|
|
try {
|
2022-04-08 20:46:24 +03:00
|
|
|
if (!require('playwright-core/lib/utils').isLikelyNpxGlobal())
|
|
|
|
install = require('playwright-core/lib/server').installBrowsersForNpmInstall;
|
2022-01-24 22:25:24 +03:00
|
|
|
} catch (e) {
|
|
|
|
// Dev build, don't install browsers by default.
|
|
|
|
}
|
|
|
|
|
|
|
|
if (install)
|
|
|
|
install(['chromium', 'ffmpeg']);
|