Something went wrong. Try again.
A music player that connects to your cloud/distributed storage. forked from tokono.ma/diffuse
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182port module UI.Ports exposing (..)
import Alienimport Json.Encode as Jsonimport Queueimport UI.Audio.Types as Audio
-- 📣
port activeQueueItemChanged : Maybe Queue.EngineItem -> Cmd msg
port adjustEqualizerSetting : { knob : String, value : Float } -> Cmd msg
port copyToClipboard : String -> Cmd msg
port downloadJsonUsingTauri : { filename : String, json : String } -> Cmd msg
port loadAlbumCovers : { list : Bool, coverView : Bool } -> Cmd msg
port openUrlOnNewPage : String -> Cmd msg
port pause : { trackId : String } -> Cmd msg
port pauseScrobbleTimer : () -> Cmd msg
port pickAverageBackgroundColor : String -> Cmd msg
port play : { trackId : String, volume : Float } -> Cmd msg
port reloadAudioNodeIfNeeded : { play : Bool, progress : Maybe Float, trackId : String } -> Cmd msg
port preloadAudio : Queue.EngineItem -> Cmd msg
port reloadApp : () -> Cmd msg
port renderAudioElements : { items : List Queue.EngineItem, play : Maybe String, volume : Float } -> Cmd msg
port resetScrobbleTimer : { duration : Float, trackId : String } -> Cmd msg
port seek : { percentage : Float, trackId : String } -> Cmd msg
port sendTask : Json.Value -> Cmd msg
port setMediaSessionArtwork : { blobUrl : String, imageType : String } -> Cmd msg
port setMediaSessionMetadata : { album : Maybe String, artist : Maybe String, title : String, coverPrep : Maybe Audio.CoverPrep } -> Cmd msg
port setMediaSessionPlaybackState : String -> Cmd msg
port setMediaSessionPositionState : { currentTime : Float, duration : Float } -> Cmd msg
port startScrobbleTimer : () -> Cmd msg
port toBrain : Alien.Event -> Cmd msg
-- 📰
port audioDurationChange : (Audio.DurationChangeEvent -> msg) -> Sub msg
port audioEnded : (Audio.GenericAudioEvent -> msg) -> Sub msg
port audioError : (Audio.ErrorAudioEvent -> msg) -> Sub msg
port audioPlaybackStateChanged : (Audio.PlaybackStateEvent -> msg) -> Sub msg
port audioIsLoading : (Audio.GenericAudioEvent -> msg) -> Sub msg
port audioHasLoaded : (Audio.GenericAudioEvent -> msg) -> Sub msg
port audioTimeUpdated : (Audio.TimeUpdatedEvent -> msg) -> Sub msg
port downloadTracksFinished : (() -> msg) -> Sub msg
port fromAlien : (Alien.Event -> msg) -> Sub msg
port lostWindowFocus : (() -> msg) -> Sub msg
port indicateTouchDevice : (() -> msg) -> Sub msg
port insertCoverCache : (Json.Value -> msg) -> Sub msg
port installedNewServiceWorker : (() -> msg) -> Sub msg
port installingNewServiceWorker : (() -> msg) -> Sub msg
port refreshedAccessToken : (Json.Value -> msg) -> Sub msg
port preferredColorSchemaChanged : ({ dark : Bool } -> msg) -> Sub msg
port receiveTask : (Json.Value -> msg) -> Sub msg
port requestNext : (() -> msg) -> Sub msg
port requestPause : (() -> msg) -> Sub msg
port requestPlay : (() -> msg) -> Sub msg
port requestPlayPause : (() -> msg) -> Sub msg
port requestPrevious : (() -> msg) -> Sub msg
port requestStop : (() -> msg) -> Sub msg
port scrobble : ({ duration : Int, timestamp : Int, trackId : String } -> msg) -> Sub msg
port setAverageBackgroundColor : ({ r : Int, g : Int, b : Int } -> msg) -> Sub msg
port setIsOnline : (Bool -> msg) -> Sub msg
port showErrorNotification : (String -> msg) -> Sub msg
port showStickyErrorNotification : (String -> msg) -> Sub msg
-- 🔱
giveBrain : Alien.Tag -> Json.Value -> Cmd msggiveBrain tag data = toBrain (Alien.broadcast tag data)
nudgeBrain : Alien.Tag -> Cmd msgnudgeBrain tag = toBrain (Alien.trigger tag)