toggle-fullscreen.lua 473 B

12345678910111213141516
  1. fs_state = mp.get_property("fullscreen")
  2. function al_fs_on_pause (_name, value)
  3. if value == true then
  4. fs_state = mp.get_property("fullscreen")
  5. mp.set_property("fullscreen", "no")
  6. -- For some reason, it shows progress only when we pause from a
  7. -- fullscreen (maybe an mpv bug).
  8. mp.command("show-progress")
  9. else
  10. mp.set_property("fullscreen", fs_state)
  11. end
  12. end
  13. mp.observe_property("pause", "bool", al_fs_on_pause)