Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

release v1.1.0 #283

Merged
merged 55 commits into from
Oct 28, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
93d6771
add music svg to room music theme
071yoon Oct 19, 2022
4f4e77f
try lower video rate
071yoon Oct 19, 2022
efb6ba0
rollback video to hd
071yoon Oct 19, 2022
fc9f2de
FIRE-207 fix bug
haryung-lee Oct 19, 2022
499d35b
Merge pull request #270 from SWM-FIRE/FIRE-207-study]-webrtc-세미나-준비-이하령
haryung-lee Oct 19, 2022
8cb7ddf
FIRE-767 add svg
haryung-lee Oct 21, 2022
11ca3a0
FIRE-767 add musicStore
haryung-lee Oct 21, 2022
feb135f
FIRE-767 fix controlSidebar
haryung-lee Oct 21, 2022
362dea7
FIRE-767 add youtubeSidebar
haryung-lee Oct 21, 2022
5556766
Merge pull request #271 from SWM-FIRE/FIRE-767-디자인-시안대로-퍼블리싱
haryung-lee Oct 21, 2022
d5efffe
FIRE-768 add youtube api url in config
haryung-lee Oct 21, 2022
1e057b4
FIRE-768 add youtube axios
haryung-lee Oct 21, 2022
e2c1050
FIRE-768 add youtube search feat
haryung-lee Oct 21, 2022
cde27f3
Merge pull request #272 from SWM-FIRE/FIRE-768-youtube-api-공부
haryung-lee Oct 21, 2022
8451695
add og tag
haryung-lee Oct 23, 2022
601ec37
fix og tag
haryung-lee Oct 23, 2022
c0ab38c
fix og:image tag
haryung-lee Oct 23, 2022
88614f0
add og site name and locale tag
haryung-lee Oct 23, 2022
87da747
FIRE-768 delete unnecessary api
haryung-lee Oct 23, 2022
5103390
FIRE-768 add thumbnails img
haryung-lee Oct 23, 2022
d42dde1
Merge pull request #273 from SWM-FIRE/FIRE-768-사용자는-youtube-동영상을-검색할-…
haryung-lee Oct 23, 2022
3122653
FIRE-770 add playlist
haryung-lee Oct 23, 2022
a1e2ab7
fix bug that room card's tag ui
haryung-lee Oct 23, 2022
106a95d
Merge pull request #274 from SWM-FIRE/FIRE-770-사용자는-자신이-원하는-동영상을-플레이리…
haryung-lee Oct 23, 2022
78915b2
FIRE-776 change notice close button
071yoon Oct 24, 2022
d4a688c
Merge pull request #275 from SWM-FIRE/FIRE-776-공지사항-닫기-버튼-ui-수정
071yoon Oct 24, 2022
ab495fb
FIRE-771 add playlist
haryung-lee Oct 24, 2022
21a30ef
remove resize tag at chat
071yoon Oct 24, 2022
09e5838
FIRE-771 fix musicStore & del controlYoutubeSide
haryung-lee Oct 24, 2022
0bc2753
fix
haryung-lee Oct 24, 2022
994ee57
Merge pull request #276 from SWM-FIRE/FIRE-771-플레이리스트에-있는-동영상이-보인다
haryung-lee Oct 24, 2022
d8467dc
FIRE-774 add direct message frame
071yoon Oct 24, 2022
d8c0b09
Merge pull request #277 from SWM-FIRE/FIRE-774-dm-프론트-개발
071yoon Oct 24, 2022
15fb44c
FIRE-778 add react-player
haryung-lee Oct 24, 2022
54bcd0d
FIRE-778 fix youtube search api params
haryung-lee Oct 24, 2022
f6e2df8
FIRE-778 fix youtube player and add remove item
haryung-lee Oct 24, 2022
6a90664
FIRE-778 if playlist length equals 1 then loop
haryung-lee Oct 24, 2022
2abc241
Merge pull request #278 from SWM-FIRE/FIRE-778-i-frame-api이용하여-커스텀
haryung-lee Oct 24, 2022
b7c8ded
fix notice contents
haryung-lee Oct 25, 2022
392446b
FIRE-780 add room delete logic
071yoon Oct 25, 2022
18db410
Merge pull request #279 from SWM-FIRE/FIRE-780-방-삭제-api-fe에-연동
071yoon Oct 25, 2022
8251c5f
FIRE-781 add login modal when not login
071yoon Oct 25, 2022
c6ec970
Merge pull request #280 from SWM-FIRE/FIRE-781-로그인이-필요합니다-대신-로그인창-띄우기
071yoon Oct 25, 2022
2fc1b01
FIRE-779 add youtube socket in config
haryung-lee Oct 25, 2022
dd3bfd6
FIRE-779 fix media query in main room card
haryung-lee Oct 25, 2022
3003b16
FIRE-779 add youtube socket in room
haryung-lee Oct 25, 2022
3e9ffae
Merge pull request #281 from SWM-FIRE/FIRE-779-소켓으로-플레이리스트에-추가되었을-때-유…
haryung-lee Oct 25, 2022
e86e469
fix footer f&q to faq
haryung-lee Oct 26, 2022
c7640b9
FIRE-791 refactor youtubeModal
haryung-lee Oct 26, 2022
fafac38
Merge pull request #282 from SWM-FIRE/FIRE-791-코드-리팩토링
haryung-lee Oct 26, 2022
89b75cd
fix youtubeModal
haryung-lee Oct 27, 2022
bfb5af9
fix youtube size
haryung-lee Oct 27, 2022
b9e72fe
fix youtube size
haryung-lee Oct 27, 2022
89660b8
fix youtube width
haryung-lee Oct 27, 2022
8f1e985
release v1.1.0
071yoon Oct 28, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
"react-hot-toast": "^2.3.0",
"react-items-carousel": "^2.8.0",
"react-notion": "^0.10.0",
"react-player": "^2.11.0",
"react-query": "^3.39.1",
"react-router-dom": "6",
"react-scripts": "5.0.1",
Expand Down
13 changes: 13 additions & 0 deletions public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<html lang="ko">
<head>
<meta charset="UTF-8" />

<!-- Global site tag (gtag.js) - Google Analytics -->
<script
async
Expand Down Expand Up @@ -2134,6 +2135,18 @@
/> -->

<title>modoco</title>
<meta property="og:title" content="modoco" />
<meta property="og:type" content="website" />
<meta
property="og:image"
content="https://user-images.githubusercontent.com/64428916/197377529-6b2aa0f2-4e62-4fe6-ad14-137304780733.png"
/>
<meta property="og:image:width" content="1200" />
<meta property="og:image:height" content="630" />
<meta property="og:url" content="https://modocode.com/" />
<meta property="og:description" content="모여서 도란도란 같이 코딩해요💻" />
<meta property="og:site_name" content="모도코" />
<meta property="og:locale" content="ko" />
</head>
<body>
<div id="root"></div>
Expand Down
10 changes: 5 additions & 5 deletions src/adapters/receiveMessage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,20 @@ const onChatMessage = (roomId: string) => {

useEffect(() => {
const receiveMessage = (receiveMsg) => {
const isMe = receiveMsg.sender === uid;
const isMe = receiveMsg.from === uid;
const userInfo = isMe
? {
uid: receiveMsg.sender,
uid: receiveMsg.from,
nickname,
avatar,
}
: connectedUsers.filter((user) => user.uid === receiveMsg.sender)[0];
: connectedUsers.filter((user) => user.uid === receiveMsg.from)[0];

setMessages([
...messages.map((m, index) => {
if (
index === messages.length - 1 &&
m.uid === receiveMsg.sender &&
m.uid === receiveMsg.from &&
moment(m.createdAt).format('LT') ===
moment(receiveMsg.createdAt).format('LT')
) {
Expand Down Expand Up @@ -74,7 +74,7 @@ const onChatMessage = (roomId: string) => {
moment(receiveMsg.createdAt).format('LT')
) {
isHideNicknameAndAvatar = false;
} else if (msg[msg.length - 1].uid !== receiveMsg.sender) {
} else if (msg[msg.length - 1].uid !== receiveMsg.from) {
isHideNicknameAndAvatar = false;
} else if (msg[msg.length - 1].type !== 'MESSAGE') {
isHideNicknameAndAvatar = false;
Expand Down
4 changes: 4 additions & 0 deletions src/adapters/roomConnection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@ export const roomConnection = (roomId: string) => {

joinSuccess();

newSocket?.on('exception', (event) => {
console.log('except', event);
});

newSocket?.on(SOCKET_EVENT.JOINED_ROOM, (room) => {
console.log('[roomConnection] joinedRoom', room);
emitAudioStateChange(roomId, userMic);
Expand Down
99 changes: 99 additions & 0 deletions src/adapters/youtubeSocket.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
import { io } from 'socket.io-client';
import { API } from '../config';
import youtubeSearch from '../interface/youtubeSearch.interface';

const youtubeSocket = {
socket: io(`${API.YOUTUBE_PLAYLIST as string}`, {
transports: ['websocket', 'polling'],
query: { token: localStorage.getItem('access_token') },
}),
};

const generateYoutubeSocket = () => {
youtubeSocket.socket = io(`${API.YOUTUBE_PLAYLIST as string}`, {
transports: ['websocket', 'polling'],
query: { token: localStorage.getItem('access_token') },
});
};

const initSocketConnection = () => {
if (!youtubeSocket.socket) generateYoutubeSocket();
youtubeSocket.socket?.connect();
};

const checkSocket = () => {
if (!youtubeSocket.socket || !youtubeSocket.socket.connected) {
initSocketConnection();
}
};

const disconnectSocket = () => {
youtubeSocket.socket?.off('connect');
youtubeSocket.socket?.off('playlist:join');
youtubeSocket.socket?.off('playlist:joined');
youtubeSocket.socket?.off('playlist:sync');
youtubeSocket.socket?.disconnect();
};

const connectedYoutube = () => {
youtubeSocket.socket?.on('connect', () => {
console.log(`[youtube connect] connected! ${youtubeSocket.socket?.id}`);
});
};

const joinYoutube = (roomId: string) => {
checkSocket();
youtubeSocket.socket?.emit('playlist:join', {
room: roomId,
playlistName: 'playlistItem',
});
console.log(
`[emit join] waiting for join ${roomId}! ${youtubeSocket.socket?.id}`,
);
};

// const joinedYoutube = () => {
// youtubeSocket.socket?.on('playlist:joined', (roomId: string) => {
// console.log(`[on join] joined ${roomId}! ${youtubeSocket.socket?.id}`);
// });
// };

const selectVideo = (roomId: string, video: youtubeSearch) => {
checkSocket();
youtubeSocket.socket?.emit('playlist:sync', {
room: roomId,
playlistName: 'playlistItem',
type: 'sync',
playlist: [{ video }],
});
console.log(
`[emit select] select ${video.id.videoId}! ${youtubeSocket.socket?.id}`,
);
};

const addVideo = (addFunc) => {
checkSocket();
youtubeSocket.socket?.on('playlist:sync', (data) => addFunc(data));
console.log(`[on add] add video! ${youtubeSocket.socket?.id}`);
};

const leaveYoutube = (roomId: string) => {
checkSocket();
youtubeSocket.socket?.emit('playlist:leave', {
room: roomId,
playlistName: 'playlistItem',
});
console.log(`[emit leave] leave ${roomId}! ${youtubeSocket.socket?.id}`);
};

export {
youtubeSocket,
initSocketConnection,
// generateYoutubeSocket,
disconnectSocket,
connectedYoutube,
joinYoutube,
selectVideo,
addVideo,
leaveYoutube,
};
1 change: 1 addition & 0 deletions src/api/core/index.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
export { awsRequest } from './awsLambdaAxios';
export { authorizationRequest, unAuthorizationRequest } from './backendAxios';
export { youtubeAxios } from './youtubeAxios';
28 changes: 28 additions & 0 deletions src/api/core/youtubeAxios.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import axios from 'axios';
import { API } from '../../config';

const youtubeAxios = axios.create({
baseURL: API.YOUTUBE,
});

// add youtube key in params
youtubeAxios.interceptors.request.use((config) => {
return Object.assign(config, {
params: {
...config.params,
key: process.env.REACT_APP_YOUTUBE_KEY,
},
});
});

youtubeAxios.interceptors.response.use(
(response) => {
return response;
},
(error) => {
console.warn('[Axios] ', error);
return Promise.reject(error);
},
);

export { youtubeAxios };
26 changes: 26 additions & 0 deletions src/api/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import {
authorizationRequest,
unAuthorizationRequest,
awsRequest,
youtubeAxios,
} from './core/index';
import { API } from '../config';

Expand Down Expand Up @@ -139,6 +140,29 @@ const getRecords = () => {
return authorizationRequest.get(API.RECORDS);
};

/**
* youtube
*/

// search youtube video
const searchYoutubeVideo = (keyword: string) => {
return youtubeAxios.get(API.YOUTUBE_SEARCH, {
params: {
q: keyword,
part: 'snippet',
maxResults: 15,
type: 'video',
videoEmbeddable: true,
videoCategoryId: 10,
},
});
};

// delete room
const deleteRoom = (roomId: number) => {
return authorizationRequest.delete((API.ROOM as string) + roomId);
};

export {
getUser,
getMe,
Expand All @@ -156,4 +180,6 @@ export {
getFriend,
getRecords,
changeProfile,
searchYoutubeVideo,
deleteRoom,
};
2 changes: 2 additions & 0 deletions src/assets/svg/Check.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions src/assets/svg/GrayYoutube.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions src/assets/svg/MusicOff.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions src/assets/svg/MusicOn.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 21 additions & 0 deletions src/assets/svg/RedYoutube.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions src/assets/svg/Search.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 21 additions & 0 deletions src/assets/svg/WhiteYoutube.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
24 changes: 24 additions & 0 deletions src/assets/svg/verticalMenu.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 3 additions & 1 deletion src/components/atoms/chatting/SendChat.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export default function SendChat({
newSocket.emit('chatMessage', {
room: roomId,
type: 'MESSAGE',
sender: uid,
from: uid,
message: newMessage,
createdAt: new Date(),
});
Expand Down Expand Up @@ -93,6 +93,8 @@ const Input = styled.textarea<{ roomId: string }>`
color: rgba(255, 255, 255, 1);
min-height: 2rem;
max-height: 13rem;
resize: none;
::-webkit-scrollbar {
width: 0.3rem;
}
Expand Down
Loading