-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(player): Move to dedicated package
- Loading branch information
Showing
10 changed files
with
53 additions
and
48 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
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package movie | ||
package player | ||
|
||
import ( | ||
"context" | ||
|
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package movie | ||
package player | ||
|
||
import ( | ||
"github.com/charmbracelet/bubbles/help" | ||
|
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package movie | ||
package player | ||
|
||
import ( | ||
"strconv" | ||
|
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,34 @@ | ||
package player | ||
|
||
import ( | ||
tea "github.com/charmbracelet/bubbletea" | ||
) | ||
|
||
type Option string | ||
|
||
const ( | ||
Option3xRewind Option = "<<<" | ||
Option2xRewind Option = "<<" | ||
Option1xRewind Option = "<" | ||
OptionPause Option = "||" | ||
OptionPlay Option = "|>" | ||
Option1xForward Option = ">" | ||
Option2xForward Option = ">>" | ||
Option3xForward Option = ">>>" | ||
) | ||
|
||
var playerOptions = [...]Option{ //nolint:gochecknoglobals | ||
Option3xRewind, | ||
Option2xRewind, | ||
Option1xRewind, | ||
OptionPause, | ||
Option1xForward, | ||
Option2xForward, | ||
Option3xForward, | ||
} | ||
|
||
func chooseOption(o Option) tea.Cmd { | ||
return func() tea.Msg { | ||
return o | ||
} | ||
} |
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