* Skip forward 10 seconds ((CMD OR CTRL) ALT right)
Skip back 10 seconds ((CMD OR CTRL) ALT left)
Increase video speed ((CMD OR CTRL) +)
Decrease video speed ((CMD OR CTRL) -)
* Codestyle fix
* The 'steps' should be implemented in base2, standard players use 1x, 2x, 4x, 8x, 16x
fixed bug with shift + "=" which is "+"
* resolve conflicts
* remove ide specific data
make playback rate more granular
add to menu skip and speed entries
* intendation fix
* conflict resolve
* rename setPlaybackRate to changePlaybackRate
setRate return boolean depending on whether this cast target supports setting the playback rate.
if setRate returns false - don`t change state
redundant else if statement in changePlaybackRate function
Before this commit, we tweaked the subtitle position by modifying the
VTT file, line by line with a regex because I did not know it was
possible to use CSS for it.
But apparently there are Shadow DOM elements that we can use instead.
This new approach improves:
- Wrapping long lines. Before, the text would go off the edge of the
screen. Now it wraps intelligently.
- The subtitles move up to get out of the way of the controls when
those are visible.
I don't think it matters whether the open comes from onOpen (opening
magnet, .torrent file, dragging file to dock, menu item) or from
dragging to the window.
These should use the same code path. The only relevant information is
the page of the app that we're on.
This change unifies the two methods, and supports dragging .torrent
files or creating a torrent when the player is active, if the dragged
files are not .srt or .vtt. We go back to the list, or to the create
torrent page in these situations, so it's not confusing for the user.
Always close open modals when handling an open.
This means people who add a lot of torrents will always have their latest torrents at the top when they open the app, instead of having to scroll all the way down
This bug was subtle. Basically, on OS X only, we use
window.setAspectRatio() to make the player window match the video size.
But this is maintained even in fullscreen mode, which makes the window
actually not use up the fullscreen, and there are black bars above and
below the video player controls, which looks really weird.
Unset the aspect ratio in fullscreen mode, then set it again upon
leaving fullscreen mode.
Apparently, electron.* is actually a getter, so whenever a component of
electron is referenced for the first time, it's require()'d. So, there
are theoretical performance benefits to not declaring all electron.*
upfront.
Instead of:
var autoUpdater = electron.autoUpdater
Just use electron.autoUpdater directly when needed.
The goal here is to remove shortcut handling from the renderer and
unify it all in menu.js and shortcuts.ks (for alternate shortcuts).
I would rather name it "Play" and change to "Pause" when video is
playing, but Electron doesn't support this (yet).
WebTorrent 0.91 changed how duplicate torrents are handled, which broke
handling in WebTorrent Desktop.
After this PR:
- No more try-catch on client.add -- this has never thrown errors.
- No check for duplicate torrent.key value since client.add no longer
returns the same torrent object when adding a duplicate torrent. It
emits 'error' instead, and that case is already handled :)
Based on @watson's PR #463.
Differences:
- Remove the "Open Folder" link from expanded torrent view.
- Use showItemInFolder instead of openItem electron API
- Add a separator
- Use IPC to invoke electron.shell.showItemInFolder from main process
This works around a WebTorrent bug where calling client.add(torrentFilePath) to add a duplicate torrent -- in other words, one whose infoHash we're already torrenting -- creates a new torrent object and later throws an error. Inconsistently, calling client.add(magnetURI) or client.add(infoHash) to add a duplicate torrent returns the existing torrent object that we're already torrenting and doesn't throw an error.
This also fixes a prety nasty bug where pasting a dupe magnet link changed the torrentKey of an existing torrent, breaking the communication between the main and WebTorrent windows
Fixes#364