mirror of
https://github.com/Reckless-Satoshi/robosats.git
synced 2024-08-17 07:40:38 +03:00
Fix android sound notifications
This commit is contained in:
parent
cf9ad31ac9
commit
f6601922b8
4
.gitignore
vendored
4
.gitignore
vendored
@ -649,5 +649,7 @@ docs/.jekyll-cache*
|
||||
docs/_site*
|
||||
node
|
||||
|
||||
# mobile frontend js
|
||||
# mobile frontend statics
|
||||
mobile/html/Web.bundle/js*
|
||||
mobile/html/Web.bundle/css*
|
||||
mobile/html/Web.bundle/assets*
|
||||
|
@ -31,11 +31,15 @@ interface NotificationMessage {
|
||||
pageTitle: string;
|
||||
}
|
||||
|
||||
const path =
|
||||
window.NativeRobosats === undefined
|
||||
? '/static/assets/sounds'
|
||||
: 'file:///android_asset/Web.bundle/assets/sounds';
|
||||
const audio = {
|
||||
chat: new Audio(`/static/assets/sounds/chat-open.mp3`),
|
||||
takerFound: new Audio(`/static/assets/sounds/taker-found.mp3`),
|
||||
ding: new Audio(`/static/assets/sounds/locked-invoice.mp3`),
|
||||
successful: new Audio(`/static/assets/sounds/successful.mp3`),
|
||||
chat: new Audio(`${path}/chat-open.mp3`),
|
||||
takerFound: new Audio(`${path}/taker-found.mp3`),
|
||||
ding: new Audio(`${path}/locked-invoice.mp3`),
|
||||
successful: new Audio(`${path}/successful.mp3`),
|
||||
};
|
||||
|
||||
const emptyNotificationMessage: NotificationMessage = {
|
||||
|
@ -67,6 +67,10 @@ const configMobile: Configuration = {
|
||||
from: path.resolve(__dirname, 'static/css'),
|
||||
to: path.resolve(__dirname, '../mobile/html/Web.bundle/css'),
|
||||
},
|
||||
{
|
||||
from: path.resolve(__dirname, 'static/assets/sounds'),
|
||||
to: path.resolve(__dirname, '../mobile/html/Web.bundle/assets/sounds'),
|
||||
},
|
||||
],
|
||||
}),
|
||||
],
|
||||
|
@ -176,7 +176,7 @@ const App = () => {
|
||||
allowingReadAccessToURL={uri}
|
||||
allowFileAccess={true}
|
||||
allowsBackForwardNavigationGestures={true}
|
||||
mediaPlaybackRequiresUserAction={false}
|
||||
mediaPlaybackRequiresUserAction={false} // Allow autoplay
|
||||
allowsLinkPreview={false}
|
||||
renderLoading={() => <Text></Text>}
|
||||
onError={(syntheticEvent) => <Text>{syntheticEvent.type}</Text>}
|
||||
|
Loading…
Reference in New Issue
Block a user