Commit Graph

122 Commits

Author SHA1 Message Date
absidue c0f98eeafe
Use named parameters instead of $ and % in localised strings (#2685)
* Use named parameters instead of $ and % in localised strings

* Fix URL warning again

* Update placeholders in most locales

* Let the translators fix the problematic RTL strings

* Fix the missing quotes in some of the YAML files
2022-10-13 11:51:15 +00:00
absidue bc8261d970
Move colours from the store to the utils helper (#2710)
* Move colours from the store to the utils helper

* Use a single array for colours
2022-10-12 06:49:12 +00:00
absidue 22a5062334
Move calculateColorLuminance, calculatePublishedDate and buildVTTFileLocally out of the store (#2692) 2022-10-10 07:45:18 +00:00
absidue 0f2fe16583
Move fetching of the sponsorblock segments out of the store (#2684) 2022-10-08 16:23:14 -04:00
absidue 5677c3182d
Remove jquery from the ft-player component (#2647) 2022-10-05 08:25:50 +00:00
absidue bc886af726
Implement chapters (#2224)
* Implement chapters

* Generate chapters locally for the Invidious API backend

* Performance improvements

* More performance improvements

* Improve chapters appearance and add compact mode for Invidious

* Update UI while seeking instead of afterwards

* Invidious extract chapters with range timestamps properly and duplicate chapters

* Minor code improvement

* Add accessibility labels and keyboard navigation

* Add chapter markers

* Fix missing newline at the bottom of ft-video-player.css

* Fix marker placement
2022-09-29 20:01:54 +00:00
absidue 206094aecd
Create video player buttons without jquery (#2636) 2022-09-29 13:15:30 +00:00
absidue c1a78d878e
Use native addEventListener instead of jquery's .on (#2612) 2022-09-25 08:44:16 +08:00
absidue ac4cc4a611
Compress and lazy load locales (#2603)
* Compress and lazy load locales

* Remove index.html when loading the locales on the web

* Fix locale output path for web build
2022-09-24 11:06:50 -04:00
ChunkyProgrammer 7822f7423e
Remove console.logs (#2606)
* remove console.logs

* use 'off' instead of 0
2022-09-23 09:04:10 +08:00
absidue 62829b736a
Electron variable at build time instead of at runtime (#2574) 2022-09-15 08:59:09 +00:00
absidue 644df97acc
Increase width of quality selector so that 1080p60 doesn't overflow into the full screen button (#2556) 2022-09-10 14:14:18 +00:00
MarmadileManteater 02db9483a3
Removing an an empty toast (#2504)
which was unintentionally introduced by my
last pull request.
2022-08-21 20:19:36 +08:00
MarmadileManteater 166fe004b2
This should eliminate this race condition by using (#2493)
the seconds length value provided by the API
rather than trying to pull the time from the video
element. This is related to FreeTubeApp#2492 and
MarmadileManteater#9.
2022-08-20 14:49:41 +02:00
PikachuEXE e0e7b5053a
! Fix Cmd+M unable to minimize window when viewing video (#2486) 2022-08-16 06:57:07 -04:00
bob1520 7057633906
loop button color (#2321) 2022-06-19 18:39:29 +00:00
bob1520 ddce28e586
Feature: Screenshot of video (#2221)
* screenshot

* player settings, jpg & default "pictures" folder

* filename pattern

* folder placeholder update

* remove duplicate action

* update: won't save invalid pattern

* Ask for folder, toggle screenshot, modal showSaveDialog & button unfocus

* useModal
2022-05-30 15:24:34 +02:00
ChunkyProgrammer dfb28b1d69
Feat: SponsorBlock improvements (#1849)
* Add setting for each SB category

* Update SB Settings Component

* Show other SB categories in seek bar

* Use camelCase for SponsorBlock values

Co-authored-by: PikachuEXE <pikachuexe@gmail.com>

* change "Don't Skip" to "Do Nothing" in locale

* improve styling of sponsorblock settings

* add filler category, don't repeat colors

* Fix JS format issue caused during code conflict resolving

* make sponsor block markers transparent

* change opacity to 0.6

Co-authored-by: PikachuEXE <pikachuexe@gmail.com>
2022-05-29 22:36:59 +02:00
absidue 0146a63ce6
Add support for next/previous/pause/resume global hotkeys/actions (#2239) 2022-05-23 09:48:49 +08:00
absidue 32b9e1d511
Fix the stats for nerds modal hogging all the keyboard events (#2253) 2022-05-22 07:59:49 -04:00
absidue 1e5895a8c6
Hide Picture in Picture button and disable shortcut for audio formats (#2227) 2022-05-02 19:50:23 +08:00
PrestonN 40699b9ae3 Customize max playback rate and playback rate interval 2022-04-10 18:00:47 -04:00
Preston 0806a1a0ae Bump yt-channel-info version, fix playlist / history search bar hiding and fix text in resolution for stats modal 2022-04-09 16:23:34 -04:00
vallode 6559732207
Switch debug and picture in picture shortcuts for consistency (#2141)
* Switch debug and picture in picture shortcuts for consistency

* Add preventDefault to statsmodal shortcut
2022-04-07 22:40:29 -04:00
bob1520 d5c40be2ab
defaultSkipInterval * player.playbackRate() (#2153) 2022-03-30 10:06:54 +08:00
Preston 1c647504c9 Ignore quality options if can't find matching bitrate 2022-02-25 17:51:02 -05:00
Preston dbf69f242a Simplify playlist / history search and add video stats string for legacy videos 2022-02-19 21:32:34 -05:00
Preston cd574be4e7 Stats for nerds cleanup and fix linter errors 2022-02-19 17:17:58 -05:00
constraintAutomaton 609996d175
In app download (#1971)
* src/renderer/store/modules/utils.js, src/renderer/components/watch-video-info/watch-video-info.vue, src/renderer/components/watch-video-info/watch-video-info.js, src/renderer/components/ft-icon-button/ft-icon-button.js, src/main/index.js

in-app download in hardcoded path

* download into variable folder supported

download can be done into a specify folder defined in the  settings or can be done by choosing a folder just before the downloading

* src/renderer/store/modules/utils.js: folder is asked before downloading when appropriate

* src/renderer/store/modules/utils.js: toast added for success and faillure

* src/renderer/store/modules/utils.js: mecanism to show download progress

* src/renderer/store/modules/utils.js: percentage symbol added to toast message when displaying progress

* src/renderer/components/download-settings/download-settings.js: clarification comment about electron

* src/renderer/store/modules/utils.js: typo in comment resolved

* src/renderer/store/modules/utils.js: show a toast when there is a file error

* static/locales/fr-FR.yaml: resolved typo in Choose Path

* src/renderer/store/modules/utils.js: download progress notification toast deleted

* corrections of typos, changes in toast messages, toast messages translatable by modifying the ft-toast component to allow translatable strings

* cleaner code for translatable toast

* downloadMedia argument changed from array to object

* src/renderer/components/download-settings/download-settings.sass: trailling space added

* Apply suggestions from code review

folder changed for folderPath

Co-authored-by: PikachuEXE <pikachuexe@gmail.com>

* fix forgotten folderPath renaming

* extra space deleted

* starting toast displayed after download folder asks

* audio button deleted

* experimental electron web library deleted because can cause performance issues

* placeholder for web support

* made better condition for web and electon compatibility and small variable renaming

* better error message when user cancel the download

* falling back to asking the user if the download repository doesn't exist

* falling back mode implemented

* console.log for debugging deleted

* useless import deleted

* small renaming

Co-authored-by: PikachuEXE <pikachuexe@gmail.com>
2022-01-30 12:49:16 -05:00
PrestonN 2be2301d92 Prevent middle click from opening URLs within the app 2022-01-10 21:16:50 -05:00
Svallinn daecf944fb
Store Revamp / Full database synchronization across windows (#1833)
* History: Refactor history module

* Profiles: Refactor profiles module

* IPC: Move channel ids to their own file and make them constants

* IPC: Replace single sync channel for one channel per sync type

* Everywhere: Replace default profile id magic strings with constant ref

* Profiles: Refactor `activeProfile` property from store

This commit makes it so that `activeProfile`'s getter returns
the entire profile, while the related update function only needs
the profile id (instead of the previously used array index)
to change the currently active profile.

This change was made due to inconsistency regarding the active profile
when creating new profiles.
If a new profile coincidentally landed in the current active profile's
array index after sorting, the app would mistakenly change to it
without any action from the user apart from the profile's creation.
Turning the profile id into the selector instead solves this issue.

* Revert "Store: Implement history synchronization between windows"

This reverts commit 99b61e6178.

This is necessary for an upcoming improved implementation of the
history synchronization.

* History: Remove unused mutation

* Everywhere: Create abstract database handlers

The project now utilizes abstract handlers to fetch, modify
or otherwise manipulate data from the database.

This facilitates 3 aspects of the app, in addition of
making them future proof:

- Switching database libraries is now trivial
Since most of the app utilizes the abstract handlers, it's incredibly
easily to change to a different DB library.
Hypothetically, all that would need to be done is to simply replace the
the file containing the base handlers, while the rest of the app
would go unchanged.

- Syncing logic between Electron and web is now properly separated
There are now two distinct DB handling APIs: the Electron one and
the web one.
The app doesn't need to manually choose the API, because it's detected
which platform is being utilized on import.

- All Electron windows now share the same database instance
This provides a single source of truth, improving consistency
regarding data manipulation and windows synchronization.

As a sidenote, syncing implementation has been left as is
(web unimplemented; Electron only syncs settings, remaining
datastore syncing will be implemented in the upcoming commits).

* Electron/History: Implement history synchronization

* Profiles: Implement suplementary profile creation logic

* ft-profile-edit: Small fix on profile name missing display

* Electron/Profiles: Implement profile synchronization

* Electron/Playlists: Implement playlist synchronization
2021-12-15 13:42:24 -05:00
absidue 82b223ea97
Select current playback rate in playback rate selector (#1902)
* Select current playback rate in playback rate selector

* More concise implementation

Co-authored-by: PikachuEXE <pikachuexe@gmail.com>

* Scroll to the selected element instead of focusing it

Co-authored-by: PikachuEXE <pikachuexe@gmail.com>
2021-11-30 22:08:33 +00:00
Cody Sechelski 37051d8518
Ctrl plus scroll to change playback rate (#1745)
* added the setting to toggle the 'scroll playback rate over video player' on and off. Set the default to off

* • Added Setting to toggle the 'ctrl+scroll for playback rate' feature
• Added the label and tooltip to the en-US local file
• Added the ctrl+scroll functionality to the video player component
• Added the ctrl+click functionality to the video player component
• Modified the existing scroll to change volume funtionality to ignore the event if the ctrl key is pressed

* changed the max playrate to 8 in Player Settings. Changed the available playrate options in the video player component popup menu to go up to 8 in steps of .25

* reverted back to hard coded values for playback rates

* opps, forgot to remove the playbackRates method. It has been removed now.

* fixed (at lesast I think) the hacky way I was overwriding the click handler. Also added a check for event.meteKey for mac users.

* added a check for if the metakey is pressedin the the mosueScrollVlumne method

* made a slight change to the tooltip text. The point of this commit is just to try and get the tests to re-run after I marked the PR as ready for review.

* added 'event.metaKey' back to the 'mouseScrollPlaybackRate' method. Not sure how I ended up leaving it off a few commits ago

Co-authored-by: Cody Sechelski <codysechelski@RMC02G68EYMD6R.local>
2021-11-24 16:52:56 -05:00
constraintAutomaton 001b679183
Stats for nerds (#1867)
* transition duration of 0.5s added to watched videos

* small code reformating

* extra white spaces deleted

* typo in the word transition corrected

* original whitespaces respected

* transition added when hovering end

* video stat components started and properties chosen

* ft-video-stats integraded into the video player for dev and debugging

* using a timer to get video stats and a method to update the statistic every second

* getting statistic from vhs and adaptativeFormat

* frame drop capture

* stats capture in the form of event

* useless comment deleted

* stats render with a for loop in the template

* stats correctly displayed

* overlay stats added

* video stats component deleted

* video stats component deleted inside template video player

* video stats component fully deleted

* modal solution working need more styling and code messy

* lint

* modal working with stats

* keyboard shortcut for stats

* lint fix

* network state is now a string

* new line deleted

* useless whitespace deleted

* package-lock.json remove and ignore

* keyboard shortcut restricted to up arrow

* stats overlay made larger

* align to left corner

* useless formatting of string deleted

* renaming of variable formatedStrats for formattedStats

* keyboard shortcut made into a variable

* lint-fix

* key change for i

* label translated

* whitespace added for gitignore

* lock file not ignored

* videoId stat deleted

* ft-video-player.js, en-US.yaml, fr-FR.yaml: changing percentage stats display

changing the display for percentage stats for the format 'x%' instead of 'xx.xx'

* ft-video-player.js, en-US.yaml, fr-FR.yaml: network state video statistic deleted

* ft-video-player.js: made stats modal background color darker

* ft-video-player.js, en-US.yaml, fr-FR.yaml: video id are now related to the one of youtube

* ft-video-player.js, en-US.yaml, fr-FR.yaml: stats displayed made closet to the youtube implementation

the name are capitalized, the order of display is changed and fps is combined with viewport

* lint-fix

* en-US.yaml, fr-FR.yaml: network state possibilities deleted because not used

* package.json.lock: deleted

* ft-video-player.js: formated_stats renamed for formatted_stats

* lock file deleted

* index.js, ft-video-player.js: handling of right click context menu

via electon ipc bus an event is send to tell the vue component to show the stats modal

* ft-video-player.js, index.js: renaming of video stats display event and definition of it as a variable

* index.js, en-US.yaml: inconsistant capitalization of video statistics label solved

* index.js: pluralized video stats

* ft-video-player.js: fix right click undefined this.player

change the arrow function inside the closure for a function with a bind to this

* ft-video-player.js: handling of the case when this.player is not defined

the property this.stats.display.activated as been added and manage when the to show the stats. In this way in the runtime (it is still refered in the run time but it is capture in an event loop) with dont have to refer to this.player so when it is not defined it doesnt affect the behavior.

* lint fix

* src/renderer/components/ft-video-player/ft-video-player.js: modal.close move into the display event of the statistic context

* lint fix

* src/renderer/components/ft-video-player/ft-video-player.js, static/locales/en-US.yaml, static/locales/fr-FR.yaml: better capitalization of the stats labels

* static/locales/en-US.yaml: fps capitalized

* static/locales/fr-FR.yaml, static/locales/en-US.yaml: capitalized label
2021-11-23 06:34:04 -05:00
PrestonN dc2ff5e009 Merge commit '2acd3261c49e846c46f05e2223a685797cb15f06' 2021-10-12 17:05:21 -04:00
PrestonN 2acd3261c4 Fix issue where Invidious DASH files were not being played correctly. 2021-10-12 17:03:22 -04:00
Hiers eb0138e131
Updated frame-by-frame function to cover previous edge cases. (#1411)
* Updated frame-by-frame function to cover previous edge cases.

* Minor change to setting fps value.

* Fixed default value and if.
2021-10-07 11:44:39 +00:00
ChunkyProgrammer 94756458b1
feat: Optimize caption sort order (#1661)
* choose best caption

* add comments

* fix linter issue
2021-09-20 10:12:14 +08:00
Airradda f7e918ab23
Add Toggle Theatre Keybind [T] (#1703) 2021-09-15 10:00:34 +08:00
Jason 4e5976c275
Fixes video volume scroll from preventing vjs-menu scrolling (#1650) 2021-09-05 15:39:44 -04:00
Jason c3105f46e5
Theatre mode icon accounts for default theatre mode being ignored when switching between videos (#1632) 2021-09-02 19:22:06 +01:00
Jason 4bb095063a
Removes erroneous variable name 'defaultTheatreModeActive' with 'defaultTheatreMode' (#1630) 2021-09-01 06:05:36 -04:00
PikachuEXE d010725b39
* Update video player to remove tooltip for current time on play progress bar (#1478)
Co-authored-by: Preston <freetubeapp@protonmail.com>
2021-08-24 22:46:42 +00:00
Jason f801ea4b05
Integrate theater mode into mediaplayer (#1589)
* Moves theatre mode button to mediaplayer

* Accounts for 'Enable Theatre Mode by Default'

* Removes unnecessary comment

* Removes unnecessary newlines

* Rename variable for toggle theatre mode button

* Fix issue caused by missing change in rename

Co-authored-by: Preston <freetubeapp@protonmail.com>
Co-authored-by: PikachuEXE <pikachuexe@gmail.com>
2021-08-24 07:36:10 +00:00
Jason 354a2151df
Add customized fast-forward / rewind intervals (#1390)
* Setting to customize fast-forward/rewind times

* Move variable placement to keep alphabetical order

Moves defaultSkipInterval to be one line below defaultQuality because Q comes before S in the alphabet. This keeps the variable declarations alphabetical.
2021-08-05 22:17:01 +02:00
PikachuEXE 588b488856
Watch: set volume's session value to 0 when the player is muted (#1352) 2021-06-14 17:15:46 +00:00
Seb 2297bf3732
Implement persistence for caption settings (#1269) 2021-06-10 19:35:00 +00:00
Luca Hohmann 5f1818ee91
Setting to enable and disable display of video play button (#1370)
* Added setting to toggle play button in video player

* Fixed wrong way around boolean check

* Fixed setting not loading on startup
2021-05-29 20:35:28 +02:00
PikachuEXE 754a4a8aa3
Update video player to remove default big play button shown when paused (#1270) 2021-05-28 22:29:35 +02:00
Alex Stewart f9f5223f23
Allow changing volume by scrolling over any part of video player (#1254)
* Added toggle component to settings

* Setting to toggle this feature is now functional. Video volume can now be changed by scrolling anywhere on the video, or just on the slider, depending on this setting

* Added translation lines for en_US and en_GB

* Changed setting line from 'Scroll Volume Over Video' to 'Scroll Volume Over Video Player'

* Changed 'mousewheel' to 'wheel' event, as 'mousewheel' is deprecated

* Ran lint check in settings.js

Co-authored-by: Alex Stewart <albinexotech@gmail.com>
2021-05-26 17:55:11 +02:00