Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
abook_check
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abook_android
abook_check
Commits
a64b4d31
Commit
a64b4d31
authored
Jan 26, 2021
by
Lee Munkyeong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
マージリクエストのコメント対応
parent
8c77c525
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
115 additions
and
115 deletions
+115
-115
ABVJE_BL/src/jp/agentec/abook/abv/bl/data/tables/MShopMember.java
+1
-1
ABVJE_BL/src/jp/agentec/abook/abv/bl/data/tables/TArchive.java
+1
-1
ABVJE_BL/src/jp/agentec/abook/abv/bl/data/tables/TChatMessage.java
+1
-1
ABVJE_BL/src/jp/agentec/abook/abv/bl/data/tables/TChatRoom.java
+1
-1
ABVJE_BL/src/jp/agentec/abook/abv/bl/data/tables/TCollaboration.java
+1
-1
ABVJE_BL/src/jp/agentec/abook/abv/bl/data/tables/TCollaborationDetail.java
+1
-1
ABVJE_BL/src/jp/agentec/abook/abv/bl/logic/CommunicationLogic.java
+12
-12
ABVJE_BL/src/jp/agentec/adf/util/DateTimeUtil.java
+2
-2
ABVJE_Launcher_Android/assets/chat/public/index.html
+1
-1
ABVJE_Launcher_Android/assets/chat/public/js/chat-ui.js
+6
-6
ABVJE_Launcher_Android/assets/chat/public/js/chat-websocket.js
+16
-16
ABVJE_Launcher_Android/assets/chat/public/js/chat.js
+14
-14
ABVJE_Launcher_Android/assets/chat/public/socket.io/lib/manager.js
+35
-35
ABVJE_Launcher_Android/assets/chat/public/socket.io/lib/on.js
+2
-2
ABVJE_Launcher_Android/assets/chat/public/socket.io/lib/socket.js
+19
-19
ABVJE_Launcher_Android/build.gradle
+2
-2
No files found.
ABVJE_BL/src/jp/agentec/abook/abv/bl/data/tables/MShopMember.java
View file @
a64b4d31
...
@@ -7,7 +7,7 @@ import jp.agentec.abook.abv.bl.common.db.SQLiteDatabase;
...
@@ -7,7 +7,7 @@ import jp.agentec.abook.abv.bl.common.db.SQLiteDatabase;
public
class
MShopMember
extends
SQLiteTableScript
{
public
class
MShopMember
extends
SQLiteTableScript
{
public
MShopMember
(){
public
MShopMember
()
{
};
};
@Override
@Override
...
...
ABVJE_BL/src/jp/agentec/abook/abv/bl/data/tables/TArchive.java
View file @
a64b4d31
...
@@ -7,7 +7,7 @@ import jp.agentec.abook.abv.bl.common.db.SQLiteDatabase;
...
@@ -7,7 +7,7 @@ import jp.agentec.abook.abv.bl.common.db.SQLiteDatabase;
public
class
TArchive
extends
SQLiteTableScript
{
public
class
TArchive
extends
SQLiteTableScript
{
public
TArchive
(){
public
TArchive
()
{
};
};
@Override
@Override
...
...
ABVJE_BL/src/jp/agentec/abook/abv/bl/data/tables/TChatMessage.java
View file @
a64b4d31
...
@@ -7,7 +7,7 @@ import jp.agentec.abook.abv.bl.common.db.SQLiteDatabase;
...
@@ -7,7 +7,7 @@ import jp.agentec.abook.abv.bl.common.db.SQLiteDatabase;
public
class
TChatMessage
extends
SQLiteTableScript
{
public
class
TChatMessage
extends
SQLiteTableScript
{
public
TChatMessage
(){
public
TChatMessage
()
{
};
};
@Override
@Override
...
...
ABVJE_BL/src/jp/agentec/abook/abv/bl/data/tables/TChatRoom.java
View file @
a64b4d31
...
@@ -7,7 +7,7 @@ import jp.agentec.abook.abv.bl.common.db.SQLiteDatabase;
...
@@ -7,7 +7,7 @@ import jp.agentec.abook.abv.bl.common.db.SQLiteDatabase;
public
class
TChatRoom
extends
SQLiteTableScript
{
public
class
TChatRoom
extends
SQLiteTableScript
{
public
TChatRoom
(){
public
TChatRoom
()
{
};
};
@Override
@Override
...
...
ABVJE_BL/src/jp/agentec/abook/abv/bl/data/tables/TCollaboration.java
View file @
a64b4d31
...
@@ -7,7 +7,7 @@ import jp.agentec.abook.abv.bl.common.db.SQLiteDatabase;
...
@@ -7,7 +7,7 @@ import jp.agentec.abook.abv.bl.common.db.SQLiteDatabase;
public
class
TCollaboration
extends
SQLiteTableScript
{
public
class
TCollaboration
extends
SQLiteTableScript
{
public
TCollaboration
(){
public
TCollaboration
()
{
};
};
@Override
@Override
...
...
ABVJE_BL/src/jp/agentec/abook/abv/bl/data/tables/TCollaborationDetail.java
View file @
a64b4d31
...
@@ -7,7 +7,7 @@ import jp.agentec.abook.abv.bl.common.db.SQLiteDatabase;
...
@@ -7,7 +7,7 @@ import jp.agentec.abook.abv.bl.common.db.SQLiteDatabase;
public
class
TCollaborationDetail
extends
SQLiteTableScript
{
public
class
TCollaborationDetail
extends
SQLiteTableScript
{
public
TCollaborationDetail
(){
public
TCollaborationDetail
()
{
};
};
@Override
@Override
...
...
ABVJE_BL/src/jp/agentec/abook/abv/bl/logic/CommunicationLogic.java
View file @
a64b4d31
...
@@ -69,20 +69,20 @@ public class CommunicationLogic extends AbstractLogic {
...
@@ -69,20 +69,20 @@ public class CommunicationLogic extends AbstractLogic {
JSONArray
resultJsonArray
=
new
JSONArray
();
JSONArray
resultJsonArray
=
new
JSONArray
();
for
(
ChatRoomDto
chatRoomDto
:
chatRoomList
)
{
for
(
ChatRoomDto
chatRoomDto
:
chatRoomList
)
{
Map
<
String
,
Object
>
chatRoomMap
=
new
HashMap
<
String
,
Object
>();
Map
<
String
,
Object
>
chatRoomMap
=
new
HashMap
<
String
,
Object
>();
chatRoomMap
.
put
(
"chatRoomId"
,
chatRoomDto
.
chatRoomId
);
chatRoomMap
.
put
(
"chatRoomId"
,
chatRoomDto
.
chatRoomId
);
chatRoomMap
.
put
(
"chatRoomName"
,
chatRoomDto
.
chatRoomName
);
chatRoomMap
.
put
(
"chatRoomName"
,
chatRoomDto
.
chatRoomName
);
chatRoomMap
.
put
(
"type"
,
chatRoomDto
.
type
);
chatRoomMap
.
put
(
"type"
,
chatRoomDto
.
type
);
chatRoomMap
.
put
(
"favoriteRegisterDate"
,
chatRoomDto
.
favoriteRegisterDate
);
chatRoomMap
.
put
(
"favoriteRegisterDate"
,
chatRoomDto
.
favoriteRegisterDate
);
chatRoomMap
.
put
(
"unreadCount"
,
chatRoomDto
.
unreadCount
);
chatRoomMap
.
put
(
"unreadCount"
,
chatRoomDto
.
unreadCount
);
chatRoomMap
.
put
(
"message"
,
chatRoomDto
.
message
);
chatRoomMap
.
put
(
"message"
,
chatRoomDto
.
message
);
chatRoomMap
.
put
(
"messageType"
,
chatRoomDto
.
messageType
);
chatRoomMap
.
put
(
"messageType"
,
chatRoomDto
.
messageType
);
chatRoomMap
.
put
(
"insertDate"
,
chatRoomDto
.
insertDate
);
chatRoomMap
.
put
(
"insertDate"
,
chatRoomDto
.
insertDate
);
chatRoomMap
.
put
(
"userCount"
,
chatRoomDto
.
userCount
);
chatRoomMap
.
put
(
"userCount"
,
chatRoomDto
.
userCount
);
JSONObject
jsonObject
=
new
JSONObject
(
chatRoomMap
);
JSONObject
jsonObject
=
new
JSONObject
(
chatRoomMap
);
resultJsonArray
.
put
(
jsonObject
);
resultJsonArray
.
put
(
jsonObject
);
}
}
String
testStr1
=
resultJsonArray
.
toString
();
String
roomListToStr
=
resultJsonArray
.
toString
();
return
testStr1
;
return
roomListToStr
;
}
}
public
void
insertChatRoomList
(
List
<
ChatRoomDto
>
roomList
)
{
public
void
insertChatRoomList
(
List
<
ChatRoomDto
>
roomList
)
{
...
...
ABVJE_BL/src/jp/agentec/adf/util/DateTimeUtil.java
View file @
a64b4d31
...
@@ -587,9 +587,9 @@ public class DateTimeUtil {
...
@@ -587,9 +587,9 @@ public class DateTimeUtil {
public
static
String
millToDateString
(
long
mills
)
{
public
static
String
millToDateString
(
long
mills
)
{
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyyMMddHHmmss"
);
SimpleDateFormat
dateFormat
=
new
SimpleDateFormat
(
"yyyyMMddHHmmss"
);
Date
timeInDate
=
new
Date
(
mills
);
Date
timeInDate
=
new
Date
(
mills
);
String
timeInFormat
=
sdf
.
format
(
timeInDate
);
String
timeInFormat
=
dateFormat
.
format
(
timeInDate
);
return
timeInFormat
;
return
timeInFormat
;
}
}
...
...
ABVJE_Launcher_Android/assets/chat/public/index.html
View file @
a64b4d31
...
@@ -440,7 +440,7 @@
...
@@ -440,7 +440,7 @@
<script
src=
"./js/chat-websocket.js"
></script>
<script
src=
"./js/chat-websocket.js"
></script>
</body>
</body>
<script>
<script>
jQuery
(
'#homeButton'
).
on
(
'click'
,
function
(){
jQuery
(
'#homeButton'
).
on
(
'click'
,
function
()
{
if
(
CHAT_UTIL
.
isIOS
())
{
if
(
CHAT_UTIL
.
isIOS
())
{
webkit
.
messageHandlers
.
goHome
.
postMessage
({});
webkit
.
messageHandlers
.
goHome
.
postMessage
({});
...
...
ABVJE_Launcher_Android/assets/chat/public/js/chat-ui.js
View file @
a64b4d31
...
@@ -44,7 +44,7 @@ $(window).on('resize', function(){
...
@@ -44,7 +44,7 @@ $(window).on('resize', function(){
// New Room
// New Room
// チャットルーム生成ボタン処理
// チャットルーム生成ボタン処理
$
(
'#createChatRoom'
).
on
(
'click'
,
function
(){
$
(
'#createChatRoom'
).
on
(
'click'
,
function
()
{
//loadingIndicatorを表示
//loadingIndicatorを表示
CHAT_UI
.
showLoadingIndicator
();
CHAT_UI
.
showLoadingIndicator
();
...
@@ -55,20 +55,20 @@ $('#createChatRoom').on('click', function(){
...
@@ -55,20 +55,20 @@ $('#createChatRoom').on('click', function(){
// Room Delete
// Room Delete
// チャットルーム削除ボタン処理
// チャットルーム削除ボタン処理
$
(
'#roomDeleteButton'
).
on
(
'click'
,
function
(
e
){
$
(
'#roomDeleteButton'
).
on
(
'click'
,
function
(
e
)
{
if
(
$
(
'.deleteBox'
).
is
(
':visible'
))
{
if
(
$
(
'.deleteBox'
).
is
(
':visible'
))
{
// チャットルーム削除アイコンが表示されている時、ブラインド処理を行う
// チャットルーム削除アイコンが表示されている時、ブラインド処理を行う
$
(
'.deleteBox'
).
finish
().
show
().
fadeTo
(
'slow'
,
0
,
function
()
{
$
(
'.deleteBox'
).
finish
().
show
().
fadeTo
(
'slow'
,
0
,
function
()
{
$
(
this
).
hide
();
$
(
this
).
hide
();
});
});
// チャットリストについてクリックイベントを与える
// チャットリストについてクリックイベントを与える
$
(
'.chat_list'
).
off
(
'click'
);
$
(
'.chat_list'
).
off
(
'click'
);
$
(
'.chat_list:not(.active_chat)'
).
on
(
'click'
,
function
(
e
){
$
(
'.chat_list:not(.active_chat)'
).
on
(
'click'
,
function
(
e
)
{
//loadingIndicatorを表示
//loadingIndicatorを表示
CHAT_UI
.
showLoadingIndicator
();
CHAT_UI
.
showLoadingIndicator
();
let
roomId
=
$
(
this
).
data
(
'roomId'
);
let
roomId
=
$
(
this
).
data
(
'roomId'
);
let
roomName
=
$
(
this
).
data
(
'roomname'
);
let
roomName
=
$
(
this
).
data
(
'roomname'
);
socket
.
emit
(
'joinRoom'
,
roomId
,
roomName
,
function
()
{
socket
.
emit
(
'joinRoom'
,
roomId
,
roomName
,
function
()
{
$
(
'#messages'
).
html
(
''
);
$
(
'#messages'
).
html
(
''
);
$
(
'.titleRoomName'
).
text
(
roomName
).
data
(
'roomName'
,
roomName
);
$
(
'.titleRoomName'
).
text
(
roomName
).
data
(
'roomName'
,
roomName
);
$
(
'#pills-chat-tab'
).
tab
(
'show'
);
$
(
'#pills-chat-tab'
).
tab
(
'show'
);
...
@@ -449,7 +449,7 @@ $('a[data-toggle="pill"]').on('show.bs.tab', function (e) {
...
@@ -449,7 +449,7 @@ $('a[data-toggle="pill"]').on('show.bs.tab', function (e) {
});
});
// Tab Close/Hidden Event
// Tab Close/Hidden Event
$
(
'a[data-toggle="pill"]'
).
on
(
'hide.bs.tab'
,
function
(
e
)
{
$
(
'a[data-toggle="pill"]'
).
on
(
'hide.bs.tab'
,
function
(
e
)
{
var
target
=
$
(
e
.
target
).
attr
(
"href"
);
// e.target : activated tab
var
target
=
$
(
e
.
target
).
attr
(
"href"
);
// e.target : activated tab
switch
(
target
)
{
switch
(
target
)
{
case
'#pills-chat'
:
case
'#pills-chat'
:
...
...
ABVJE_Launcher_Android/assets/chat/public/js/chat-websocket.js
View file @
a64b4d31
...
@@ -31,7 +31,7 @@ function connectSocket(isOnline) {
...
@@ -31,7 +31,7 @@ function connectSocket(isOnline) {
* Socket Connect/Disconnectc
* Socket Connect/Disconnectc
* --------------------------------------------------- */
* --------------------------------------------------- */
function
setSocketAction
()
{
function
setSocketAction
()
{
socket
.
on
(
'connect'
,
function
()
{
socket
.
on
(
'connect'
,
function
()
{
// socketが接続されたらチャット画面で画面を更新する
// socketが接続されたらチャット画面で画面を更新する
$
(
'.overlay'
).
removeClass
(
'active undismissable'
);
$
(
'.overlay'
).
removeClass
(
'active undismissable'
);
// loadingIndicatorを表示
// loadingIndicatorを表示
...
@@ -171,7 +171,7 @@ function setSocketAction () {
...
@@ -171,7 +171,7 @@ function setSocketAction () {
// New Message
// New Message
// #36170
// #36170
socket
.
on
(
'newMessage'
,
function
(
message
,
roomId
,
roomName
){
socket
.
on
(
'newMessage'
,
function
(
message
,
roomId
,
roomName
)
{
let
template
=
$
(
'#message-template'
).
html
();
let
template
=
$
(
'#message-template'
).
html
();
if
(
message
.
id
===
socket
.
id
)
{
if
(
message
.
id
===
socket
.
id
)
{
// ユーザーが送信したメッセージの場合、自分のメッセージ様式を適用して表示する
// ユーザーが送信したメッセージの場合、自分のメッセージ様式を適用して表示する
...
@@ -224,11 +224,11 @@ function setSocketAction () {
...
@@ -224,11 +224,11 @@ function setSocketAction () {
}
}
let
messageTime
=
CHAT_UTIL
.
formatDate
(
message
.
time
.
time
);
let
messageTime
=
CHAT_UTIL
.
formatDate
(
message
.
time
.
time
);
if
(
users
!=
undefined
)
{
if
(
users
!=
undefined
)
{
let
user
=
users
.
find
((
user
)
=>
user
.
loginId
==
message
.
loginId
)
let
user
=
users
.
find
((
user
)
=>
user
.
loginId
==
message
.
loginId
)
// userProfilePathが使えるpathかをcheckして使えないpathの場合、default画像の経路に変更
// userProfilePathが使えるpathかをcheckして使えないpathの場合、default画像の経路に変更
if
(
user
)
{
if
(
user
)
{
message
.
profileImagePath
=
CHAT
.
getProfileImgUrl
(
user
.
profileImagePath
)
message
.
profileImagePath
=
CHAT
.
getProfileImgUrl
(
user
.
profileImagePath
)
}
else
{
}
else
{
message
.
profileImagePath
=
CHAT
.
getProfileImgUrl
(
""
)
message
.
profileImagePath
=
CHAT
.
getProfileImgUrl
(
""
)
...
@@ -286,7 +286,7 @@ function setSocketAction () {
...
@@ -286,7 +286,7 @@ function setSocketAction () {
$
(
'#users'
).
data
(
users
);
$
(
'#users'
).
data
(
users
);
}
else
{
}
else
{
const
data
=
$
(
'#users'
).
data
();
const
data
=
$
(
'#users'
).
data
();
if
(
data
&&
Object
.
keys
(
data
).
length
>
0
){
if
(
data
&&
Object
.
keys
(
data
).
length
>
0
){
users
=
Object
.
keys
(
data
).
map
(
function
(
key
)
{
users
=
Object
.
keys
(
data
).
map
(
function
(
key
)
{
return
data
[
key
];
return
data
[
key
];
});
});
...
@@ -307,7 +307,7 @@ function setSocketAction () {
...
@@ -307,7 +307,7 @@ function setSocketAction () {
}));
}));
// ユーザーリストを入れる
// ユーザーリストを入れる
users
.
forEach
(
function
(
user
)
{
users
.
forEach
(
function
(
user
)
{
let
li
=
$
(
'<li/>'
);
let
li
=
$
(
'<li/>'
);
let
a
=
$
(
'<a/>'
).
text
(
user
);
let
a
=
$
(
'<a/>'
).
text
(
user
);
if
(
onlineUsers
.
includes
(
user
))
{
if
(
onlineUsers
.
includes
(
user
))
{
...
@@ -328,13 +328,13 @@ function setSocketAction () {
...
@@ -328,13 +328,13 @@ function setSocketAction () {
$
(
'#group_list'
).
append
(
'<center class="text-secondary">'
+
getLocalizedString
(
everyoneIsHere
)
+
'</center>'
);
$
(
'#group_list'
).
append
(
'<center class="text-secondary">'
+
getLocalizedString
(
everyoneIsHere
)
+
'</center>'
);
}
}
// グループ名と人数を表記する。
// グループ名と人数を表記する。
groups
.
forEach
(
function
(
group
)
{
groups
.
forEach
(
function
(
group
)
{
let
html
=
Mustache
.
render
(
template
,
{
let
html
=
Mustache
.
render
(
template
,
{
name
:
group
.
groupName
,
name
:
group
.
groupName
,
info
:
group
.
memberCnt
+
getLocalizedString
(
"people"
)
info
:
group
.
memberCnt
+
getLocalizedString
(
"people"
)
});
});
// グループをクリックすると、該当グループのユーザーリストを読み込むようにイベントを与える
// グループをクリックすると、該当グループのユーザーリストを読み込むようにイベントを与える
let
obj
=
$
(
jQuery
.
parseHTML
(
html
)).
on
(
'click'
,
function
()
{
let
obj
=
$
(
jQuery
.
parseHTML
(
html
)).
on
(
'click'
,
function
()
{
// loadingIndicatorを表示
// loadingIndicatorを表示
CHAT_UI
.
showLoadingIndicator
();
CHAT_UI
.
showLoadingIndicator
();
socket
.
emit
(
'getUserListInGroup'
,
group
.
groupId
,
isInvite
);
socket
.
emit
(
'getUserListInGroup'
,
group
.
groupId
,
isInvite
);
...
@@ -344,7 +344,7 @@ function setSocketAction () {
...
@@ -344,7 +344,7 @@ function setSocketAction () {
});
});
// Rotate
// Rotate
if
(
CHAT_UI
.
isLandscapeMode
())
{
if
(
CHAT_UI
.
isLandscapeMode
())
{
$
(
".group_list"
).
addClass
(
"col-6"
).
removeClass
(
"col-12"
);
$
(
".group_list"
).
addClass
(
"col-6"
).
removeClass
(
"col-12"
);
}
}
...
@@ -443,7 +443,7 @@ function setSocketAction () {
...
@@ -443,7 +443,7 @@ function setSocketAction () {
$
(
'.userCheckBox'
).
show
();
$
(
'.userCheckBox'
).
show
();
// Rotate
// Rotate
if
(
CHAT_UI
.
isLandscapeMode
())
{
if
(
CHAT_UI
.
isLandscapeMode
())
{
$
(
".user_list"
).
addClass
(
"col-6"
).
removeClass
(
"col-12"
);
$
(
".user_list"
).
addClass
(
"col-6"
).
removeClass
(
"col-12"
);
$
(
".squareBoxContent span"
).
addClass
(
"landscape_span"
);
$
(
".squareBoxContent span"
).
addClass
(
"landscape_span"
);
}
}
...
@@ -475,7 +475,7 @@ function setSocketAction () {
...
@@ -475,7 +475,7 @@ function setSocketAction () {
// #36174
// #36174
// #36215
// #36215
if
(
message
.
includes
(
"SC_FORBIDDEN"
))
if
(
message
.
includes
(
"SC_FORBIDDEN"
))
{
{
alert
(
'SC_FORBIDDEN'
);
alert
(
'SC_FORBIDDEN'
);
return
;
return
;
...
@@ -497,7 +497,7 @@ function setSocketAction () {
...
@@ -497,7 +497,7 @@ function setSocketAction () {
});
});
CHAT_UI
.
dismissLoadingIndicator
();
CHAT_UI
.
dismissLoadingIndicator
();
if
(
message
==
"Room not found"
){
if
(
message
==
"Room not found"
){
CHAT
.
saveRoomInfo
();
CHAT
.
saveRoomInfo
();
}
}
});
});
...
@@ -505,18 +505,18 @@ function setSocketAction () {
...
@@ -505,18 +505,18 @@ function setSocketAction () {
// server's request : user info (retry join)
// server's request : user info (retry join)
socket
.
on
(
"retryJoinProcess"
,
()
=>
{
socket
.
on
(
"retryJoinProcess"
,
()
=>
{
var
ua
=
window
.
navigator
.
userAgent
.
toLowerCase
();
var
ua
=
window
.
navigator
.
userAgent
.
toLowerCase
();
//if((ua.indexOf('iphone') > 0 || ua.indexOf('ipad') > 0) && ua.indexOf("safari") == -1) {
//if
((ua.indexOf('iphone') > 0 || ua.indexOf('ipad') > 0) && ua.indexOf("safari") == -1) {
if
(
CHAT_UTIL
.
isIOS
())
{
if
(
CHAT_UTIL
.
isIOS
())
{
// iosでの場合
// iosでの場合
webkit
.
messageHandlers
.
loginInfoRequestMessageHandlerId
.
postMessage
({});
webkit
.
messageHandlers
.
loginInfoRequestMessageHandlerId
.
postMessage
({});
// } else if(ua.indexOf('android') > 0 && ua.indexOf('linux') == -1){
// } else if
(ua.indexOf('android') > 0 && ua.indexOf('linux') == -1){
}
else
if
(
CHAT_UTIL
.
isAndroid
())
{
}
else
if
(
CHAT_UTIL
.
isAndroid
())
{
// androidでの場合
// androidでの場合
android
.
getLoginParameter
();
android
.
getLoginParameter
();
}
else
{
}
else
{
CHAT_UI
.
htmlElementTextInitialize
(
"ko"
)
CHAT_UI
.
htmlElementTextInitialize
(
"ko"
)
// webでのsocket connect
// webでのsocket connect
socket
.
emit
(
'join'
,
params
,
function
(
err
)
{
socket
.
emit
(
'join'
,
params
,
function
(
err
)
{
if
(
err
)
{
if
(
err
)
{
// #36174
// #36174
$
(
"#customAlertTitle"
).
text
(
err
);
$
(
"#customAlertTitle"
).
text
(
err
);
...
@@ -529,7 +529,7 @@ function setSocketAction () {
...
@@ -529,7 +529,7 @@ function setSocketAction () {
.
on
(
'click'
,
'#customAlertOk'
,
function
(
e
)
{
.
on
(
'click'
,
'#customAlertOk'
,
function
(
e
)
{
});
});
}
else
{
}
else
{
if
(
params
.
roomName
!=
undefined
)
{
if
(
params
.
roomName
!=
undefined
)
{
$
(
'.titleRoomName'
).
text
(
params
.
roomName
).
data
(
'roomName'
,
params
.
roomName
);
$
(
'.titleRoomName'
).
text
(
params
.
roomName
).
data
(
'roomName'
,
params
.
roomName
);
}
else
{
}
else
{
let
roomListTitle
=
getLocalizedString
(
"roomListTitle"
)
let
roomListTitle
=
getLocalizedString
(
"roomListTitle"
)
...
...
ABVJE_Launcher_Android/assets/chat/public/js/chat.js
View file @
a64b4d31
...
@@ -25,7 +25,7 @@ CHAT.saveRoomInfo = function(roomId, roomName) {
...
@@ -25,7 +25,7 @@ CHAT.saveRoomInfo = function(roomId, roomName) {
// #36170 画像パスが存在しない場合はデフォルトの画像を返す
// #36170 画像パスが存在しない場合はデフォルトの画像を返す
// 存在する場合はプロフィール画像取得用APIのURLを生成して返す
// 存在する場合はプロフィール画像取得用APIのURLを生成して返す
CHAT
.
getProfileImgUrl
=
function
(
path
)
{
CHAT
.
getProfileImgUrl
=
function
(
path
)
{
if
(
path
==
undefined
||
path
==
""
)
{
if
(
path
==
undefined
||
path
==
""
)
{
return
ASSET_PATH
+
'images/user-profile.png'
;
return
ASSET_PATH
+
'images/user-profile.png'
;
}
else
{
}
else
{
var
userInfo
=
path
.
split
(
"/"
).
reverse
();
var
userInfo
=
path
.
split
(
"/"
).
reverse
();
...
@@ -59,16 +59,16 @@ CHAT.createVideoThumbnailAndUpload = function(sourceImage, callback) {
...
@@ -59,16 +59,16 @@ CHAT.createVideoThumbnailAndUpload = function(sourceImage, callback) {
canvas
.
getContext
(
'2d'
).
drawImage
(
video
,
0
,
0
,
canvas
.
width
,
canvas
.
height
);
canvas
.
getContext
(
'2d'
).
drawImage
(
video
,
0
,
0
,
canvas
.
width
,
canvas
.
height
);
fetch
(
canvas
.
toDataURL
(
"image/jpeg"
))
fetch
(
canvas
.
toDataURL
(
"image/jpeg"
))
.
then
(
function
(
res
){
.
then
(
function
(
res
)
{
return
res
.
arrayBuffer
();
return
res
.
arrayBuffer
();
})
})
.
then
(
function
(
buf
){
.
then
(
function
(
buf
)
{
// 回転された画像をFormDataに保存
// 回転された画像をFormDataに保存
const
newFile
=
new
File
([
buf
],
sourceImage
.
name
,
{
type
:
"image/jpeg"
});
const
newFile
=
new
File
([
buf
],
sourceImage
.
name
,
{
type
:
"image/jpeg"
});
callback
(
newFile
,
true
);
callback
(
newFile
,
true
);
// ajax End
// ajax End
}).
catch
((
error
)
=>
{
// fetch Error catch Block
}).
catch
((
error
)
=>
{
// fetch Error catch Block
if
(
error
)
{
if
(
error
)
{
console
.
log
(
error
)
console
.
log
(
error
)
}
}
});
});
...
@@ -95,7 +95,7 @@ CHAT.uploadImage = function(formData) {
...
@@ -95,7 +95,7 @@ CHAT.uploadImage = function(formData) {
data
:
formData
,
data
:
formData
,
contentType
:
false
,
contentType
:
false
,
processData
:
false
processData
:
false
}).
done
(
function
(
res
)
{
}).
done
(
function
(
res
)
{
// 8
// 8
var
imgPath
=
CMS_SERVER_URL
+
'/file/getImage?fileName='
+
res
.
fileName
+
'&roomId='
+
CHAT
.
globalLoginParameter
.
roomId
;
var
imgPath
=
CMS_SERVER_URL
+
'/file/getImage?fileName='
+
res
.
fileName
+
'&roomId='
+
CHAT
.
globalLoginParameter
.
roomId
;
var
imageName
=
res
.
fileName
var
imageName
=
res
.
fileName
...
@@ -105,7 +105,7 @@ CHAT.uploadImage = function(formData) {
...
@@ -105,7 +105,7 @@ CHAT.uploadImage = function(formData) {
// 画像の処理
// 画像の処理
if
(
res
.
fileType
==
"jpeg"
||
res
.
fileType
==
"jpg"
||
res
.
fileType
==
"png"
)
{
if
(
res
.
fileType
==
"jpeg"
||
res
.
fileType
==
"jpg"
||
res
.
fileType
==
"png"
)
{
if
(
res
.
thumbnailPath
&&
res
.
thumbnailPath
.
length
>
0
)
{
if
(
res
.
thumbnailPath
&&
res
.
thumbnailPath
.
length
>
0
)
{
imgPath
=
CMS_SERVER_URL
+
'/file/getImage?fileName='
+
res
.
thumbImageFileName
+
'&roomId='
+
CHAT
.
globalLoginParameter
.
roomId
;
imgPath
=
CMS_SERVER_URL
+
'/file/getImage?fileName='
+
res
.
thumbImageFileName
+
'&roomId='
+
CHAT
.
globalLoginParameter
.
roomId
;
imageName
=
res
.
thumbImageFileName
;
imageName
=
res
.
thumbImageFileName
;
}
}
...
@@ -166,7 +166,7 @@ CHAT.uploadImage = function(formData) {
...
@@ -166,7 +166,7 @@ CHAT.uploadImage = function(formData) {
CHAT
.
createThumbnailAndUpload
=
function
(
sourceImage
,
callback
)
{
CHAT
.
createThumbnailAndUpload
=
function
(
sourceImage
,
callback
)
{
const
fileReader
=
new
FileReader
();
const
fileReader
=
new
FileReader
();
const
img
=
new
Image
();
const
img
=
new
Image
();
fileReader
.
onloadend
=
function
(){
fileReader
.
onloadend
=
function
()
{
img
.
src
=
fileReader
.
result
img
.
src
=
fileReader
.
result
}
}
...
@@ -175,13 +175,13 @@ CHAT.createThumbnailAndUpload = function(sourceImage, callback) {
...
@@ -175,13 +175,13 @@ CHAT.createThumbnailAndUpload = function(sourceImage, callback) {
var
rate
var
rate
var
width
=
img
.
width
var
width
=
img
.
width
var
height
=
img
.
height
var
height
=
img
.
height
if
((
img
.
width
<=
500
)
&&
(
img
.
height
<=
500
))
if
((
img
.
width
<=
500
)
&&
(
img
.
height
<=
500
))
{
{
callback
(
undefined
,
false
)
callback
(
undefined
,
false
)
return
return
}
}
if
(
img
.
width
>
img
.
height
)
if
(
img
.
width
>
img
.
height
)
{
{
rate
=
500
/
img
.
width
rate
=
500
/
img
.
width
}
else
{
}
else
{
...
@@ -196,16 +196,16 @@ CHAT.createThumbnailAndUpload = function(sourceImage, callback) {
...
@@ -196,16 +196,16 @@ CHAT.createThumbnailAndUpload = function(sourceImage, callback) {
// ctx.drawImage(img, 0, 0, width, height);
// ctx.drawImage(img, 0, 0, width, height);
fetch
(
elem
.
toDataURL
(
"image/jpeg"
))
fetch
(
elem
.
toDataURL
(
"image/jpeg"
))
.
then
(
function
(
res
){
.
then
(
function
(
res
)
{
return
res
.
arrayBuffer
();
return
res
.
arrayBuffer
();
})
})
.
then
(
function
(
buf
){
.
then
(
function
(
buf
)
{
const
newFile
=
new
File
([
buf
],
sourceImage
.
name
,
{
type
:
"image/jpeg"
});
const
newFile
=
new
File
([
buf
],
sourceImage
.
name
,
{
type
:
"image/jpeg"
});
callback
(
newFile
,
true
)
callback
(
newFile
,
true
)
}).
catch
((
error
)
=>
{
// fetch Error catch Block
}).
catch
((
error
)
=>
{
// fetch Error catch Block
if
(
error
)
{
if
(
error
)
{
console
.
log
(
error
)
console
.
log
(
error
)
}
}
});
});
...
@@ -225,13 +225,13 @@ getLoginParameter = function(sid, loginId, shopName, roomId = undefined, roomNam
...
@@ -225,13 +225,13 @@ getLoginParameter = function(sid, loginId, shopName, roomId = undefined, roomNam
CHAT
.
globalLoginParameter
=
loginParam
;
CHAT
.
globalLoginParameter
=
loginParam
;
if
(
!
languageCode
)
{
if
(
!
languageCode
)
{
languageCode
=
"en"
languageCode
=
"en"
}
}
CHAT_UI
.
htmlElementTextInitialize
(
languageCode
)
CHAT_UI
.
htmlElementTextInitialize
(
languageCode
)
if
(
IS_ONLINE
==
'true'
)
{
if
(
IS_ONLINE
==
'true'
)
{
socket
.
emit
(
'join'
,
loginParam
,
function
(
err
)
{
socket
.
emit
(
'join'
,
loginParam
,
function
(
err
)
{
if
(
err
)
{
if
(
err
)
{
// #36174
// #36174
$
(
"#customAlertTitle"
).
text
(
err
);
$
(
"#customAlertTitle"
).
text
(
err
);
...
...
ABVJE_Launcher_Android/assets/chat/public/socket.io/lib/manager.js
View file @
a64b4d31
...
@@ -75,7 +75,7 @@ function Manager (uri, opts) {
...
@@ -75,7 +75,7 @@ function Manager (uri, opts) {
* @api private
* @api private
*/
*/
Manager
.
prototype
.
emitAll
=
function
()
{
Manager
.
prototype
.
emitAll
=
function
()
{
this
.
emit
.
apply
(
this
,
arguments
);
this
.
emit
.
apply
(
this
,
arguments
);
for
(
var
nsp
in
this
.
nsps
)
{
for
(
var
nsp
in
this
.
nsps
)
{
if
(
has
.
call
(
this
.
nsps
,
nsp
))
{
if
(
has
.
call
(
this
.
nsps
,
nsp
))
{
...
@@ -90,7 +90,7 @@ Manager.prototype.emitAll = function () {
...
@@ -90,7 +90,7 @@ Manager.prototype.emitAll = function () {
* @api private
* @api private
*/
*/
Manager
.
prototype
.
updateSocketIds
=
function
()
{
Manager
.
prototype
.
updateSocketIds
=
function
()
{
for
(
var
nsp
in
this
.
nsps
)
{
for
(
var
nsp
in
this
.
nsps
)
{
if
(
has
.
call
(
this
.
nsps
,
nsp
))
{
if
(
has
.
call
(
this
.
nsps
,
nsp
))
{
this
.
nsps
[
nsp
].
id
=
this
.
generateId
(
nsp
);
this
.
nsps
[
nsp
].
id
=
this
.
generateId
(
nsp
);
...
@@ -106,7 +106,7 @@ Manager.prototype.updateSocketIds = function () {
...
@@ -106,7 +106,7 @@ Manager.prototype.updateSocketIds = function () {
* @api private
* @api private
*/
*/
Manager
.
prototype
.
generateId
=
function
(
nsp
)
{
Manager
.
prototype
.
generateId
=
function
(
nsp
)
{
return
(
nsp
===
'/'
?
''
:
(
nsp
+
'#'
))
+
this
.
engine
.
id
;
return
(
nsp
===
'/'
?
''
:
(
nsp
+
'#'
))
+
this
.
engine
.
id
;
};
};
...
@@ -124,7 +124,7 @@ Emitter(Manager.prototype);
...
@@ -124,7 +124,7 @@ Emitter(Manager.prototype);
* @api public
* @api public
*/
*/
Manager
.
prototype
.
reconnection
=
function
(
v
)
{
Manager
.
prototype
.
reconnection
=
function
(
v
)
{
if
(
!
arguments
.
length
)
return
this
.
_reconnection
;
if
(
!
arguments
.
length
)
return
this
.
_reconnection
;
this
.
_reconnection
=
!!
v
;
this
.
_reconnection
=
!!
v
;
return
this
;
return
this
;
...
@@ -138,7 +138,7 @@ Manager.prototype.reconnection = function (v) {
...
@@ -138,7 +138,7 @@ Manager.prototype.reconnection = function (v) {
* @api public
* @api public
*/
*/
Manager
.
prototype
.
reconnectionAttempts
=
function
(
v
)
{
Manager
.
prototype
.
reconnectionAttempts
=
function
(
v
)
{
if
(
!
arguments
.
length
)
return
this
.
_reconnectionAttempts
;
if
(
!
arguments
.
length
)
return
this
.
_reconnectionAttempts
;
this
.
_reconnectionAttempts
=
v
;
this
.
_reconnectionAttempts
=
v
;
return
this
;
return
this
;
...
@@ -152,14 +152,14 @@ Manager.prototype.reconnectionAttempts = function (v) {
...
@@ -152,14 +152,14 @@ Manager.prototype.reconnectionAttempts = function (v) {
* @api public
* @api public
*/
*/
Manager
.
prototype
.
reconnectionDelay
=
function
(
v
)
{
Manager
.
prototype
.
reconnectionDelay
=
function
(
v
)
{
if
(
!
arguments
.
length
)
return
this
.
_reconnectionDelay
;
if
(
!
arguments
.
length
)
return
this
.
_reconnectionDelay
;
this
.
_reconnectionDelay
=
v
;
this
.
_reconnectionDelay
=
v
;
this
.
backoff
&&
this
.
backoff
.
setMin
(
v
);
this
.
backoff
&&
this
.
backoff
.
setMin
(
v
);
return
this
;
return
this
;
};
};
Manager
.
prototype
.
randomizationFactor
=
function
(
v
)
{
Manager
.
prototype
.
randomizationFactor
=
function
(
v
)
{
if
(
!
arguments
.
length
)
return
this
.
_randomizationFactor
;
if
(
!
arguments
.
length
)
return
this
.
_randomizationFactor
;
this
.
_randomizationFactor
=
v
;
this
.
_randomizationFactor
=
v
;
this
.
backoff
&&
this
.
backoff
.
setJitter
(
v
);
this
.
backoff
&&
this
.
backoff
.
setJitter
(
v
);
...
@@ -174,7 +174,7 @@ Manager.prototype.randomizationFactor = function (v) {
...
@@ -174,7 +174,7 @@ Manager.prototype.randomizationFactor = function (v) {
* @api public
* @api public
*/
*/
Manager
.
prototype
.
reconnectionDelayMax
=
function
(
v
)
{
Manager
.
prototype
.
reconnectionDelayMax
=
function
(
v
)
{
if
(
!
arguments
.
length
)
return
this
.
_reconnectionDelayMax
;
if
(
!
arguments
.
length
)
return
this
.
_reconnectionDelayMax
;
this
.
_reconnectionDelayMax
=
v
;
this
.
_reconnectionDelayMax
=
v
;
this
.
backoff
&&
this
.
backoff
.
setMax
(
v
);
this
.
backoff
&&
this
.
backoff
.
setMax
(
v
);
...
@@ -188,7 +188,7 @@ Manager.prototype.reconnectionDelayMax = function (v) {
...
@@ -188,7 +188,7 @@ Manager.prototype.reconnectionDelayMax = function (v) {
* @api public
* @api public
*/
*/
Manager
.
prototype
.
timeout
=
function
(
v
)
{
Manager
.
prototype
.
timeout
=
function
(
v
)
{
if
(
!
arguments
.
length
)
return
this
.
_timeout
;
if
(
!
arguments
.
length
)
return
this
.
_timeout
;
this
.
_timeout
=
v
;
this
.
_timeout
=
v
;
return
this
;
return
this
;
...
@@ -201,7 +201,7 @@ Manager.prototype.timeout = function (v) {
...
@@ -201,7 +201,7 @@ Manager.prototype.timeout = function (v) {
* @api private
* @api private
*/
*/
Manager
.
prototype
.
maybeReconnectOnOpen
=
function
()
{
Manager
.
prototype
.
maybeReconnectOnOpen
=
function
()
{
// Only try to reconnect if it's the first time we're connecting
// Only try to reconnect if it's the first time we're connecting
if
(
!
this
.
reconnecting
&&
this
.
_reconnection
&&
this
.
backoff
.
attempts
===
0
)
{
if
(
!
this
.
reconnecting
&&
this
.
_reconnection
&&
this
.
backoff
.
attempts
===
0
)
{
// keeps reconnection from firing twice for the same reconnection loop
// keeps reconnection from firing twice for the same reconnection loop
...
@@ -218,7 +218,7 @@ Manager.prototype.maybeReconnectOnOpen = function () {
...
@@ -218,7 +218,7 @@ Manager.prototype.maybeReconnectOnOpen = function () {
*/
*/
Manager
.
prototype
.
open
=
Manager
.
prototype
.
open
=
Manager
.
prototype
.
connect
=
function
(
fn
,
opts
)
{
Manager
.
prototype
.
connect
=
function
(
fn
,
opts
)
{
debug
(
'readyState %s'
,
this
.
readyState
);
debug
(
'readyState %s'
,
this
.
readyState
);
if
(
~
this
.
readyState
.
indexOf
(
'open'
))
return
this
;
if
(
~
this
.
readyState
.
indexOf
(
'open'
))
return
this
;
...
@@ -230,13 +230,13 @@ Manager.prototype.connect = function (fn, opts) {
...
@@ -230,13 +230,13 @@ Manager.prototype.connect = function (fn, opts) {
this
.
skipReconnect
=
false
;
this
.
skipReconnect
=
false
;
// emit `open`
// emit `open`
var
openSub
=
on
(
socket
,
'open'
,
function
()
{
var
openSub
=
on
(
socket
,
'open'
,
function
()
{
self
.
onopen
();
self
.
onopen
();
fn
&&
fn
();
fn
&&
fn
();
});
});
// emit `connect_error`
// emit `connect_error`
var
errorSub
=
on
(
socket
,
'error'
,
function
(
data
)
{
var
errorSub
=
on
(
socket
,
'error'
,
function
(
data
)
{
debug
(
'connect_error'
);
debug
(
'connect_error'
);
self
.
cleanup
();
self
.
cleanup
();
self
.
readyState
=
'closed'
;
self
.
readyState
=
'closed'
;
...
@@ -257,7 +257,7 @@ Manager.prototype.connect = function (fn, opts) {
...
@@ -257,7 +257,7 @@ Manager.prototype.connect = function (fn, opts) {
debug
(
'connect attempt will timeout after %d'
,
timeout
);
debug
(
'connect attempt will timeout after %d'
,
timeout
);
// set timer
// set timer
var
timer
=
setTimeout
(
function
()
{
var
timer
=
setTimeout
(
function
()
{
debug
(
'connect attempt timed out after %d'
,
timeout
);
debug
(
'connect attempt timed out after %d'
,
timeout
);
openSub
.
destroy
();
openSub
.
destroy
();
socket
.
close
();
socket
.
close
();
...
@@ -266,7 +266,7 @@ Manager.prototype.connect = function (fn, opts) {
...
@@ -266,7 +266,7 @@ Manager.prototype.connect = function (fn, opts) {
},
timeout
);
},
timeout
);
this
.
subs
.
push
({
this
.
subs
.
push
({
destroy
:
function
()
{
destroy
:
function
()
{
clearTimeout
(
timer
);
clearTimeout
(
timer
);
}
}
});
});
...
@@ -284,7 +284,7 @@ Manager.prototype.connect = function (fn, opts) {
...
@@ -284,7 +284,7 @@ Manager.prototype.connect = function (fn, opts) {
* @api private
* @api private
*/
*/
Manager
.
prototype
.
onopen
=
function
()
{
Manager
.
prototype
.
onopen
=
function
()
{
debug
(
'open'
);
debug
(
'open'
);
// clear old subs
// clear old subs
...
@@ -310,7 +310,7 @@ Manager.prototype.onopen = function () {
...
@@ -310,7 +310,7 @@ Manager.prototype.onopen = function () {
* @api private
* @api private
*/
*/
Manager
.
prototype
.
onping
=
function
()
{
Manager
.
prototype
.
onping
=
function
()
{
this
.
lastPing
=
new
Date
();
this
.
lastPing
=
new
Date
();
this
.
emitAll
(
'ping'
);
this
.
emitAll
(
'ping'
);
};
};
...
@@ -321,7 +321,7 @@ Manager.prototype.onping = function () {
...
@@ -321,7 +321,7 @@ Manager.prototype.onping = function () {
* @api private
* @api private
*/
*/
Manager
.
prototype
.
onpong
=
function
()
{
Manager
.
prototype
.
onpong
=
function
()
{
this
.
emitAll
(
'pong'
,
new
Date
()
-
this
.
lastPing
);
this
.
emitAll
(
'pong'
,
new
Date
()
-
this
.
lastPing
);
};
};
...
@@ -331,7 +331,7 @@ Manager.prototype.onpong = function () {
...
@@ -331,7 +331,7 @@ Manager.prototype.onpong = function () {
* @api private
* @api private
*/
*/
Manager
.
prototype
.
ondata
=
function
(
data
)
{
Manager
.
prototype
.
ondata
=
function
(
data
)
{
this
.
decoder
.
add
(
data
);
this
.
decoder
.
add
(
data
);
};
};
...
@@ -341,7 +341,7 @@ Manager.prototype.ondata = function (data) {
...
@@ -341,7 +341,7 @@ Manager.prototype.ondata = function (data) {
* @api private
* @api private
*/
*/
Manager
.
prototype
.
ondecoded
=
function
(
packet
)
{
Manager
.
prototype
.
ondecoded
=
function
(
packet
)
{
this
.
emit
(
'packet'
,
packet
);
this
.
emit
(
'packet'
,
packet
);
};
};
...
@@ -351,7 +351,7 @@ Manager.prototype.ondecoded = function (packet) {
...
@@ -351,7 +351,7 @@ Manager.prototype.ondecoded = function (packet) {
* @api private
* @api private
*/
*/
Manager
.
prototype
.
onerror
=
function
(
err
)
{
Manager
.
prototype
.
onerror
=
function
(
err
)
{
debug
(
'error'
,
err
);
debug
(
'error'
,
err
);
this
.
emitAll
(
'error'
,
err
);
this
.
emitAll
(
'error'
,
err
);
};
};
...
@@ -363,14 +363,14 @@ Manager.prototype.onerror = function (err) {
...
@@ -363,14 +363,14 @@ Manager.prototype.onerror = function (err) {
* @api public
* @api public
*/
*/
Manager
.
prototype
.
socket
=
function
(
nsp
,
opts
)
{
Manager
.
prototype
.
socket
=
function
(
nsp
,
opts
)
{
var
socket
=
this
.
nsps
[
nsp
];
var
socket
=
this
.
nsps
[
nsp
];
if
(
!
socket
)
{
if
(
!
socket
)
{
socket
=
new
Socket
(
this
,
nsp
,
opts
);
socket
=
new
Socket
(
this
,
nsp
,
opts
);
this
.
nsps
[
nsp
]
=
socket
;
this
.
nsps
[
nsp
]
=
socket
;
var
self
=
this
;
var
self
=
this
;
socket
.
on
(
'connecting'
,
onConnecting
);
socket
.
on
(
'connecting'
,
onConnecting
);
socket
.
on
(
'connect'
,
function
()
{
socket
.
on
(
'connect'
,
function
()
{
socket
.
id
=
self
.
generateId
(
nsp
);
socket
.
id
=
self
.
generateId
(
nsp
);
});
});
...
@@ -395,7 +395,7 @@ Manager.prototype.socket = function (nsp, opts) {
...
@@ -395,7 +395,7 @@ Manager.prototype.socket = function (nsp, opts) {
* @param {Socket} socket
* @param {Socket} socket
*/
*/
Manager
.
prototype
.
destroy
=
function
(
socket
)
{
Manager
.
prototype
.
destroy
=
function
(
socket
)
{
var
index
=
indexOf
(
this
.
connecting
,
socket
);
var
index
=
indexOf
(
this
.
connecting
,
socket
);
if
(
~
index
)
this
.
connecting
.
splice
(
index
,
1
);
if
(
~
index
)
this
.
connecting
.
splice
(
index
,
1
);
if
(
this
.
connecting
.
length
)
return
;
if
(
this
.
connecting
.
length
)
return
;
...
@@ -410,7 +410,7 @@ Manager.prototype.destroy = function (socket) {
...
@@ -410,7 +410,7 @@ Manager.prototype.destroy = function (socket) {
* @api private
* @api private
*/
*/
Manager
.
prototype
.
packet
=
function
(
packet
)
{
Manager
.
prototype
.
packet
=
function
(
packet
)
{
debug
(
'writing packet %j'
,
packet
);
debug
(
'writing packet %j'
,
packet
);
var
self
=
this
;
var
self
=
this
;
if
(
packet
.
query
&&
packet
.
type
===
0
)
packet
.
nsp
+=
'?'
+
packet
.
query
;
if
(
packet
.
query
&&
packet
.
type
===
0
)
packet
.
nsp
+=
'?'
+
packet
.
query
;
...
@@ -418,7 +418,7 @@ Manager.prototype.packet = function (packet) {
...
@@ -418,7 +418,7 @@ Manager.prototype.packet = function (packet) {
if
(
!
self
.
encoding
)
{
if
(
!
self
.
encoding
)
{
// encode, then write to engine with result
// encode, then write to engine with result
self
.
encoding
=
true
;
self
.
encoding
=
true
;
this
.
encoder
.
encode
(
packet
,
function
(
encodedPackets
)
{
this
.
encoder
.
encode
(
packet
,
function
(
encodedPackets
)
{
for
(
var
i
=
0
;
i
<
encodedPackets
.
length
;
i
++
)
{
for
(
var
i
=
0
;
i
<
encodedPackets
.
length
;
i
++
)
{
self
.
engine
.
write
(
encodedPackets
[
i
],
packet
.
options
);
self
.
engine
.
write
(
encodedPackets
[
i
],
packet
.
options
);
}
}
...
@@ -437,7 +437,7 @@ Manager.prototype.packet = function (packet) {
...
@@ -437,7 +437,7 @@ Manager.prototype.packet = function (packet) {
* @api private
* @api private
*/
*/
Manager
.
prototype
.
processPacketQueue
=
function
()
{
Manager
.
prototype
.
processPacketQueue
=
function
()
{
if
(
this
.
packetBuffer
.
length
>
0
&&
!
this
.
encoding
)
{
if
(
this
.
packetBuffer
.
length
>
0
&&
!
this
.
encoding
)
{
var
pack
=
this
.
packetBuffer
.
shift
();
var
pack
=
this
.
packetBuffer
.
shift
();
this
.
packet
(
pack
);
this
.
packet
(
pack
);
...
@@ -450,7 +450,7 @@ Manager.prototype.processPacketQueue = function () {
...
@@ -450,7 +450,7 @@ Manager.prototype.processPacketQueue = function () {
* @api private
* @api private
*/
*/
Manager
.
prototype
.
cleanup
=
function
()
{
Manager
.
prototype
.
cleanup
=
function
()
{
debug
(
'cleanup'
);
debug
(
'cleanup'
);
var
subsLength
=
this
.
subs
.
length
;
var
subsLength
=
this
.
subs
.
length
;
...
@@ -473,7 +473,7 @@ Manager.prototype.cleanup = function () {
...
@@ -473,7 +473,7 @@ Manager.prototype.cleanup = function () {
*/
*/
Manager
.
prototype
.
close
=
Manager
.
prototype
.
close
=
Manager
.
prototype
.
disconnect
=
function
()
{
Manager
.
prototype
.
disconnect
=
function
()
{
debug
(
'disconnect'
);
debug
(
'disconnect'
);
this
.
skipReconnect
=
true
;
this
.
skipReconnect
=
true
;
this
.
reconnecting
=
false
;
this
.
reconnecting
=
false
;
...
@@ -493,7 +493,7 @@ Manager.prototype.disconnect = function () {
...
@@ -493,7 +493,7 @@ Manager.prototype.disconnect = function () {
* @api private
* @api private
*/
*/
Manager
.
prototype
.
onclose
=
function
(
reason
)
{
Manager
.
prototype
.
onclose
=
function
(
reason
)
{
debug
(
'onclose'
);
debug
(
'onclose'
);
this
.
cleanup
();
this
.
cleanup
();
...
@@ -512,7 +512,7 @@ Manager.prototype.onclose = function (reason) {
...
@@ -512,7 +512,7 @@ Manager.prototype.onclose = function (reason) {
* @api private
* @api private
*/
*/
Manager
.
prototype
.
reconnect
=
function
()
{
Manager
.
prototype
.
reconnect
=
function
()
{
if
(
this
.
reconnecting
||
this
.
skipReconnect
)
return
this
;
if
(
this
.
reconnecting
||
this
.
skipReconnect
)
return
this
;
var
self
=
this
;
var
self
=
this
;
...
@@ -527,7 +527,7 @@ Manager.prototype.reconnect = function () {
...
@@ -527,7 +527,7 @@ Manager.prototype.reconnect = function () {
debug
(
'will wait %dms before reconnect attempt'
,
delay
);
debug
(
'will wait %dms before reconnect attempt'
,
delay
);
this
.
reconnecting
=
true
;
this
.
reconnecting
=
true
;
var
timer
=
setTimeout
(
function
()
{
var
timer
=
setTimeout
(
function
()
{
if
(
self
.
skipReconnect
)
return
;
if
(
self
.
skipReconnect
)
return
;
debug
(
'attempting reconnect'
);
debug
(
'attempting reconnect'
);
...
@@ -537,7 +537,7 @@ Manager.prototype.reconnect = function () {
...
@@ -537,7 +537,7 @@ Manager.prototype.reconnect = function () {
// check again for the case socket closed in above events
// check again for the case socket closed in above events
if
(
self
.
skipReconnect
)
return
;
if
(
self
.
skipReconnect
)
return
;
self
.
open
(
function
(
err
)
{
self
.
open
(
function
(
err
)
{
if
(
err
)
{
if
(
err
)
{
debug
(
'reconnect attempt error'
);
debug
(
'reconnect attempt error'
);
self
.
reconnecting
=
false
;
self
.
reconnecting
=
false
;
...
@@ -551,7 +551,7 @@ Manager.prototype.reconnect = function () {
...
@@ -551,7 +551,7 @@ Manager.prototype.reconnect = function () {
},
delay
);
},
delay
);
this
.
subs
.
push
({
this
.
subs
.
push
({
destroy
:
function
()
{
destroy
:
function
()
{
clearTimeout
(
timer
);
clearTimeout
(
timer
);
}
}
});
});
...
@@ -564,7 +564,7 @@ Manager.prototype.reconnect = function () {
...
@@ -564,7 +564,7 @@ Manager.prototype.reconnect = function () {
* @api private
* @api private
*/
*/
Manager
.
prototype
.
onreconnect
=
function
()
{
Manager
.
prototype
.
onreconnect
=
function
()
{
var
attempt
=
this
.
backoff
.
attempts
;
var
attempt
=
this
.
backoff
.
attempts
;
this
.
reconnecting
=
false
;
this
.
reconnecting
=
false
;
this
.
backoff
.
reset
();
this
.
backoff
.
reset
();
...
...
ABVJE_Launcher_Android/assets/chat/public/socket.io/lib/on.js
View file @
a64b4d31
...
@@ -14,10 +14,10 @@ module.exports = on;
...
@@ -14,10 +14,10 @@ module.exports = on;
* @api public
* @api public
*/
*/
function
on
(
obj
,
ev
,
fn
)
{
function
on
(
obj
,
ev
,
fn
)
{
obj
.
on
(
ev
,
fn
);
obj
.
on
(
ev
,
fn
);
return
{
return
{
destroy
:
function
()
{
destroy
:
function
()
{
obj
.
removeListener
(
ev
,
fn
);
obj
.
removeListener
(
ev
,
fn
);
}
}
};
};
...
...
ABVJE_Launcher_Android/assets/chat/public/socket.io/lib/socket.js
View file @
a64b4d31
...
@@ -53,7 +53,7 @@ var emit = Emitter.prototype.emit;
...
@@ -53,7 +53,7 @@ var emit = Emitter.prototype.emit;
* @api public
* @api public
*/
*/
function
Socket
(
io
,
nsp
,
opts
)
{
function
Socket
(
io
,
nsp
,
opts
)
{
this
.
io
=
io
;
this
.
io
=
io
;
this
.
nsp
=
nsp
;
this
.
nsp
=
nsp
;
this
.
json
=
this
;
// compat
this
.
json
=
this
;
// compat
...
@@ -82,7 +82,7 @@ Emitter(Socket.prototype);
...
@@ -82,7 +82,7 @@ Emitter(Socket.prototype);
* @api private
* @api private
*/
*/
Socket
.
prototype
.
subEvents
=
function
()
{
Socket
.
prototype
.
subEvents
=
function
()
{
if
(
this
.
subs
)
return
;
if
(
this
.
subs
)
return
;
var
io
=
this
.
io
;
var
io
=
this
.
io
;
...
@@ -100,7 +100,7 @@ Socket.prototype.subEvents = function () {
...
@@ -100,7 +100,7 @@ Socket.prototype.subEvents = function () {
*/
*/
Socket
.
prototype
.
open
=
Socket
.
prototype
.
open
=
Socket
.
prototype
.
connect
=
function
()
{
Socket
.
prototype
.
connect
=
function
()
{
if
(
this
.
connected
)
return
this
;
if
(
this
.
connected
)
return
this
;
this
.
subEvents
();
this
.
subEvents
();
...
@@ -117,7 +117,7 @@ Socket.prototype.connect = function () {
...
@@ -117,7 +117,7 @@ Socket.prototype.connect = function () {
* @api public
* @api public
*/
*/
Socket
.
prototype
.
send
=
function
()
{
Socket
.
prototype
.
send
=
function
()
{
var
args
=
toArray
(
arguments
);
var
args
=
toArray
(
arguments
);
args
.
unshift
(
'message'
);
args
.
unshift
(
'message'
);
this
.
emit
.
apply
(
this
,
args
);
this
.
emit
.
apply
(
this
,
args
);
...
@@ -133,7 +133,7 @@ Socket.prototype.send = function () {
...
@@ -133,7 +133,7 @@ Socket.prototype.send = function () {
* @api public
* @api public
*/
*/
Socket
.
prototype
.
emit
=
function
(
ev
)
{
Socket
.
prototype
.
emit
=
function
(
ev
)
{
if
(
events
.
hasOwnProperty
(
ev
))
{
if
(
events
.
hasOwnProperty
(
ev
))
{
emit
.
apply
(
this
,
arguments
);
emit
.
apply
(
this
,
arguments
);
return
this
;
return
this
;
...
@@ -173,7 +173,7 @@ Socket.prototype.emit = function (ev) {
...
@@ -173,7 +173,7 @@ Socket.prototype.emit = function (ev) {
* @api private
* @api private
*/
*/
Socket
.
prototype
.
packet
=
function
(
packet
)
{
Socket
.
prototype
.
packet
=
function
(
packet
)
{
packet
.
nsp
=
this
.
nsp
;
packet
.
nsp
=
this
.
nsp
;
this
.
io
.
packet
(
packet
);
this
.
io
.
packet
(
packet
);
};
};
...
@@ -184,7 +184,7 @@ Socket.prototype.packet = function (packet) {
...
@@ -184,7 +184,7 @@ Socket.prototype.packet = function (packet) {
* @api private
* @api private
*/
*/
Socket
.
prototype
.
onopen
=
function
()
{
Socket
.
prototype
.
onopen
=
function
()
{
debug
(
'transport is open - connecting'
);
debug
(
'transport is open - connecting'
);
// write connect packet if necessary
// write connect packet if necessary
...
@@ -206,7 +206,7 @@ Socket.prototype.onopen = function () {
...
@@ -206,7 +206,7 @@ Socket.prototype.onopen = function () {
* @api private
* @api private
*/
*/
Socket
.
prototype
.
onclose
=
function
(
reason
)
{
Socket
.
prototype
.
onclose
=
function
(
reason
)
{
debug
(
'close (%s)'
,
reason
);
debug
(
'close (%s)'
,
reason
);
this
.
connected
=
false
;
this
.
connected
=
false
;
this
.
disconnected
=
true
;
this
.
disconnected
=
true
;
...
@@ -221,7 +221,7 @@ Socket.prototype.onclose = function (reason) {
...
@@ -221,7 +221,7 @@ Socket.prototype.onclose = function (reason) {
* @api private
* @api private
*/
*/
Socket
.
prototype
.
onpacket
=
function
(
packet
)
{
Socket
.
prototype
.
onpacket
=
function
(
packet
)
{
var
sameNamespace
=
packet
.
nsp
===
this
.
nsp
;
var
sameNamespace
=
packet
.
nsp
===
this
.
nsp
;
var
rootNamespaceError
=
packet
.
type
===
parser
.
ERROR
&&
packet
.
nsp
===
'/'
;
var
rootNamespaceError
=
packet
.
type
===
parser
.
ERROR
&&
packet
.
nsp
===
'/'
;
...
@@ -265,7 +265,7 @@ Socket.prototype.onpacket = function (packet) {
...
@@ -265,7 +265,7 @@ Socket.prototype.onpacket = function (packet) {
* @api private
* @api private
*/
*/
Socket
.
prototype
.
onevent
=
function
(
packet
)
{
Socket
.
prototype
.
onevent
=
function
(
packet
)
{
var
args
=
packet
.
data
||
[];
var
args
=
packet
.
data
||
[];
debug
(
'emitting event %j'
,
args
);
debug
(
'emitting event %j'
,
args
);
...
@@ -287,7 +287,7 @@ Socket.prototype.onevent = function (packet) {
...
@@ -287,7 +287,7 @@ Socket.prototype.onevent = function (packet) {
* @api private
* @api private
*/
*/
Socket
.
prototype
.
ack
=
function
(
id
)
{
Socket
.
prototype
.
ack
=
function
(
id
)
{
var
self
=
this
;
var
self
=
this
;
var
sent
=
false
;
var
sent
=
false
;
return
function
()
{
return
function
()
{
...
@@ -312,7 +312,7 @@ Socket.prototype.ack = function (id) {
...
@@ -312,7 +312,7 @@ Socket.prototype.ack = function (id) {
* @api private
* @api private
*/
*/
Socket
.
prototype
.
onack
=
function
(
packet
)
{
Socket
.
prototype
.
onack
=
function
(
packet
)
{
var
ack
=
this
.
acks
[
packet
.
id
];
var
ack
=
this
.
acks
[
packet
.
id
];
if
(
'function'
===
typeof
ack
)
{
if
(
'function'
===
typeof
ack
)
{
debug
(
'calling ack %s with %j'
,
packet
.
id
,
packet
.
data
);
debug
(
'calling ack %s with %j'
,
packet
.
id
,
packet
.
data
);
...
@@ -329,7 +329,7 @@ Socket.prototype.onack = function (packet) {
...
@@ -329,7 +329,7 @@ Socket.prototype.onack = function (packet) {
* @api private
* @api private
*/
*/
Socket
.
prototype
.
onconnect
=
function
()
{
Socket
.
prototype
.
onconnect
=
function
()
{
this
.
connected
=
true
;
this
.
connected
=
true
;
this
.
disconnected
=
false
;
this
.
disconnected
=
false
;
this
.
emit
(
'connect'
);
this
.
emit
(
'connect'
);
...
@@ -342,7 +342,7 @@ Socket.prototype.onconnect = function () {
...
@@ -342,7 +342,7 @@ Socket.prototype.onconnect = function () {
* @api private
* @api private
*/
*/
Socket
.
prototype
.
emitBuffered
=
function
()
{
Socket
.
prototype
.
emitBuffered
=
function
()
{
var
i
;
var
i
;
for
(
i
=
0
;
i
<
this
.
receiveBuffer
.
length
;
i
++
)
{
for
(
i
=
0
;
i
<
this
.
receiveBuffer
.
length
;
i
++
)
{
emit
.
apply
(
this
,
this
.
receiveBuffer
[
i
]);
emit
.
apply
(
this
,
this
.
receiveBuffer
[
i
]);
...
@@ -361,7 +361,7 @@ Socket.prototype.emitBuffered = function () {
...
@@ -361,7 +361,7 @@ Socket.prototype.emitBuffered = function () {
* @api private
* @api private
*/
*/
Socket
.
prototype
.
ondisconnect
=
function
()
{
Socket
.
prototype
.
ondisconnect
=
function
()
{
debug
(
'server disconnect (%s)'
,
this
.
nsp
);
debug
(
'server disconnect (%s)'
,
this
.
nsp
);
this
.
destroy
();
this
.
destroy
();
this
.
onclose
(
'io server disconnect'
);
this
.
onclose
(
'io server disconnect'
);
...
@@ -375,7 +375,7 @@ Socket.prototype.ondisconnect = function () {
...
@@ -375,7 +375,7 @@ Socket.prototype.ondisconnect = function () {
* @api private.
* @api private.
*/
*/
Socket
.
prototype
.
destroy
=
function
()
{
Socket
.
prototype
.
destroy
=
function
()
{
if
(
this
.
subs
)
{
if
(
this
.
subs
)
{
// clean subscriptions to avoid reconnections
// clean subscriptions to avoid reconnections
for
(
var
i
=
0
;
i
<
this
.
subs
.
length
;
i
++
)
{
for
(
var
i
=
0
;
i
<
this
.
subs
.
length
;
i
++
)
{
...
@@ -395,7 +395,7 @@ Socket.prototype.destroy = function () {
...
@@ -395,7 +395,7 @@ Socket.prototype.destroy = function () {
*/
*/
Socket
.
prototype
.
close
=
Socket
.
prototype
.
close
=
Socket
.
prototype
.
disconnect
=
function
()
{
Socket
.
prototype
.
disconnect
=
function
()
{
if
(
this
.
connected
)
{
if
(
this
.
connected
)
{
debug
(
'performing disconnect (%s)'
,
this
.
nsp
);
debug
(
'performing disconnect (%s)'
,
this
.
nsp
);
this
.
packet
({
type
:
parser
.
DISCONNECT
});
this
.
packet
({
type
:
parser
.
DISCONNECT
});
...
@@ -419,7 +419,7 @@ Socket.prototype.disconnect = function () {
...
@@ -419,7 +419,7 @@ Socket.prototype.disconnect = function () {
* @api public
* @api public
*/
*/
Socket
.
prototype
.
compress
=
function
(
compress
)
{
Socket
.
prototype
.
compress
=
function
(
compress
)
{
this
.
flags
.
compress
=
compress
;
this
.
flags
.
compress
=
compress
;
return
this
;
return
this
;
};
};
...
@@ -432,7 +432,7 @@ Socket.prototype.compress = function (compress) {
...
@@ -432,7 +432,7 @@ Socket.prototype.compress = function (compress) {
* @api public
* @api public
*/
*/
Socket
.
prototype
.
binary
=
function
(
binary
)
{
Socket
.
prototype
.
binary
=
function
(
binary
)
{
this
.
flags
.
binary
=
binary
;
this
.
flags
.
binary
=
binary
;
return
this
;
return
this
;
};
};
ABVJE_Launcher_Android/build.gradle
View file @
a64b4d31
...
@@ -89,7 +89,7 @@ android {
...
@@ -89,7 +89,7 @@ android {
armv7
{
armv7
{
versionCode
defaultConfig
.
versionCode
versionCode
defaultConfig
.
versionCode
ndk
{
ndk
{
abiFilters
"armeabi-v7a"
,
""
abiFilters
"armeabi-v7a"
,
"
x86"
,
"
"
}
}
}
}
...
@@ -124,7 +124,7 @@ android {
...
@@ -124,7 +124,7 @@ android {
armv7
{
armv7
{
versionCode
defaultConfig
.
versionCode
versionCode
defaultConfig
.
versionCode
ndk
{
ndk
{
abiFilters
"armeabi-v7a"
,
""
abiFilters
"armeabi-v7a"
,
"
x86"
,
"
"
}
}
}
}
armv8
{
armv8
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment