Commit Graph

137 Commits

Author SHA1 Message Date
PikachuEXE 0d0d64d957
! Fix Ctrl/Cmd + C unable to copy text when viewing video (#3027) 2023-01-03 19:20:16 +01:00
absidue 1d1e6eacea
Switch from sync fs APIs to fs/promises (#2991)
* Switch from sync fs APIs to fs/promises

* Fix error and await storyboard creation

* Start a new file for filesystem helpers starting with pathExists
2022-12-29 01:19:48 +00:00
absidue cdc1b712bd
Use path.sep instead of working out the directory separator ourselves (#3002) 2022-12-27 10:15:38 +08:00
PikachuEXE 1a0786f39b
! Fix possible to do both actions in video player by scrolling (#2989)
"Scroll playback rate over video player" and "Skip by Scrolling Over Video Player"
2022-12-25 13:06:18 +01:00
vr10t 869e45ccd5
Option to skip through the video by scrolling (#2418)
* initial commit

* remove extra play button toggle

* add missing comment

Co-authored-by: Alin <ai6@tutanota.com>
Co-authored-by: ChunkyPtogrammer <78101139+ChunkyProgrammer@users.noreply.github.com>
2022-12-22 16:21:32 +01:00
absidue 10f9bf6d79
Add keyboard shortcuts to jump to the next and previous chapters (#2912)
* Add keyboard shortcuts to jump to the next and previous chapters

* Change shortcut to Cmd for macOS
2022-12-12 07:03:01 +01:00
absidue a88bafeb27
Make getUserDataPath, getPicturesPath and getSystemLocale helpers (#2920) 2022-12-06 12:37:44 +01:00
absidue 88e9618651
Fix chapter marker placement (#2874) 2022-11-20 22:46:34 +01:00
absidue 2b233815ec
Move colours and the colour functions to their own file (#2844) 2022-11-09 05:57:48 +00:00
Emma f8ff0e1249
Add setting to toggle `Enter fullscreen on rotate` (#2808)
It defaults to `false`. This should prevent users with
multiple displays from running into issues when they
drag the window from a portrait display to a landscape
display too quickly.
2022-11-04 09:11:22 +08:00
absidue 8f55a648b1
Cleanup unused component imports (#2773) 2022-10-27 09:34:39 +00:00
Emma 70baa873fb
Move `Dialog` functions to `utils/helpers` (#2752)
* Moving `FileFromDialog` helpers into helpers/utils

* Moving `showDialog` functions to `utils/helpers`

* Linting

* Update src/renderer/helpers/utils.js

Co-authored-by: absidue <48293849+absidue@users.noreply.github.com>

* Update refs  `showSaveDialog` in `ft-video-player`

* Formatting long import to be multiline

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

Co-authored-by: absidue <48293849+absidue@users.noreply.github.com>
Co-authored-by: PikachuEXE <pikachuexe@gmail.com>
2022-10-25 16:44:18 +02:00
Emma e43fb94a35
Improving touch input by bringing in `videojs-mobile-ui` (#2719)
* Adding videojs-mobile-ui as a dependency

- Using the beta because it fixes an issue
with multiple version of videojs loading
at once.

This is related to MarmadileManteater#56.

* Mapping defaultSkipInterval to seekSeconds

* Adding CSS to prevent showing duplicate buttons

- Added a new variable `usingTouch` to selectively hide
the existing `vjs-big-play-button` when the `touch-overlay`
is visible.

* Renaming CSS class to something more specific

* Adding text-shadow behind play / pause button

This should make it more visually distinct against a
light or colorful background.

* Enabling touch-overlay anytime a touch is detected

Disabling it whenever mouse input is detected

The default behavior of `videojs-mobile-ui` is to
only work in Android and iOS, but by
forcing the touch behavior to be enabled and selectively
showing it only when touch input is detected, it should work
on any device with touch input even if the browser doesn't
detect that it is running in Android or iOS.

* Removing unnecessary code

* Removing unintentionally leftover variable

* Removing an unnecessary assignment

Adding comments to explain why a flag called
`forceForTesting` is set to true

Disabling the `lockOnRotate` flag.

* Moving this flag and wrapper class

* Adding whitespace

* Making my comment a little more consistent

* Changing the punctuation of a comment

* Adjusting the CSS to fix a firefox discrepancy

* Adding a check for mobile firefox

For whatever reason, mobile firefox sometimes
triggers onmouseover when a touch occurs, and this
is unwanted behavior.

* Adding a drop-shadow to the ff and rw icons

This should make them easier to see on top of light
videos

* Hiding the mobile play button according to setting

- Added CSS to hide the videojs-mobile-ui play button
when the `Display Play Button In Video Player` setting is disabled.

* Replacing long computed string with class binding

Co-authored-by: absidue <48293849+absidue@users.noreply.github.com>

* Adding newline at the end of videoJS.css

Co-authored-by: absidue <48293849+absidue@users.noreply.github.com>
2022-10-24 13:49:52 -04:00
absidue ad01d2b37d
Make the safe as and open file dialogs blocking (#2712) 2022-10-14 06:00:23 +00:00
absidue 3aa080d707
Make showToast a helper (#2695) 2022-10-14 05:59:49 +00:00
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