stream-chat-react-native-core 5.29.1-beta.1 → 5.29.1-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/commonjs/components/MessageInput/hooks/useAudioController.js +105 -73
- package/lib/commonjs/components/MessageInput/hooks/useAudioController.js.map +1 -1
- package/lib/commonjs/i18n/es.json +20 -20
- package/lib/commonjs/i18n/fr.json +20 -20
- package/lib/commonjs/i18n/he.json +20 -20
- package/lib/commonjs/i18n/hi.json +23 -23
- package/lib/commonjs/i18n/it.json +23 -23
- package/lib/commonjs/i18n/ja.json +23 -23
- package/lib/commonjs/i18n/ko.json +23 -23
- package/lib/commonjs/i18n/nl.json +23 -23
- package/lib/commonjs/i18n/pt-BR.json +23 -23
- package/lib/commonjs/i18n/ru.json +23 -23
- package/lib/commonjs/i18n/tr.json +23 -23
- package/lib/commonjs/version.json +1 -1
- package/lib/module/components/MessageInput/hooks/useAudioController.js +105 -73
- package/lib/module/components/MessageInput/hooks/useAudioController.js.map +1 -1
- package/lib/module/i18n/es.json +20 -20
- package/lib/module/i18n/fr.json +20 -20
- package/lib/module/i18n/he.json +20 -20
- package/lib/module/i18n/hi.json +23 -23
- package/lib/module/i18n/it.json +23 -23
- package/lib/module/i18n/ja.json +23 -23
- package/lib/module/i18n/ko.json +23 -23
- package/lib/module/i18n/nl.json +23 -23
- package/lib/module/i18n/pt-BR.json +23 -23
- package/lib/module/i18n/ru.json +23 -23
- package/lib/module/i18n/tr.json +23 -23
- package/lib/module/version.json +1 -1
- package/lib/typescript/components/MessageInput/hooks/useAudioController.d.ts.map +1 -1
- package/lib/typescript/i18n/es.json +20 -20
- package/lib/typescript/i18n/fr.json +20 -20
- package/lib/typescript/i18n/he.json +20 -20
- package/lib/typescript/i18n/hi.json +23 -23
- package/lib/typescript/i18n/it.json +23 -23
- package/lib/typescript/i18n/ja.json +23 -23
- package/lib/typescript/i18n/ko.json +23 -23
- package/lib/typescript/i18n/nl.json +23 -23
- package/lib/typescript/i18n/pt-BR.json +23 -23
- package/lib/typescript/i18n/ru.json +23 -23
- package/lib/typescript/i18n/tr.json +23 -23
- package/package.json +1 -1
- package/src/components/MessageInput/hooks/useAudioController.tsx +9 -1
- package/src/i18n/es.json +20 -20
- package/src/i18n/fr.json +20 -20
- package/src/i18n/he.json +20 -20
- package/src/i18n/hi.json +23 -23
- package/src/i18n/it.json +23 -23
- package/src/i18n/ja.json +23 -23
- package/src/i18n/ko.json +23 -23
- package/src/i18n/nl.json +23 -23
- package/src/i18n/pt-BR.json +23 -23
- package/src/i18n/ru.json +23 -23
- package/src/i18n/tr.json +23 -23
- package/src/version.json +1 -1
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
{
|
|
2
|
-
"1 Reply": "",
|
|
2
|
+
"1 Reply": "1 Resposta",
|
|
3
3
|
"1 Thread Reply": "",
|
|
4
4
|
"Allow access to your Gallery": "",
|
|
5
5
|
"Allow camera access in device settings": "",
|
|
6
6
|
"Also send to channel": "Também enviar para o canal",
|
|
7
7
|
"Are you sure you want to permanently delete this message?": "",
|
|
8
|
-
"Are you sure?": "",
|
|
8
|
+
"Are you sure?": "Tem certeza?",
|
|
9
9
|
"Block User": "",
|
|
10
10
|
"Cancel": "",
|
|
11
11
|
"Cannot Flag Message": "",
|
|
12
|
-
"Consider how your comment might make others feel and be sure to follow our Community Guidelines": "",
|
|
12
|
+
"Consider how your comment might make others feel and be sure to follow our Community Guidelines": "Considere como seu comentário pode fazer os outros se sentirem e certifique-se de seguir nossas Diretrizes da Comunidade",
|
|
13
13
|
"Copy Message": "",
|
|
14
14
|
"Delete": "",
|
|
15
15
|
"Delete Message": "",
|
|
@@ -17,20 +17,20 @@
|
|
|
17
17
|
"Do you want to send a copy of this message to a moderator for further investigation?": "",
|
|
18
18
|
"Edit Message": "",
|
|
19
19
|
"Editing Message": "",
|
|
20
|
-
"Emoji matching": "
|
|
21
|
-
"Empty message...": "",
|
|
22
|
-
"Error loading": "",
|
|
23
|
-
"Error loading channel list...": "",
|
|
24
|
-
"Error loading messages for this channel...": "",
|
|
25
|
-
"Error while loading, please reload/refresh": "",
|
|
20
|
+
"Emoji matching": "",
|
|
21
|
+
"Empty message...": "Mensagem vazia...",
|
|
22
|
+
"Error loading": "Erro ao carregar",
|
|
23
|
+
"Error loading channel list...": "Erro ao carregar lista de canais...",
|
|
24
|
+
"Error loading messages for this channel...": "Erro ao carregar mensagens para este canal...",
|
|
25
|
+
"Error while loading, please reload/refresh": "Erro ao carregar, por favor recarregue/atualize",
|
|
26
26
|
"File type not supported": "",
|
|
27
27
|
"Flag": "",
|
|
28
28
|
"Flag Message": "",
|
|
29
29
|
"Flag action failed either due to a network issue or the message is already flagged": "",
|
|
30
30
|
"Hold to start recording.": "",
|
|
31
|
-
"How about sending your first message to a friend?": "",
|
|
32
|
-
"Instant Commands": "
|
|
33
|
-
"Let's start chatting!": "",
|
|
31
|
+
"How about sending your first message to a friend?": "Que tal enviar sua primeira mensagem para um amigo?",
|
|
32
|
+
"Instant Commands": "",
|
|
33
|
+
"Let's start chatting!": "Vamos começar a conversar!",
|
|
34
34
|
"Links are disabled": "",
|
|
35
35
|
"Loading channels...": "",
|
|
36
36
|
"Loading messages...": "",
|
|
@@ -41,14 +41,14 @@
|
|
|
41
41
|
"Message flagged": "",
|
|
42
42
|
"Mute User": "",
|
|
43
43
|
"Not supported": "",
|
|
44
|
-
"Nothing yet...": "",
|
|
44
|
+
"Nothing yet...": "Nada ainda...",
|
|
45
45
|
"Ok": "",
|
|
46
46
|
"Only visible to you": "Apenas visível para você",
|
|
47
47
|
"Open Settings": "",
|
|
48
48
|
"Photo": "Foto",
|
|
49
49
|
"Photos and Videos": "",
|
|
50
50
|
"Pin to Conversation": "",
|
|
51
|
-
"Pinned by": "
|
|
51
|
+
"Pinned by": "",
|
|
52
52
|
"Please allow Audio permissions in settings.": "",
|
|
53
53
|
"Please enable access to your photos and videos so you can share them.": "",
|
|
54
54
|
"Please select a channel first": "",
|
|
@@ -56,26 +56,26 @@
|
|
|
56
56
|
"Reply": "",
|
|
57
57
|
"Reply to Message": "",
|
|
58
58
|
"Resend": "",
|
|
59
|
-
"Search GIFs": "",
|
|
59
|
+
"Search GIFs": "Pesquisar GIFs",
|
|
60
60
|
"Select More Photos": "",
|
|
61
|
-
"Send Anyway": "",
|
|
62
|
-
"Send a message": "",
|
|
61
|
+
"Send Anyway": "Enviar de qualquer maneira",
|
|
62
|
+
"Send a message": "Enviar uma mensagem",
|
|
63
63
|
"Sending links is not allowed in this conversation": "",
|
|
64
|
-
"Slow mode ON": "",
|
|
64
|
+
"Slow mode ON": "Modo Lento ATIVADO",
|
|
65
65
|
"The message has been reported to a moderator.": "",
|
|
66
66
|
"Thread Reply": "",
|
|
67
67
|
"Unblock User": "",
|
|
68
68
|
"Unknown User": "",
|
|
69
69
|
"Unmute User": "",
|
|
70
70
|
"Unpin from Conversation": "",
|
|
71
|
-
"Unread Messages": "",
|
|
71
|
+
"Unread Messages": "Mensagens não lidas",
|
|
72
72
|
"Video": "Vídeo",
|
|
73
73
|
"You": "Você",
|
|
74
74
|
"You can't send messages in this channel": "Você não pode enviar mensagens neste canal",
|
|
75
|
-
"{{ firstUser }} and {{ nonSelfUserLength }} more are typing": "",
|
|
75
|
+
"{{ firstUser }} and {{ nonSelfUserLength }} more are typing": "{{ firstUser }} e mais {{ nonSelfUserLength }} pessoa(s) estão digitando",
|
|
76
76
|
"{{ index }} of {{ photoLength }}": "",
|
|
77
|
-
"{{ replyCount }} Replies": "",
|
|
77
|
+
"{{ replyCount }} Replies": "{{ replyCount }} Respostas",
|
|
78
78
|
"{{ replyCount }} Thread Replies": "",
|
|
79
|
-
"{{ user }} is typing": "",
|
|
80
|
-
"🏙 Attachment...": ""
|
|
79
|
+
"{{ user }} is typing": "{{ user }} está digitando",
|
|
80
|
+
"🏙 Attachment...": "🏙 Anexo..."
|
|
81
81
|
}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
{
|
|
2
|
-
"1 Reply": "",
|
|
2
|
+
"1 Reply": "1 Ответ",
|
|
3
3
|
"1 Thread Reply": "",
|
|
4
4
|
"Allow access to your Gallery": "",
|
|
5
5
|
"Allow camera access in device settings": "",
|
|
6
6
|
"Also send to channel": "Также отправить на канал",
|
|
7
7
|
"Are you sure you want to permanently delete this message?": "",
|
|
8
|
-
"Are you sure?": "",
|
|
8
|
+
"Are you sure?": "Вы уверены?",
|
|
9
9
|
"Block User": "",
|
|
10
10
|
"Cancel": "",
|
|
11
11
|
"Cannot Flag Message": "",
|
|
12
|
-
"Consider how your comment might make others feel and be sure to follow our Community Guidelines": "",
|
|
12
|
+
"Consider how your comment might make others feel and be sure to follow our Community Guidelines": "Обдумайте, как ваш комментарий может повлиять на других, и убедитесь, что вы следуете нашим правилам сообщества",
|
|
13
13
|
"Copy Message": "",
|
|
14
14
|
"Delete": "",
|
|
15
15
|
"Delete Message": "",
|
|
@@ -17,20 +17,20 @@
|
|
|
17
17
|
"Do you want to send a copy of this message to a moderator for further investigation?": "",
|
|
18
18
|
"Edit Message": "",
|
|
19
19
|
"Editing Message": "",
|
|
20
|
-
"Emoji matching": "
|
|
21
|
-
"Empty message...": "",
|
|
22
|
-
"Error loading": "",
|
|
23
|
-
"Error loading channel list...": "",
|
|
24
|
-
"Error loading messages for this channel...": "",
|
|
25
|
-
"Error while loading, please reload/refresh": "",
|
|
20
|
+
"Emoji matching": "",
|
|
21
|
+
"Empty message...": "Пустое сообщение...",
|
|
22
|
+
"Error loading": "Ошибка при загрузке",
|
|
23
|
+
"Error loading channel list...": "Ошибка загрузки списка каналов...",
|
|
24
|
+
"Error loading messages for this channel...": "Ошибка загрузки сообщений для этого канала...",
|
|
25
|
+
"Error while loading, please reload/refresh": "Ошибка загрузки, пожалуйста перезагрузите или обновите",
|
|
26
26
|
"File type not supported": "",
|
|
27
27
|
"Flag": "",
|
|
28
28
|
"Flag Message": "",
|
|
29
29
|
"Flag action failed either due to a network issue or the message is already flagged": "",
|
|
30
30
|
"Hold to start recording.": "",
|
|
31
|
-
"How about sending your first message to a friend?": "",
|
|
32
|
-
"Instant Commands": "
|
|
33
|
-
"Let's start chatting!": "",
|
|
31
|
+
"How about sending your first message to a friend?": "Как насчет отправки первого сообщения другу?",
|
|
32
|
+
"Instant Commands": "",
|
|
33
|
+
"Let's start chatting!": "Давайте начнем общаться!",
|
|
34
34
|
"Links are disabled": "",
|
|
35
35
|
"Loading channels...": "",
|
|
36
36
|
"Loading messages...": "",
|
|
@@ -41,14 +41,14 @@
|
|
|
41
41
|
"Message flagged": "",
|
|
42
42
|
"Mute User": "",
|
|
43
43
|
"Not supported": "",
|
|
44
|
-
"Nothing yet...": "",
|
|
44
|
+
"Nothing yet...": "Пока ничего нет...",
|
|
45
45
|
"Ok": "",
|
|
46
46
|
"Only visible to you": "Видно только вам",
|
|
47
47
|
"Open Settings": "",
|
|
48
48
|
"Photo": "Фото",
|
|
49
49
|
"Photos and Videos": "",
|
|
50
50
|
"Pin to Conversation": "",
|
|
51
|
-
"Pinned by": "
|
|
51
|
+
"Pinned by": "",
|
|
52
52
|
"Please allow Audio permissions in settings.": "",
|
|
53
53
|
"Please enable access to your photos and videos so you can share them.": "",
|
|
54
54
|
"Please select a channel first": "",
|
|
@@ -56,26 +56,26 @@
|
|
|
56
56
|
"Reply": "",
|
|
57
57
|
"Reply to Message": "",
|
|
58
58
|
"Resend": "",
|
|
59
|
-
"Search GIFs": "",
|
|
59
|
+
"Search GIFs": "Поиск GIF",
|
|
60
60
|
"Select More Photos": "",
|
|
61
|
-
"Send Anyway": "",
|
|
62
|
-
"Send a message": "",
|
|
61
|
+
"Send Anyway": "Всё равно отправить",
|
|
62
|
+
"Send a message": "Отправить сообщение",
|
|
63
63
|
"Sending links is not allowed in this conversation": "",
|
|
64
|
-
"Slow mode ON": "",
|
|
64
|
+
"Slow mode ON": "Медленный режим включен",
|
|
65
65
|
"The message has been reported to a moderator.": "",
|
|
66
66
|
"Thread Reply": "",
|
|
67
67
|
"Unblock User": "",
|
|
68
68
|
"Unknown User": "",
|
|
69
69
|
"Unmute User": "",
|
|
70
70
|
"Unpin from Conversation": "",
|
|
71
|
-
"Unread Messages": "",
|
|
71
|
+
"Unread Messages": "Непрочитанные Сообщения",
|
|
72
72
|
"Video": "видео",
|
|
73
73
|
"You": "Вы",
|
|
74
74
|
"You can't send messages in this channel": "Вы не можете отправлять сообщения в этот канал",
|
|
75
|
-
"{{ firstUser }} and {{ nonSelfUserLength }} more are typing": "",
|
|
75
|
+
"{{ firstUser }} and {{ nonSelfUserLength }} more are typing": "{{ firstUser }} и еще {{ nonSelfUserLength }} пишут",
|
|
76
76
|
"{{ index }} of {{ photoLength }}": "",
|
|
77
|
-
"{{ replyCount }} Replies": "",
|
|
77
|
+
"{{ replyCount }} Replies": "{{ replyCount }} Ответов",
|
|
78
78
|
"{{ replyCount }} Thread Replies": "",
|
|
79
|
-
"{{ user }} is typing": "",
|
|
80
|
-
"🏙 Attachment...": ""
|
|
79
|
+
"{{ user }} is typing": "{{ user }} пишет",
|
|
80
|
+
"🏙 Attachment...": "🏙 Вложение..."
|
|
81
81
|
}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
{
|
|
2
|
-
"1 Reply": "",
|
|
2
|
+
"1 Reply": "1 Cevap",
|
|
3
3
|
"1 Thread Reply": "",
|
|
4
4
|
"Allow access to your Gallery": "",
|
|
5
5
|
"Allow camera access in device settings": "",
|
|
6
6
|
"Also send to channel": "Kanala da gönder",
|
|
7
7
|
"Are you sure you want to permanently delete this message?": "",
|
|
8
|
-
"Are you sure?": "",
|
|
8
|
+
"Are you sure?": "Emin misiniz?",
|
|
9
9
|
"Block User": "",
|
|
10
10
|
"Cancel": "",
|
|
11
11
|
"Cannot Flag Message": "",
|
|
12
|
-
"Consider how your comment might make others feel and be sure to follow our Community Guidelines": "",
|
|
12
|
+
"Consider how your comment might make others feel and be sure to follow our Community Guidelines": "Yorumunuzun diğerlerini nasıl hissettirebileceğini düşünün ve topluluk kurallarımızı takip ettiğinizden emin olun",
|
|
13
13
|
"Copy Message": "",
|
|
14
14
|
"Delete": "",
|
|
15
15
|
"Delete Message": "",
|
|
@@ -17,20 +17,20 @@
|
|
|
17
17
|
"Do you want to send a copy of this message to a moderator for further investigation?": "",
|
|
18
18
|
"Edit Message": "",
|
|
19
19
|
"Editing Message": "",
|
|
20
|
-
"Emoji matching": "
|
|
21
|
-
"Empty message...": "",
|
|
22
|
-
"Error loading": "",
|
|
23
|
-
"Error loading channel list...": "",
|
|
24
|
-
"Error loading messages for this channel...": "",
|
|
25
|
-
"Error while loading, please reload/refresh": "",
|
|
20
|
+
"Emoji matching": "",
|
|
21
|
+
"Empty message...": "Boş mesaj...",
|
|
22
|
+
"Error loading": "Yükleme hatası",
|
|
23
|
+
"Error loading channel list...": "Kanal listesi yüklenirken hata oluştu...",
|
|
24
|
+
"Error loading messages for this channel...": "Bu kanal için mesajlar yüklenirken hata oluştu...",
|
|
25
|
+
"Error while loading, please reload/refresh": "Yüklenirken hata oluştu, lütfen tekrar deneyiniz",
|
|
26
26
|
"File type not supported": "",
|
|
27
27
|
"Flag": "",
|
|
28
28
|
"Flag Message": "",
|
|
29
29
|
"Flag action failed either due to a network issue or the message is already flagged": "",
|
|
30
30
|
"Hold to start recording.": "",
|
|
31
|
-
"How about sending your first message to a friend?": "",
|
|
32
|
-
"Instant Commands": "
|
|
33
|
-
"Let's start chatting!": "",
|
|
31
|
+
"How about sending your first message to a friend?": "İlk mesajınızı bir arkadaşınıza göndermeye ne dersiniz?",
|
|
32
|
+
"Instant Commands": "",
|
|
33
|
+
"Let's start chatting!": "Haydi sohbete başlayalım!",
|
|
34
34
|
"Links are disabled": "",
|
|
35
35
|
"Loading channels...": "",
|
|
36
36
|
"Loading messages...": "",
|
|
@@ -41,14 +41,14 @@
|
|
|
41
41
|
"Message flagged": "",
|
|
42
42
|
"Mute User": "",
|
|
43
43
|
"Not supported": "",
|
|
44
|
-
"Nothing yet...": "",
|
|
44
|
+
"Nothing yet...": "Henüz değil...",
|
|
45
45
|
"Ok": "",
|
|
46
46
|
"Only visible to you": "Sadece siz görebilirsiniz",
|
|
47
47
|
"Open Settings": "",
|
|
48
48
|
"Photo": "Fotoğraf",
|
|
49
49
|
"Photos and Videos": "",
|
|
50
50
|
"Pin to Conversation": "",
|
|
51
|
-
"Pinned by": "
|
|
51
|
+
"Pinned by": "",
|
|
52
52
|
"Please allow Audio permissions in settings.": "",
|
|
53
53
|
"Please enable access to your photos and videos so you can share them.": "",
|
|
54
54
|
"Please select a channel first": "",
|
|
@@ -56,26 +56,26 @@
|
|
|
56
56
|
"Reply": "",
|
|
57
57
|
"Reply to Message": "",
|
|
58
58
|
"Resend": "",
|
|
59
|
-
"Search GIFs": "",
|
|
59
|
+
"Search GIFs": "GIF Ara",
|
|
60
60
|
"Select More Photos": "",
|
|
61
|
-
"Send Anyway": "",
|
|
62
|
-
"Send a message": "",
|
|
61
|
+
"Send Anyway": "Yine de Gönder",
|
|
62
|
+
"Send a message": "Mesaj gönder",
|
|
63
63
|
"Sending links is not allowed in this conversation": "",
|
|
64
|
-
"Slow mode ON": "",
|
|
64
|
+
"Slow mode ON": "Yavaş Mod Açık",
|
|
65
65
|
"The message has been reported to a moderator.": "",
|
|
66
66
|
"Thread Reply": "",
|
|
67
67
|
"Unblock User": "",
|
|
68
68
|
"Unknown User": "",
|
|
69
69
|
"Unmute User": "",
|
|
70
70
|
"Unpin from Conversation": "",
|
|
71
|
-
"Unread Messages": "",
|
|
71
|
+
"Unread Messages": "Okunmamış Mesajlar",
|
|
72
72
|
"Video": "Video",
|
|
73
73
|
"You": "Sen",
|
|
74
74
|
"You can't send messages in this channel": "Bu konuşmaya mesaj gönderemezsiniz",
|
|
75
|
-
"{{ firstUser }} and {{ nonSelfUserLength }} more are typing": "",
|
|
75
|
+
"{{ firstUser }} and {{ nonSelfUserLength }} more are typing": "{{ firstUser }} ve {{ nonSelfUserLength }} kişi daha yazıyor",
|
|
76
76
|
"{{ index }} of {{ photoLength }}": "",
|
|
77
|
-
"{{ replyCount }} Replies": "",
|
|
77
|
+
"{{ replyCount }} Replies": "{{ replyCount }} Cevap",
|
|
78
78
|
"{{ replyCount }} Thread Replies": "",
|
|
79
|
-
"{{ user }} is typing": "",
|
|
80
|
-
"🏙 Attachment...": ""
|
|
79
|
+
"{{ user }} is typing": "{{ user }} yazıyor",
|
|
80
|
+
"🏙 Attachment...": "🏙 Ek..."
|
|
81
81
|
}
|
|
@@ -95,53 +95,59 @@ var useAudioController = function useAudioController() {
|
|
|
95
95
|
return _regenerator["default"].wrap(function _callee$(_context) {
|
|
96
96
|
while (1) switch (_context.prev = _context.next) {
|
|
97
97
|
case 0:
|
|
98
|
+
if (_native.Audio) {
|
|
99
|
+
_context.next = 2;
|
|
100
|
+
break;
|
|
101
|
+
}
|
|
102
|
+
return _context.abrupt("return");
|
|
103
|
+
case 2:
|
|
98
104
|
if (!paused) {
|
|
99
|
-
_context.next =
|
|
105
|
+
_context.next = 16;
|
|
100
106
|
break;
|
|
101
107
|
}
|
|
102
108
|
if (!(progress === 0)) {
|
|
103
|
-
_context.next =
|
|
109
|
+
_context.next = 8;
|
|
104
110
|
break;
|
|
105
111
|
}
|
|
106
|
-
_context.next =
|
|
112
|
+
_context.next = 6;
|
|
107
113
|
return startVoicePlayer();
|
|
108
|
-
case 4:
|
|
109
|
-
_context.next = 12;
|
|
110
|
-
break;
|
|
111
114
|
case 6:
|
|
115
|
+
_context.next = 14;
|
|
116
|
+
break;
|
|
117
|
+
case 8:
|
|
112
118
|
if (!_native.Audio.resumePlayer) {
|
|
113
|
-
_context.next =
|
|
119
|
+
_context.next = 11;
|
|
114
120
|
break;
|
|
115
121
|
}
|
|
116
|
-
_context.next =
|
|
122
|
+
_context.next = 11;
|
|
117
123
|
return _native.Audio.resumePlayer();
|
|
118
|
-
case
|
|
124
|
+
case 11:
|
|
119
125
|
if (!((_soundRef$current = soundRef.current) != null && _soundRef$current.playAsync)) {
|
|
120
|
-
_context.next =
|
|
126
|
+
_context.next = 14;
|
|
121
127
|
break;
|
|
122
128
|
}
|
|
123
|
-
_context.next =
|
|
129
|
+
_context.next = 14;
|
|
124
130
|
return soundRef.current.playAsync();
|
|
125
|
-
case 12:
|
|
126
|
-
_context.next = 20;
|
|
127
|
-
break;
|
|
128
131
|
case 14:
|
|
132
|
+
_context.next = 22;
|
|
133
|
+
break;
|
|
134
|
+
case 16:
|
|
129
135
|
if (!_native.Audio.pausePlayer) {
|
|
130
|
-
_context.next =
|
|
136
|
+
_context.next = 19;
|
|
131
137
|
break;
|
|
132
138
|
}
|
|
133
|
-
_context.next =
|
|
139
|
+
_context.next = 19;
|
|
134
140
|
return _native.Audio.pausePlayer();
|
|
135
|
-
case
|
|
141
|
+
case 19:
|
|
136
142
|
if (!((_soundRef$current2 = soundRef.current) != null && _soundRef$current2.pauseAsync)) {
|
|
137
|
-
_context.next =
|
|
143
|
+
_context.next = 22;
|
|
138
144
|
break;
|
|
139
145
|
}
|
|
140
|
-
_context.next =
|
|
146
|
+
_context.next = 22;
|
|
141
147
|
return soundRef.current.pauseAsync();
|
|
142
|
-
case
|
|
148
|
+
case 22:
|
|
143
149
|
setPaused(!paused);
|
|
144
|
-
case
|
|
150
|
+
case 23:
|
|
145
151
|
case "end":
|
|
146
152
|
return _context.stop();
|
|
147
153
|
}
|
|
@@ -157,44 +163,50 @@ var useAudioController = function useAudioController() {
|
|
|
157
163
|
return _regenerator["default"].wrap(function _callee2$(_context2) {
|
|
158
164
|
while (1) switch (_context2.prev = _context2.next) {
|
|
159
165
|
case 0:
|
|
160
|
-
if (
|
|
166
|
+
if (_native.Audio) {
|
|
161
167
|
_context2.next = 2;
|
|
162
168
|
break;
|
|
163
169
|
}
|
|
164
170
|
return _context2.abrupt("return");
|
|
165
171
|
case 2:
|
|
172
|
+
if (recording) {
|
|
173
|
+
_context2.next = 4;
|
|
174
|
+
break;
|
|
175
|
+
}
|
|
176
|
+
return _context2.abrupt("return");
|
|
177
|
+
case 4:
|
|
166
178
|
if (!_native.Audio.startPlayer) {
|
|
167
|
-
_context2.next =
|
|
179
|
+
_context2.next = 7;
|
|
168
180
|
break;
|
|
169
181
|
}
|
|
170
|
-
_context2.next =
|
|
182
|
+
_context2.next = 7;
|
|
171
183
|
return _native.Audio.startPlayer(recording, {}, onVoicePlayerPlaybackStatusUpdate);
|
|
172
|
-
case
|
|
184
|
+
case 7:
|
|
173
185
|
if (!(recording && typeof recording !== 'string')) {
|
|
174
|
-
_context2.next =
|
|
186
|
+
_context2.next = 18;
|
|
175
187
|
break;
|
|
176
188
|
}
|
|
177
189
|
uri = recording.getURI();
|
|
178
190
|
if (!uri) {
|
|
179
|
-
_context2.next =
|
|
191
|
+
_context2.next = 18;
|
|
180
192
|
break;
|
|
181
193
|
}
|
|
182
|
-
_context2.next =
|
|
194
|
+
_context2.next = 12;
|
|
183
195
|
return _native.Sound.initializeSound({
|
|
184
196
|
uri: uri
|
|
185
197
|
}, {}, onVoicePlayerPlaybackStatusUpdate);
|
|
186
|
-
case
|
|
198
|
+
case 12:
|
|
187
199
|
soundRef.current = _context2.sent;
|
|
188
200
|
if (!((_soundRef$current3 = soundRef.current) != null && _soundRef$current3.playAsync && soundRef.current.setProgressUpdateIntervalAsync)) {
|
|
189
|
-
_context2.next =
|
|
201
|
+
_context2.next = 18;
|
|
190
202
|
break;
|
|
191
203
|
}
|
|
192
|
-
_context2.next = 14;
|
|
193
|
-
return soundRef.current.playAsync();
|
|
194
|
-
case 14:
|
|
195
204
|
_context2.next = 16;
|
|
196
|
-
return soundRef.current.
|
|
205
|
+
return soundRef.current.playAsync();
|
|
197
206
|
case 16:
|
|
207
|
+
_context2.next = 18;
|
|
208
|
+
return soundRef.current.setProgressUpdateIntervalAsync(_reactNative.Platform.OS === 'android' ? 100 : 60);
|
|
209
|
+
case 18:
|
|
198
210
|
case "end":
|
|
199
211
|
return _context2.stop();
|
|
200
212
|
}
|
|
@@ -210,27 +222,33 @@ var useAudioController = function useAudioController() {
|
|
|
210
222
|
return _regenerator["default"].wrap(function _callee3$(_context3) {
|
|
211
223
|
while (1) switch (_context3.prev = _context3.next) {
|
|
212
224
|
case 0:
|
|
225
|
+
if (_native.Audio) {
|
|
226
|
+
_context3.next = 2;
|
|
227
|
+
break;
|
|
228
|
+
}
|
|
229
|
+
return _context3.abrupt("return");
|
|
230
|
+
case 2:
|
|
213
231
|
if (!_native.Audio.stopPlayer) {
|
|
214
|
-
_context3.next =
|
|
232
|
+
_context3.next = 5;
|
|
215
233
|
break;
|
|
216
234
|
}
|
|
217
|
-
_context3.next =
|
|
235
|
+
_context3.next = 5;
|
|
218
236
|
return _native.Audio.stopPlayer();
|
|
219
|
-
case
|
|
237
|
+
case 5:
|
|
220
238
|
if (!(recording && typeof recording !== 'string')) {
|
|
221
|
-
_context3.next =
|
|
239
|
+
_context3.next = 11;
|
|
222
240
|
break;
|
|
223
241
|
}
|
|
224
242
|
if (!((_soundRef$current4 = soundRef.current) != null && _soundRef$current4.stopAsync && (_soundRef$current5 = soundRef.current) != null && _soundRef$current5.unloadAsync)) {
|
|
225
|
-
_context3.next =
|
|
243
|
+
_context3.next = 11;
|
|
226
244
|
break;
|
|
227
245
|
}
|
|
228
|
-
_context3.next = 7;
|
|
229
|
-
return soundRef.current.stopAsync();
|
|
230
|
-
case 7:
|
|
231
246
|
_context3.next = 9;
|
|
232
|
-
return
|
|
247
|
+
return soundRef.current.stopAsync();
|
|
233
248
|
case 9:
|
|
249
|
+
_context3.next = 11;
|
|
250
|
+
return (_soundRef$current6 = soundRef.current) == null ? void 0 : _soundRef$current6.unloadAsync();
|
|
251
|
+
case 11:
|
|
234
252
|
case "end":
|
|
235
253
|
return _context3.stop();
|
|
236
254
|
}
|
|
@@ -257,16 +275,22 @@ var useAudioController = function useAudioController() {
|
|
|
257
275
|
return _regenerator["default"].wrap(function _callee4$(_context4) {
|
|
258
276
|
while (1) switch (_context4.prev = _context4.next) {
|
|
259
277
|
case 0:
|
|
278
|
+
if (_native.Audio) {
|
|
279
|
+
_context4.next = 2;
|
|
280
|
+
break;
|
|
281
|
+
}
|
|
282
|
+
return _context4.abrupt("return");
|
|
283
|
+
case 2:
|
|
260
284
|
setRecordingStatus('recording');
|
|
261
|
-
_context4.next =
|
|
285
|
+
_context4.next = 5;
|
|
262
286
|
return _native.Audio.startRecording({
|
|
263
287
|
isMeteringEnabled: true
|
|
264
288
|
}, onRecordingStatusUpdate);
|
|
265
|
-
case
|
|
289
|
+
case 5:
|
|
266
290
|
recordingInfo = _context4.sent;
|
|
267
291
|
accessGranted = recordingInfo.accessGranted;
|
|
268
292
|
if (!accessGranted) {
|
|
269
|
-
_context4.next =
|
|
293
|
+
_context4.next = 16;
|
|
270
294
|
break;
|
|
271
295
|
}
|
|
272
296
|
setPermissionsGranted(true);
|
|
@@ -275,16 +299,16 @@ var useAudioController = function useAudioController() {
|
|
|
275
299
|
_recording.setProgressUpdateInterval(_reactNative.Platform.OS === 'android' ? 100 : 60);
|
|
276
300
|
}
|
|
277
301
|
setRecording(_recording);
|
|
278
|
-
_context4.next =
|
|
302
|
+
_context4.next = 14;
|
|
279
303
|
return stopVoicePlayer();
|
|
280
|
-
case 12:
|
|
281
|
-
_context4.next = 17;
|
|
282
|
-
break;
|
|
283
304
|
case 14:
|
|
305
|
+
_context4.next = 19;
|
|
306
|
+
break;
|
|
307
|
+
case 16:
|
|
284
308
|
setPermissionsGranted(false);
|
|
285
309
|
resetState();
|
|
286
310
|
_reactNative.Alert.alert('Please allow Audio permissions in settings.');
|
|
287
|
-
case
|
|
311
|
+
case 19:
|
|
288
312
|
case "end":
|
|
289
313
|
return _context4.stop();
|
|
290
314
|
}
|
|
@@ -299,28 +323,34 @@ var useAudioController = function useAudioController() {
|
|
|
299
323
|
return _regenerator["default"].wrap(function _callee5$(_context5) {
|
|
300
324
|
while (1) switch (_context5.prev = _context5.next) {
|
|
301
325
|
case 0:
|
|
326
|
+
if (_native.Audio) {
|
|
327
|
+
_context5.next = 2;
|
|
328
|
+
break;
|
|
329
|
+
}
|
|
330
|
+
return _context5.abrupt("return");
|
|
331
|
+
case 2:
|
|
302
332
|
if (!recording) {
|
|
303
|
-
_context5.next =
|
|
333
|
+
_context5.next = 12;
|
|
304
334
|
break;
|
|
305
335
|
}
|
|
306
336
|
if (!(typeof recording !== 'string')) {
|
|
307
|
-
_context5.next =
|
|
337
|
+
_context5.next = 10;
|
|
308
338
|
break;
|
|
309
339
|
}
|
|
310
|
-
_context5.next = 4;
|
|
311
|
-
return recording.stopAndUnloadAsync();
|
|
312
|
-
case 4:
|
|
313
340
|
_context5.next = 6;
|
|
314
|
-
return
|
|
341
|
+
return recording.stopAndUnloadAsync();
|
|
315
342
|
case 6:
|
|
316
|
-
_context5.next =
|
|
317
|
-
break;
|
|
318
|
-
case 8:
|
|
319
|
-
_context5.next = 10;
|
|
343
|
+
_context5.next = 8;
|
|
320
344
|
return _native.Audio.stopRecording();
|
|
345
|
+
case 8:
|
|
346
|
+
_context5.next = 12;
|
|
347
|
+
break;
|
|
321
348
|
case 10:
|
|
349
|
+
_context5.next = 12;
|
|
350
|
+
return _native.Audio.stopRecording();
|
|
351
|
+
case 12:
|
|
322
352
|
setRecordingStatus('stopped');
|
|
323
|
-
case
|
|
353
|
+
case 13:
|
|
324
354
|
case "end":
|
|
325
355
|
return _context5.stop();
|
|
326
356
|
}
|
|
@@ -372,7 +402,7 @@ var useAudioController = function useAudioController() {
|
|
|
372
402
|
}();
|
|
373
403
|
var uploadVoiceRecording = function () {
|
|
374
404
|
var _ref7 = (0, _asyncToGenerator2["default"])(_regenerator["default"].mark(function _callee7(multiSendEnabled) {
|
|
375
|
-
var durationInSeconds, resampledWaveformData, file;
|
|
405
|
+
var durationInSeconds, resampledWaveformData, clearFilter, date, file;
|
|
376
406
|
return _regenerator["default"].wrap(function _callee7$(_context7) {
|
|
377
407
|
while (1) switch (_context7.prev = _context7.next) {
|
|
378
408
|
case 0:
|
|
@@ -392,31 +422,33 @@ var useAudioController = function useAudioController() {
|
|
|
392
422
|
case 6:
|
|
393
423
|
durationInSeconds = parseFloat((recordingDuration / 1000).toFixed(3));
|
|
394
424
|
resampledWaveformData = (0, _audioSampling.resampleWaveformData)(waveformData, 100);
|
|
425
|
+
clearFilter = new RegExp('[.:]', 'g');
|
|
426
|
+
date = new Date().toISOString().replace(clearFilter, '_');
|
|
395
427
|
file = {
|
|
396
428
|
duration: durationInSeconds,
|
|
397
429
|
mimeType: 'audio/aac',
|
|
398
|
-
name: "audio_recording_".concat(
|
|
430
|
+
name: "audio_recording_".concat(date, ".aac"),
|
|
399
431
|
type: 'voiceRecording',
|
|
400
432
|
uri: typeof recording !== 'string' ? recording == null ? void 0 : recording.getURI() : recording,
|
|
401
433
|
waveform_data: resampledWaveformData
|
|
402
434
|
};
|
|
403
435
|
if (!multiSendEnabled) {
|
|
404
|
-
_context7.next =
|
|
436
|
+
_context7.next = 16;
|
|
405
437
|
break;
|
|
406
438
|
}
|
|
407
|
-
_context7.next =
|
|
439
|
+
_context7.next = 14;
|
|
408
440
|
return uploadNewFile(file);
|
|
409
|
-
case 12:
|
|
410
|
-
_context7.next = 17;
|
|
411
|
-
break;
|
|
412
441
|
case 14:
|
|
413
|
-
_context7.next =
|
|
414
|
-
|
|
442
|
+
_context7.next = 19;
|
|
443
|
+
break;
|
|
415
444
|
case 16:
|
|
445
|
+
_context7.next = 18;
|
|
446
|
+
return uploadNewFile(file);
|
|
447
|
+
case 18:
|
|
416
448
|
setIsScheduleForSubmit(true);
|
|
417
|
-
case
|
|
449
|
+
case 19:
|
|
418
450
|
resetState();
|
|
419
|
-
case
|
|
451
|
+
case 20:
|
|
420
452
|
case "end":
|
|
421
453
|
return _context7.stop();
|
|
422
454
|
}
|