Commit Graph

170 Commits

Author SHA1 Message Date
Emma 551b51341c
Improve touch controls for dash quality selector (#4750)
* Improve touch input on dash quality selector

- Add `touchstart` event to quality button which toggles the `vjs-lock-showing` class used on other quality selectors
- Call `this.handleClick` from touchstart (fixes issue with `e.target` not being correct)

MarmadileManteater/FreeTubeCordova#239

* Hide the dash quality selector on `focusout`

* Use `classList.*` methods over manually editing the attributes

* De-duplicate code

* Add back line break

* Allow scroll on dash quality selector when screen is narrow

* Use flag to determine if user is scrolling or tapping

* hide the quality selector on select

(just like the other quality selectors do on mobile)
2024-03-10 18:00:42 -04:00
Jason baa7b014eb
Fix caption sorting & label (#4513)
* Fix auto-translated captions not being ordered properly in non-English languages

* Fix locale showing as 'locale name' in captions list
2024-01-06 11:25:16 +01:00
Jason bed4af1c46
Setting to turn on subtitles by default (#4450)
* Add back 'Turn on Subtitles by Default'

* Update variable name

* Fix double-selection issue when auto-generated & native tracks exist, & fix similar pre-existing bug

Also fixes pre-existing bug with pressing 'c' having the effect of multiple tracks (inaccurately) showing as selected.
2024-01-03 08:28:13 +08:00
absidue 0ebcd24522
Fix error when clicking on the current quality in the DASH quality selector (#4130) 2023-10-11 09:31:04 +08:00
absidue d91f82f977
Support multiple audio tracks and AV1 for Invidious by using the local API DASH manifest generator (#3942)
* Support multiple audio tracks and AV1 for Invidious by using the local API DASH manifest generator

* Upgrade YouTube.js to 6.2.0 to fix default track selection

* Fix audio formats

* Use Intl.DisplayNames to get the language names

* Simplify returns

Co-authored-by: ChunkyProgrammer <78101139+ChunkyProgrammer@users.noreply.github.com>

---------

Co-authored-by: ChunkyProgrammer <78101139+ChunkyProgrammer@users.noreply.github.com>
2023-09-25 10:55:47 -04:00
Benjababe 08f8b2768a
Add updated video resolution to auto selector (#3935)
* CSS updates

* Include resolution to 'auto' in quality display

* Include auto info in video statistics

* Value integrity check in CreateDashQualitySelector
2023-08-26 18:20:55 +02:00
PikachuEXE b10a0c0806
! Fix `Scroll playback rate over video player` prevents page scrolling when not activated (#3933) 2023-08-25 11:41:56 -04:00
ChunkyProgrammer 0cbe02f88d
Fix Update Subscription Details function when channel name is null (#3884)
* Simplify channel sorting functions

* use deepCopy
2023-08-15 18:17:10 +00:00
PikachuEXE ccefdb34a1
! Fix unnecessary error message display in toast when paused before video started playing on load (#3835)
Caused by https://github.com/FreeTubeApp/FreeTube/pull/3775
2023-08-03 13:01:08 +00:00
absidue 97593e3681
Use emit and props instead of $parent (#3834) 2023-08-03 12:57:09 +00:00
PikachuEXE 32635d545c
! Fix exception thrown by `play()` called in timer handler in watch page (#3775) 2023-07-17 05:32:39 -07:00
Emma bb4b0a890a
Fix `proxyVideos` setting for legacy formats & hls urls (#3639)
* Fix `proxyVideos` setting for legacy formats & hls urls

- Replace the hostname of stream urls with the current invidious instance when `proxyVideos` is true
- Add `local` flag to iv hls URLs when proxy videos is true

* Add missing `proxyVideos` getter in `ft-video-player`

* Move change of URI to before `getProxyVideos`
2023-06-12 17:06:08 +02:00
absidue a11533ac8a
Fix keyboard shortcut to toggle the captions (#3580) 2023-05-23 12:28:01 +00:00
PikachuEXE da6acf2599
Ensure screen saver blocker removed when window closed (#3557)
* $ Extract method for stopping screen saver blocker

* ! Ensure screen saver blocker removed when window closed

* * Move beforeunload event listener removal to beforeDestroy
2023-05-23 07:37:44 -04:00
absidue d34cf0dd5c
local API: Support multiple audio tracks (#3563)
* local API: Support multiple audio tracks

* Simplify resume logic

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

* Change track selector position

---------

Co-authored-by: PikachuEXE <pikachuexe@gmail.com>
2023-05-20 08:48:15 -04:00
absidue b005aee643
Use POST for DASH requests (#3523) 2023-05-10 20:00:27 +08:00
absidue 45d679b84b
Clean up unused component properties (#3458) 2023-04-25 20:03:36 -04:00
absidue 7fbb43fd36
Add 50fps and live support to frame by frame keyboard shortcuts (#3420) 2023-04-17 14:51:47 +08:00
absidue a53e7f0598
Fix DASH default quality and quality selection (#3278)
* Fix DASH default quality and quality selection

* Add comments and multiple bandwidth by 10

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

* Fix typo

Co-authored-by: ChunkyProgrammer <78101139+ChunkyProgrammer@users.noreply.github.com>

* ! Fix default quality `auto` handling

* ! Fix quality selection for short/vertical videos

* ! Fix default quality selection for Invidious API

* * Update videojs bandwidth option value to max

* ~ Add comment about video format sorting logic when heights from 2 formats equal

* * Revert format preference back to higher bitrate with comments

* * Revert inflated initial bandwidth option value to fix #595

---------

Co-authored-by: PikachuEXE <pikachuexe@gmail.com>
Co-authored-by: ChunkyProgrammer <78101139+ChunkyProgrammer@users.noreply.github.com>
2023-03-22 20:22:20 -04:00
absidue 6c3ff9e999
Fix the screen saver blocker never getting disabled (#3286) 2023-03-14 06:17:44 +00:00
predystopic-dev 3a904b5f83
Setting loudness to default volume in new videos (#3203)
* Made changes as suggested.

* Made player set volume to user default if it was muted by dragging volume slider to zero. Volume and muted are kept track of seperately and both are set on player with respect to how it was set for previous video

* added comments

* fixed

* fixed

* Changed comments to be more accurate.
2023-03-08 19:22:45 +01:00
absidue f56f6e7a20
Fix video throttling because of range header (#3234)
* Fix video throttling because of range header

* Use a better way to extract the range
2023-03-01 09:38:13 +08:00
absidue d6b355082a
Remove beforeRouteLeave in ft-video-player as it is never called (#3213) 2023-02-27 09:03:26 +08:00
absidue 5d9383b67b
Better idle mouse hiding implementation (#3214) 2023-02-26 03:01:20 +00:00
absidue a382326a38
Use a player event to trigger the DASH quality selector creation (#3183)
* Use a player event to trigger the DASH quality selector creation

* Add requested comment
2023-02-17 09:34:43 +08:00
absidue a26c8e03a6
Fix the trending and watch pages swallowing the arrow key events (#3170)
* Fix the trending page swallowing the arrow key events

* Fix the watch page too
2023-02-10 12:44:17 -05:00
absidue 4c65982371
Better solution for hiding the PIP button for the audio formats (#3174)
* Better solution for hiding the PIP button for the audio formats

* Add comment

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

---------

Co-authored-by: PikachuEXE <pikachuexe@gmail.com>
2023-02-10 12:43:06 -05:00
Lodka Sawhet c7a99066da
Allows sponsor segments to be watched even if Auto Skip is enabled (#3116)
* Allows sponsor segments to be watched in Auto Skip mode

* 'b': only jump back to segments configured to be auto-skipped

* Remove 'b' keyboard shortcut
2023-02-05 14:47:02 -05:00
absidue c3867259e9
Trigger checkAspectRatio on loadedmetadata event (#3147) 2023-02-05 18:40:25 +00:00
absidue 2cd8f0f2d3
Switch from Vue.extend to defineComponent (#3066) 2023-01-18 08:50:02 +01:00
absidue 3e80e96a0c
Use ES6 classes for video.js components instead of videojs.extend (#3060) 2023-01-14 15:01:27 +00:00
PikachuEXE 67b9a74ae3
! Fix code for getting event.key lowercase value (#3061) 2023-01-14 15:01:12 +00:00
absidue 15b15026b6
Migrate the watch page to YouTube.js (#3035)
* Migrate the watch page to YouTube.js

* Fix YouTube.js exclusion in the web build
2023-01-07 02:52:59 +01:00
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