mirror of
https://github.com/microsoft/playwright.git
synced 2024-12-14 05:37:20 +03:00
fix(launcher): check libs required for playing h.264 (#3715)
This commit is contained in:
parent
76ab82faa7
commit
f8408cb840
@ -35,7 +35,7 @@ export async function validateHostRequirements(browserPath: string, browser: Bro
|
||||
|
||||
const DL_OPEN_LIBRARIES = {
|
||||
chromium: [],
|
||||
webkit: ['libGLESv2.so.2'],
|
||||
webkit: ['libGLESv2.so.2', 'libx264.so'],
|
||||
firefox: [],
|
||||
};
|
||||
|
||||
@ -123,6 +123,7 @@ async function validateDependenciesLinux(browserPath: string, browser: BrowserDe
|
||||
libraryToPackageNameMapping = LIBRARY_TO_PACKAGE_NAME_UBUNTU_18_04;
|
||||
else if (ubuntuVersion === '20.04')
|
||||
libraryToPackageNameMapping = LIBRARY_TO_PACKAGE_NAME_UBUNTU_20_04;
|
||||
libraryToPackageNameMapping = Object.assign({}, libraryToPackageNameMapping, MANUAL_LIBRARY_TO_PACKAGE_NAME_UBUNTU);
|
||||
if (libraryToPackageNameMapping) {
|
||||
// Translate missing dependencies to package names to install with apt.
|
||||
for (const missingDep of missingDeps) {
|
||||
@ -416,3 +417,11 @@ const LIBRARY_TO_PACKAGE_NAME_UBUNTU_20_04: { [s: string]: string} = {
|
||||
'libXt.so.6': 'libxt6',
|
||||
'libXtst.so.6': 'libxtst6',
|
||||
};
|
||||
|
||||
const MANUAL_LIBRARY_TO_PACKAGE_NAME_UBUNTU: { [s: string]: string} = {
|
||||
// libgstlibav.so (the only actual library provided by gstreamer1.0-libav) is not
|
||||
// in the ldconfig cache, so we detect the actual library required for playing h.264
|
||||
// and if it's missing recommend installing missing gstreamer lib.
|
||||
// gstreamer1.0-libav -> libavcodec57 -> libx264-152
|
||||
'libx264.so': 'gstreamer1.0-libav'
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user