Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Browser option --kiosk not working #460

Open
Abvgdejg opened this issue May 30, 2024 · 2 comments
Open

Browser option --kiosk not working #460

Abvgdejg opened this issue May 30, 2024 · 2 comments

Comments

@Abvgdejg
Copy link

Abvgdejg commented May 30, 2024

When creating a browser with the "kiosk" option, placing it on the Xvfb display and recording with ffmpeg, the browser UI elements remain.

Code:

require 'ferrum'

x = Ferrum::Browser::Xvfb.new(OpenStruct.new({ window_size: [1920, 1080] }))
x.start

b = Ferrum::Browser.new(headless: false, xvfb: true,
                        browser_options: {
                          'window-size': '1920,1080',
                          'display': ":#{x.display_id}",
                          'disable-infobars': nil,
                          'kiosk': nil
                        })
b.goto 'https://animejs.com/'

ffmpeg_command = "ffmpeg -y -video_size 1920x1080 -framerate 25 -f x11grab -i :#{x.display_id} -loglevel debug ./#{Time.now.to_i}.mp4"
pid = spawn(ffmpeg_command)
Process.detach(pid)

sleep 4

Process.kill('SIGINT', pid)
Process.kill('SIGINT', x.pid)
b.quit

t4_1717064381.mp4
@route
Copy link
Member

route commented May 31, 2024

But you don't show any code you are running...

@Abvgdejg
Copy link
Author

But you don't show any code you are running...

Added code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants