mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2025-12-17 22:14:26 +01:00
Checkout v2: Play sound when invoice is paid (#5113)
* Checkout v2: Play sound when invoice is paid Closes #5085. * Refactoring: Use low-level audio API to play the sound Allows to play the sound regardless of browser permissions. * Add audio file detection * Use model state for file upload errors * Add default sound and customizing option * Fix mp3 detection * Add sounds * Update defaults * Add nfcread and error sounds * Improve label wording * Replace sound --------- Co-authored-by: nicolas.dorier <nicolas.dorier@gmail.com>
This commit is contained in:
@@ -5,6 +5,7 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using BTCPayServer.Abstractions.Contracts;
|
||||
using BTCPayServer.Abstractions.Extensions;
|
||||
using BTCPayServer.Client.Models;
|
||||
using BTCPayServer.Data;
|
||||
@@ -55,6 +56,7 @@ namespace BTCPayServer.Controllers
|
||||
private readonly LinkGenerator _linkGenerator;
|
||||
private readonly IAuthorizationService _authorizationService;
|
||||
private readonly AppService _appService;
|
||||
private readonly IFileService _fileService;
|
||||
|
||||
public WebhookSender WebhookNotificationManager { get; }
|
||||
|
||||
@@ -79,6 +81,7 @@ namespace BTCPayServer.Controllers
|
||||
InvoiceActivator invoiceActivator,
|
||||
LinkGenerator linkGenerator,
|
||||
AppService appService,
|
||||
IFileService fileService,
|
||||
IAuthorizationService authorizationService)
|
||||
{
|
||||
_displayFormatter = displayFormatter;
|
||||
@@ -100,6 +103,7 @@ namespace BTCPayServer.Controllers
|
||||
_invoiceActivator = invoiceActivator;
|
||||
_linkGenerator = linkGenerator;
|
||||
_authorizationService = authorizationService;
|
||||
_fileService = fileService;
|
||||
_appService = appService;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user