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).
The goal of this commit is to merge the two torrent status lines onto a
single, concise line which has high signal and information density.
- Hide download speed, upload speed, and number of peers when 0,
because that's just noise.
- Remove number of files, because that information can be found by
expanding the torrent.
This also allowed the further reduction of the torrent item height from
110px to 100px.
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
* packager: call callbacks consistently
Before this, the callbacks would not being called, which would lead to
an incomplete build on non-OS X platforms when trying to build all for
all platforms.
* packager: Always produce OS X update file regardless of --package option
This makes it consistent with how the windows build always produces the
.nupkg autoupdate files
* packager: fix duplicate npm install
Move "npm prune && npm dedupe" into the release script. Remove an extra
"npm install"
* Make Windows portable app
When a folder named "Portable Settings" exists in same folder as
WebTorrent.exe, then use it instead of the default application config
path.
Closes#358
* packager: remove redundant signing warning
* cross platform zip function
* Set config file path to match config.CONFIG_PATH
* portable app: make electron settings portable
* portable: fix poster/torrent paths
* use cross-zip
* portable app: default download folder inside 'Portable Settings'
I found it awkward to listen to the video tags 'playing' and 'paused'
events, when we're controlling the state that defines what state it's
in in the first place.
This commit removes those listeners, in favor of just setting things to
the right state immediately when play(), pause(), or playPause() is
called.
Added play(), pause() methods for clarity.
* fix error about pop
* location-history: add optional callbacks
* set handler on first tick
discovered by @dcposch
* Show error when media format is unsupported
Before this change, the player would just get stuck on the loading
screen forever without notifying the user.
* rm dist at start of build
* renderer style
* preload sound files for instant playback
The first time a sound file is played, the Audio object is cached.
5s after startup, all sound files are automatically preloaded.
* issue template
* cleanup closePlayer() and stopServer()
* Add subtitle support (via drag-n-drop)
Drag and drop a subtitles file (.srt or .vtt) onto the player (or the
app icon on OS X) to add subtitles to the currently playing video.
For #281
* add multiple subtitles structure
* add open subtitle dialog from cc player controls