-
-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1712 from hicom150/change_audio_tracks
Add support for multiple audio tracks
- Loading branch information
Showing
5 changed files
with
91 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
const { dispatch } = require('../lib/dispatcher') | ||
|
||
module.exports = class AudioTracksController { | ||
constructor (state) { | ||
this.state = state | ||
} | ||
|
||
selectAudioTrack (ix) { | ||
this.state.playing.audioTracks.selectedIndex = ix | ||
dispatch('skip', 0.2) // HACK: hardcoded seek value for smooth audio change | ||
} | ||
|
||
toggleAudioTracksMenu () { | ||
const audioTracks = this.state.playing.audioTracks | ||
audioTracks.showMenu = !audioTracks.showMenu | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters