From b9b254a4f7d4ab4f5692008c110f21c5348a4163 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Wed, 14 Aug 2024 13:18:24 +0200 Subject: [PATCH] Enable PipeWire camera support for F41+ --- firefox.spec | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/firefox.spec b/firefox.spec index 27a2cec..be387ad 100644 --- a/firefox.spec +++ b/firefox.spec @@ -25,6 +25,14 @@ ExcludeArch: i686 # Disabled due to various issues now. %global use_xdg_file_portal 0 +# PipeWire camera is needed for IPU6 camera support in Fedora 41+ +# https://fedoraproject.org/wiki/Changes/IPU6_Camera_support +%if 0%{?fedora} >= 41 +%global use_pipewire_camera 1 +%else +%global use_pipewire_camera 0 +%endif + %global system_nss 1 %global system_libevent 1 %global build_with_asan 0 @@ -189,7 +197,7 @@ ExcludeArch: i686 Summary: Mozilla Firefox Web browser Name: firefox Version: 129.0 -Release: 1%{?pre_tag}%{?dist} +Release: 2%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ License: MPLv1.1 or GPLv2+ or LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz @@ -1084,6 +1092,10 @@ cp %{SOURCE12} %{buildroot}%{mozappdir}/browser/defaults/preferences echo 'pref("widget.use-xdg-desktop-portal.file-picker", 1);' >> %{buildroot}%{mozappdir}/browser/defaults/preferences/firefox-redhat-default-prefs.js %endif +%if %{?use_pipewire_camera} +echo 'pref("media.webrtc.camera.allow-pipewire", 1);' >> %{buildroot}%{mozappdir}/browser/defaults/preferences/firefox-redhat-default-prefs.js +%endif + # Add distribution.ini mkdir -p %{buildroot}%{mozappdir}/distribution cp %{SOURCE26} %{buildroot}%{mozappdir}/distribution @@ -1226,6 +1238,9 @@ fi #--------------------------------------------------------------------- %changelog +* Tue Aug 13 2024 Jan Grulich - 129.0-2 +- Enable PipeWire camera support for F41+ + * Tue Jul 30 2024 Martin Stransky - 129.0-1 - Update to 129.0