Skip to content

Commit 26d6de5

Browse files
author
Michał Kardyś
committed
refactor: rename constants to be more descriptive
1 parent 8fd6f4f commit 26d6de5

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

src/PlayerScripts.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import {MUTE, PAUSE, PLAY, UNMUTE} from './constants';
1+
import {MUTE_MODE, PAUSE_MODE, PLAY_MODE, UNMUTE_MODE} from './constants';
22

33
export const PLAYER_FUNCTIONS = {
44
durationScript: `
@@ -43,13 +43,13 @@ player.seekTo(${seconds}, ${allowSeekAhead})
4343
};
4444

4545
export const playMode = {
46-
[PLAY]: PLAYER_FUNCTIONS.playVideo,
47-
[PAUSE]: PLAYER_FUNCTIONS.pauseVideo
46+
[PLAY_MODE]: PLAYER_FUNCTIONS.playVideo,
47+
[PAUSE_MODE]: PLAYER_FUNCTIONS.pauseVideo
4848
};
4949

5050
export const soundMode = {
51-
[MUTE]: PLAYER_FUNCTIONS.muteVideo,
52-
[UNMUTE]: PLAYER_FUNCTIONS.unMuteVideo,
51+
[MUTE_MODE]: PLAYER_FUNCTIONS.muteVideo,
52+
[UNMUTE_MODE]: PLAYER_FUNCTIONS.unMuteVideo,
5353
};
5454

5555
export const MAIN_SCRIPT = (

src/constants.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
export const PLAY = true;
2-
export const PAUSE = false;
3-
export const MUTE = true;
4-
export const UNMUTE = false;
1+
export const PLAY_MODE = true;
2+
export const PAUSE_MODE = false;
3+
export const MUTE_MODE = true;
4+
export const UNMUTE_MODE = false;
55

66
export const PLAYER_STATES = {
77
'-1': 'unstarted',

0 commit comments

Comments
 (0)