Commit Graph

63 Commits

Author SHA1 Message Date
Rafał Dzięgiel
35d359daf9 Mark popovers text as translatable 2021-09-06 19:45:04 +02:00
Rafał Dzięgiel
dc25ec976a Name our classes
In order to not end up with random names prefixed with Gjs_, give each class a proper name, so its easier to inspect and allows usage with UI files
2021-09-02 20:12:39 +02:00
Rafał Dzięgiel
451711b9c6 Show current video/audio decoder in popover 2021-09-01 14:28:15 +02:00
Rafał Dzięgiel
bbada8fb4e Redo controls popovers into GtkMenuButtons 2021-09-01 14:25:42 +02:00
Rafał Dzięgiel
c50df5f2a3 Merge pull request #129 from Rafostar/libadwaita
Initialize with libadwaita, port preferences window to be adaptive and do few CSS tweaks to improve overall app look.
2021-08-23 18:33:21 +02:00
Rafał Dzięgiel
c8a5277908 Port preferences window to libadwaita 2021-08-22 16:09:23 +02:00
Rafał Dzięgiel
b577dd762d Fix D&D on GTK 4.3.2+ 2021-08-05 22:29:23 +02:00
Rafostar
a6dfeeca37 Switch playlist items via double tap on screen side
Double press left side of the touchscreen to play previous item, right side to play next one. #93
2021-07-28 12:06:18 +02:00
Rafał Dzięgiel
5378facb46 Add long press gesture to toggle play/pause #93
Press and hold on touchscreen while in fullscreen to toggle between play and pause
2021-07-16 18:31:26 +02:00
Rafał Dzięgiel
2d4353aaec Append some common subtitle track titles
In order to not end up with multiple subitle tracks simply named for e.g. "English", add some common postfix to it when detected in track title.
2021-06-02 15:47:09 +02:00
Rafał Dzięgiel
6246777f06 Prefer custom title over media info one
Otherwise YT videos will all show filename of dash manifest as title
2021-05-31 17:46:19 +02:00
Rafał Dzięgiel
6ae38327ca Leave CSS fullscreen optimization applied
Do not apply and remove fullscreen optimization class when going/leaving fullscreen. Instead set it to be applied to fullscreen only with CSS.
2021-05-13 21:13:18 +02:00
Rafał Dzięgiel
af0e082c43 Readapt to changed monitor on the fly
Check and apply/remove TV mode UI on the fly when switching monitors.
This allows for e.g. having a mobile device connected to external big screen,
drag Clapper window from one screen to another and UI should automatically
adapt between mobile and TV modes without interrupting playback.

This also helps in situations where monitor size is not initially known
on window map #74.
2021-05-12 15:31:15 +02:00
Rafostar
0e6507682a Do not show visualizations button when no audio tracks 2021-05-01 12:11:16 +02:00
Rafał Dzięgiel
047dd12fbb Restore initial GUI state after playback 2021-04-27 11:14:09 +02:00
Rafał Dzięgiel
3238270c0d Ignore duration changes below 1ms during playback 2021-04-27 10:43:13 +02:00
Rafał Dzięgiel
e4335721be Simplify auto-fullscreen logic 2021-04-26 17:51:20 +02:00
Rafostar
a98ca53dfb Use Gio.SimpleAction as only keypress handler 2021-04-25 20:19:44 +02:00
Rafał Dzięgiel
7559a61c9f Hold Ctrl while doing D&D to append items to playlist instead of replacing it 2021-04-21 14:56:26 +02:00
Rafał Dzięgiel
9799783ee5 Use Gst.(M)SECOND constants instead of numbers
It makes code easier to read
2021-04-17 13:08:12 +02:00
Rafał Dzięgiel
3a998fb91e YT: auto select best matching resolution for used monitor 2021-04-16 09:53:21 +02:00
Rafał Dzięgiel
b02f54a3a6 Do not show mobile controls transition on launch
Start app with the correct controls layout instead of showing the "hide elapsed time"
transition when started on mobile width. It is annoying.

We cannot detect surface width during app widgets assembly, so update the controls
revealers state on first surface update after window is mapped and only if running
on mobile width. Otherwise do not do anything like before which will result in
showing fully revealed controls (default).
2021-04-15 15:27:28 +02:00
Rafał Dzięgiel
d9939a94c2 Fix some error messages not being displayed 2021-04-09 18:49:44 +02:00
Rafał Dzięgiel
dafa2cfdf5 Fix missing file extension in online URIs 2021-04-09 18:16:02 +02:00
Rafał Dzięgiel
ebe72f20b5 Hide end time together with title when stopped 2021-04-09 17:54:48 +02:00
Rafał Dzięgiel
fa1455556b Treat media without duration as live content 2021-04-09 16:07:11 +02:00
Rafał Dzięgiel
8fb6b971fe Always try to update end time after new media info 2021-04-09 13:53:43 +02:00
Rafał Dzięgiel
1bf46a2f12 Fix top time not showing up on fullscreen startup 2021-04-09 11:37:19 +02:00
Rafał Dzięgiel
ec6157763b YT: do not try to get info again for current download 2021-04-08 11:05:20 +02:00
Rafał Dzięgiel
cca3077936 Fix startup window size on XOrg
The window size was restored too early which caused the window to be a little bigger then it should on each launch. Restore window size after that window was mapped.
2021-04-07 20:07:05 +02:00
Rafał Dzięgiel
b15b94fc90 Convenient ways of opening external subtitles
Play video with external subtiles by:
* selecting and opening both video+subs from file chooser/manager
* dropping subtitles file on player window
* opening subtiles from file chooser/manager while video plays
* send their file path/uri to player via WebSocket message
2021-04-07 16:33:21 +02:00
Rafał Dzięgiel
30a7229b33 API: add media info updated signal
Emit media info updated signal only when media info is initially created and when number/format of tracks changes later. This is needed for GUI to detect resolution change (adaptive streaming) or when user adds external subtitles to current video.
2021-04-06 18:49:08 +02:00
Rafał Dzięgiel
8f294604dc Remove drop target from top revealer
It is causing various issues unfortunately
2021-03-14 23:33:29 +01:00
Rafał Dzięgiel
c89d488c30 Prefetch YouTube video info on hover
Speed up loading of YouTube videos by downloading and parsing their info before video is dropped into player.
2021-03-12 13:05:58 +01:00
Rafał Dzięgiel
fceb8ff70a YouTube support. Closes #46 2021-03-11 17:34:54 +01:00
Rafał Dzięgiel
a0cd05fbe3 Workaround GTK4 revealers transition switch bug
Changing transition in middle or when not fully revealed has dire consequences, seems to be a GTK4 bug. Workaround this bug by switching top revealer transition type only when fully revealed.
2021-02-25 09:24:02 +01:00
Rafał Dzięgiel
d2d43db2c9 Do not update time if top grid is invisible 2021-02-24 18:27:40 +01:00
Rafał Dzięgiel
632fcd34cc Fix overlay buttons not unrevealed when leaving window from bottom side
Bottom revealer motion controller was causing timeout to be cleared. Prevent that by making it child invisible when windowed, which will remove its allocated height and motion events will not be emitted.
2021-02-24 12:34:57 +01:00
Rafał Dzięgiel
186c63bf04 Set unreveal timeout after reveal finishes
Instead of setting hide controls timeout immediately when starting revealing, make the time controls are revealed constant by setting timeout after animation finishes.
2021-02-24 12:04:26 +01:00
Rafał Dzięgiel
199a8f1931 Bind volume scale with player volume prop
Now that player API itself is operating on a cubic scale (no value conversion required), the volume slider can be bind to the volume property. Thanks to that, player volume scale will correctly reflect Clapper volume set via external applications e.g. gnome-settings.
2021-02-24 11:09:42 +01:00
Rafał Dzięgiel
dbd3e536b2 Limit bottom fullscreen controls panel width
Fullscreen bottom controls panel does not look good when progress bar is too long (especially on "ultrawide" displays), so limit its max width to 1720 application-pixels. This should make it still long enough for convenient chapter seeking.
2021-02-24 10:11:12 +01:00
Rafał Dzięgiel
86d365872a API: operate on cubic volume scale
Instead converting volume inside GJS, simplify things by making API operate on cubic volume scale.
2021-02-24 08:42:27 +01:00
Rafał Dzięgiel
8407a325af Increase delay of hiding controls when fullscreen 2021-02-22 11:29:26 +01:00
Rafał Dzięgiel
61ae543cf9 Separate top revealer title and time 2021-02-22 10:22:05 +01:00
Rafostar
46103e169f Update current time on top overlay reveal
Previously current hour might not have been updated if someone entered fullscreen without moving mouse cursor or with a touch
2021-02-20 11:12:50 +01:00
Rafał Dzięgiel
59908f808f Show menu and close buttons on mobile fullscreen view 2021-02-19 13:13:25 +01:00
Rafał Dzięgiel
7680b85ea9 Reveal controls only with touch or pen 2021-02-18 19:02:34 +01:00
Rafał Dzięgiel
834a690903 Tweak overlay revealers show/hide logic 2021-02-18 17:13:38 +01:00
Rafał Dzięgiel
12591e106f Move event controllers to widget and add them to top revealer 2021-02-17 16:31:37 +01:00
Rafał Dzięgiel
e79ce58b26 Rename "fullscreenMode" boolean to "isFullscreenMode" 2021-02-17 12:28:45 +01:00