FreeTube/src/renderer/components
kuhaku 52fa523df1
Add support for External Players (closes #418) (#1271)
* feat: add support for opening videos/playlists in external players (like mpv) #418

Signed-off-by: Randshot <randshot@norealm.xyz>

* feat: move external player settings into own section
feat: add warnings for when the external player doesn't support the current action (e.g. reversing playlists)
feat: add toggle in settings for ignoring unsupported action warnings

Signed-off-by: Randshot <randshot@norealm.xyz>

* improvement: do not append start offset argument when the watch progress is 0

Signed-off-by: Randshot <randshot@norealm.xyz>

* fix: fix undefined showToast error when clicking on the external player playlist button

Signed-off-by: Randshot <randshot@norealm.xyz>

* feat: add icon button for external player to watch-video-info (below video player) component
improvement: refactor the code for opening the external player into a separate function in utils.js

Signed-off-by: Randshot <randshot@norealm.xyz>

* feat: add support for ytdl protocol urls (supportsYtdlProtocol)
chore: fix lint error

Signed-off-by: Randshot <randshot@norealm.xyz>

* feat: add support for passing default playback rate to external player
improvement: add warning message for when the external player does not support starting playback at
             a given offset
chore: rename reverse, shuffle, and loopPlaylist fields for consistency

Signed-off-by: Randshot <randshot@norealm.xyz>

* feat: add setting for custom external player command line arguments

Signed-off-by: Randshot <randshot@norealm.xyz>

* chore: fix lint error

Signed-off-by: Randshot <randshot@norealm.xyz>

* improvement(watch-video-info.js): change the default for playlistId back to null (consistent with other occurrences)
improvement(utils.js/openInExternalPlayer): also check for empty playlistId string
fix(watch-video-info.js): fix merge error

Signed-off-by: Randshot <randshot@norealm.xyz>

* improvement(components/ft-list-video): check whether watch history is turned on, before adding a video to it
fix(store/utils): fix playlistReverse typo, causing `undefined` being set as a command line argument
fix(store/utils): check for 'string' type, instead of `null` and `undefined`
fix(views/Watch): fix getPlaylistIndex returning an incorrect index, when reverse was turned on
chore(locales/en-US): fix thumbnail and suppress typo
chore(locales/en_GB): fix thumbnail and suppress typo

Signed-off-by: Randshot <randshot@norealm.xyz>

* feat: pause player when opening video in external player

Signed-off-by: Randshot <randshot@norealm.xyz>

* feat(externalPlayer): refactor externalPlayerCmdArguments into a separate static file `static/external-player-map.json`
chore(components/ft-list-video): fix lint error

Signed-off-by: Randshot <randshot@norealm.xyz>

* Revert "feat: pause player when opening video in external player"

This reverts commit 28b4713334.

* feat: pause the app's player when opening video in external player

* This commit addresses above requested changes.

improvement(components/external-player-settings): move `externalPlayer` check to `ft-flex-box`
improvement(components/external-player-settings): use `update*` methods, instead of `handle*`

improvement(store/utils): move child_process invocation to `main/index.js` via IPC call to renderer
improvement(store/utils): use `dispatch` for calling actions
improvement(store/utils): get external player related settings directly in the action

improvement(renderer/App): move `checkExternalPlayer` call down into `usingElectron` if statement
fix(renderer/App): fix lint error

improvement(components/ft-list-playlist): remove unnecessary payload fields
fix(components/ft-list-playlist): fix typo in component name

improvement(components/ft-list-video): remove unnecessary payload fields

improvement(components/watch-video-info): remove unnecessary payload fields
improvement(views/Settings): add `usingElectron` condition

Signed-off-by: Randshot <randshot@norealm.xyz>

* fix(store/utils): fix toast message error

Signed-off-by: Randshot <randshot@norealm.xyz>

* fix(store/utils): fix a few code mess-ups

Co-authored-by: Svallinn <41585298+Svallinn@users.noreply.github.com>
2021-06-13 17:31:43 +02:00
..
data-settings Settings/Fix: Filter out non-YouTube links in NewPipe imports (#1319) 2021-05-23 15:42:04 +00:00
distraction-settings feat: added ability to hide Playlists (#972) 2021-03-06 11:21:22 -05:00
external-player-settings Add support for External Players (closes #418) (#1271) 2021-06-13 17:31:43 +02:00
ft-auto-grid Extend video size to fill whole grid container 2020-12-17 23:28:30 -05:00
ft-button feat: better keyboard navigation (#1104) 2021-04-27 20:29:28 +00:00
ft-card Push Latest Code to Repository 2020-02-16 13:30:00 -05:00
ft-channel-bubble Fix linting issues 2020-09-15 23:10:15 -04:00
ft-element-list Fix lazy wrapper's height in list mode 2020-08-25 21:19:25 +03:00
ft-flex-box Push Latest Code to Repository 2020-02-16 13:30:00 -05:00
ft-grid Push Latest Code to Repository 2020-02-16 13:30:00 -05:00
ft-icon-button Initial Playlist implementation. Functions like basic favorites list 2021-01-14 18:03:23 -05:00
ft-input Select search text on focus (#1201) 2021-04-15 21:30:26 +02:00
ft-intersection-observer Creating ft-intersection-observer component (#571) 2020-10-03 16:30:09 -04:00
ft-list-channel Update search filters to work with updated search module 2020-12-14 14:15:29 -05:00
ft-list-dropdown Fix spelling of tertiary 2020-03-25 03:33:53 +13:00
ft-list-lazy-wrapper Extend video size to fill whole grid container 2020-12-17 23:28:30 -05:00
ft-list-playlist Add support for External Players (closes #418) (#1271) 2021-06-13 17:31:43 +02:00
ft-list-video Add support for External Players (closes #418) (#1271) 2021-06-13 17:31:43 +02:00
ft-loader Push Latest Code to Repository 2020-02-16 13:30:00 -05:00
ft-notification-banner Add notifications for new blog posts and app updates 2020-09-20 14:22:39 -04:00
ft-profile-bubble Create Profile Edit Page 2020-09-01 23:21:32 -04:00
ft-profile-channel-list Proxy channel profile icons and banners through Invidious when API is preferred 2020-10-13 11:06:04 -04:00
ft-profile-edit Fix various profile issues and allow videos to repeat if save progress is finished 2020-09-24 18:33:21 -04:00
ft-profile-filter-channels-list Enable profile based channel filtering (#1013) 2021-03-06 13:00:52 -05:00
ft-profile-selector Disable settings depending on others and move default profile logic 2020-10-06 09:38:35 -04:00
ft-progress-bar Finish Profile Logic and working subscriptions 2020-09-01 23:21:32 -04:00
ft-prompt Add notifications for new blog posts and app updates 2020-09-20 14:22:39 -04:00
ft-radio-button Prevent certain search filter combinations from being used 2020-12-17 13:55:47 -05:00
ft-search-filters Implement search filter changed indicator (#1257) 2021-05-25 19:54:27 +02:00
ft-select Add tooltips and context to the settings page 2020-10-19 11:32:53 -04:00
ft-share-button Update Youtube URL handling to recongnize playlist ID in URL (#1260) 2021-05-31 13:23:35 +02:00
ft-slider Alignment and typography corrections (#653) 2020-10-14 11:12:58 -04:00
ft-timestamp-catcher Update dependencies and fix linting problems 2020-10-04 14:30:54 -04:00
ft-toast Allow hidden toast messages to be clicked through 2020-12-01 11:02:52 -05:00
ft-toggle-switch Fixed tooltip position (#831) 2021-01-11 10:29:55 -05:00
ft-tooltip Fixed tooltip position (#831) 2021-01-11 10:29:55 -05:00
ft-video-player Implement persistence for caption settings (#1269) 2021-06-10 19:35:00 +00:00
general-settings Refactor: Erase `@electron/remote` references and other dangerous calls 2021-05-22 00:49:48 +01:00
player-settings Settings: Remove unnecessary handler for `defaultVolume` update 2021-06-11 02:56:39 +01:00
playlist-info Refactor: Erase `@electron/remote` references and other dangerous calls 2021-05-22 00:49:48 +01:00
privacy-settings Video meta file removal option (#1154) 2021-04-01 15:54:45 +02:00
proxy-settings Refactor: Erase `@electron/remote` references and other dangerous calls 2021-05-22 00:49:48 +01:00
side-nav Routing: Remove unnecessary router import 2021-04-28 13:31:46 +00:00
side-nav-more-options fix: translated menu (#988) 2021-03-06 11:21:57 -05:00
sponsor-block-settings SponsorBlock (#1130) 2021-05-16 16:01:24 -04:00
subscription-settings Add Proxy configuration to settings. Fix ft-video-list height when using list display 2021-01-14 13:51:33 -05:00
theme-settings Store/Settings: Handle `uiScale`'s side effects in the module 2021-06-11 03:49:12 +01:00
top-nav Update Youtube URL handling to recongnize playlist ID in URL (#1260) 2021-05-31 13:23:35 +02:00
watch-video-comments Refactor: Swap `dispatch`/`commit` calls with mapped actions/mutations 2021-05-22 00:56:32 +01:00
watch-video-description Stop replacing YouTube hrefs for protocol links 2021-03-30 03:31:35 +01:00
watch-video-info Add support for External Players (closes #418) (#1271) 2021-06-13 17:31:43 +02:00
watch-video-live-chat Refactor: Swap `dispatch`/`commit` calls with mapped actions/mutations 2021-05-22 00:56:32 +01:00
watch-video-playlist Add support for External Players (closes #418) (#1271) 2021-06-13 17:31:43 +02:00
watch-video-recommendations PR ready distraction free feature (#596) 2020-10-05 22:27:32 -04:00