File tree Expand file tree Collapse file tree 1 file changed +13
-5
lines changed
Expand file tree Collapse file tree 1 file changed +13
-5
lines changed Original file line number Diff line number Diff line change @@ -336,12 +336,20 @@ def setup_kwargs(self, kwargs):
336336 kwargs ["extra_prefs" ].append ("media.navigator.streams.fake=true" )
337337
338338 if kwargs .get ("gmp_path" ) is None and kwargs ["browser_channel" ] is not None :
339- openh264_dir = os .path .join (
340- self .browser ._get_browser_binary_dir (
341- self .venv .path , kwargs ["browser_channel" ]
342- ),
343- "gmp-gmpopenh264" ,
339+ binary_dir = self .browser ._get_browser_binary_dir (
340+ self .venv .path , kwargs ["browser_channel" ]
344341 )
342+ openh264_dir = os .path .join (binary_dir , "gmp-gmpopenh264" )
343+
344+ if not os .path .isdir (openh264_dir ):
345+ if self .prompt_install ("OpenH264 GMP plugin" ):
346+ logger .info ("Downloading OpenH264 plugin" )
347+ self .browser .install_openh264 (
348+ binary_dir = binary_dir ,
349+ binary = kwargs ["binary" ],
350+ channel = kwargs ["browser_channel" ],
351+ )
352+
345353 if os .path .isdir (openh264_dir ):
346354 dirs = os .listdir (openh264_dir )
347355 openh264_dir = os .path .join (openh264_dir , dirs [0 ]) if dirs else None
You can’t perform that action at this time.
0 commit comments