Skip to content
This repository has been archived by the owner on Oct 4, 2023. It is now read-only.

Commit

Permalink
[C-872] Play audio in native (#1807)
Browse files Browse the repository at this point in the history
  • Loading branch information
sliptype committed Sep 9, 2022
1 parent 3e8f9a5 commit 5d8be85
Show file tree
Hide file tree
Showing 40 changed files with 238 additions and 1,091 deletions.
11 changes: 0 additions & 11 deletions packages/common/src/services/native-mobile-interface/types.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,5 @@
export enum MessageType {
LOADED = 'loaded',
PLAY_TRACK = 'play-track',
PAUSE_TRACK = 'pause-track',
GET_POSITION = 'get-position',
SEEK_TRACK = 'seek-track',
SET_INFO = 'set-info',
PERSIST_QUEUE = 'persist-queue',
SET_REPEAT_MODE = 'set-repeat-mode',
SHUFFLE = 'shuffle',

// Linking
OPEN_LINK = 'open-link',
Expand Down Expand Up @@ -66,9 +58,6 @@ export enum MessageType {
HAPTIC_FEEDBACK = 'haptic-feedback',

// Action dispatchers
SYNC_QUEUE = 'action/sync-queue',
SYNC_PLAYER = 'action/sync-player',
REQUEST_QUEUE_AUTOPLAY = 'action/request-queue-autoplay',
PUSH_ROUTE = 'action/push-route',
POP_ROUTE = 'action/pop-route',
SCROLL_TO_TOP = 'action/scroll-to-top',
Expand Down
1 change: 1 addition & 0 deletions packages/common/src/store/player/selectors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ export const getSeek = (state: CommonState) => state.player.seek

export const getCurrentTrack = (state: CommonState) =>
getTrack(state, { id: getTrackId(state) })

const getCurrentUser = (state: CommonState) => {
const track = getCurrentTrack(state)
if (track) {
Expand Down
4 changes: 0 additions & 4 deletions packages/common/src/store/queue/slice.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,6 @@ type QueueAutoplayPayload = {
currentUserId: Nullable<ID>
}

type PersistPayload = {}

type PausePayload = {}

type NextPayload = Maybe<{
Expand Down Expand Up @@ -119,7 +117,6 @@ const slice = createSlice({
state.undershot = false
},
queueAutoplay: (_state, _action: PayloadAction<QueueAutoplayPayload>) => {},
persist: (_state, _action: PayloadAction<PersistPayload>) => {},
// Pauses the queue
pause: (_state, _action: PayloadAction<PausePayload>) => {},
// Skips the next track in the queue
Expand Down Expand Up @@ -289,7 +286,6 @@ const slice = createSlice({
export const {
play,
queueAutoplay,
persist,
pause,
next,
previous,
Expand Down

0 comments on commit 5d8be85

Please sign in to comment.