Mobile notifications for iOS (#210)
* mobile: wire notification registration and listener
* implement backend components for push notifications
* refactor: agentic comment cleanup
* docs: use proper module name for particle processor
* set required env variables for push notifications
* bump version
* fix: always upsert push token on mobile start
* Revert "fix: always upsert push token on mobile start"
This reverts commit 90ff18a788.
* send push notifications regardless of online status
This commit was merged in pull request #210.
This commit is contained in:
@@ -30,17 +30,15 @@ type TranscodeInput struct {
|
||||
type TranscodeOutput struct {
|
||||
TempLocalFilePath string
|
||||
OutputMimeType string
|
||||
// Extension such as ".m4a" or ".mp4"
|
||||
OutputExt string
|
||||
OutputExt string // e.g. ".m4a" or ".mp4"
|
||||
}
|
||||
|
||||
var (
|
||||
ErrInvalidInput error = errors.New("invalid input")
|
||||
)
|
||||
|
||||
// TranscodeToMp4 takes in any audio or video source URL and
|
||||
// returns the filepath of the transcoded media
|
||||
// WARNING: caller responsible for deleting TempLocalFilePath
|
||||
// TranscodeToMp4 writes the result to a temp file; caller is responsible
|
||||
// for deleting TempLocalFilePath.
|
||||
func TranscodeToMp4(ctx context.Context, input TranscodeInput) (*TranscodeOutput, error) {
|
||||
if input.SourceURL == "" || input.MimeType == "" {
|
||||
return nil, ErrInvalidInput
|
||||
@@ -74,11 +72,9 @@ func TranscodeToMp4(ctx context.Context, input TranscodeInput) (*TranscodeOutput
|
||||
tmpPath,
|
||||
}
|
||||
} else {
|
||||
// Cap encoder parallelism and lookahead to keep memory bounded — screen
|
||||
// recordings come in at native display resolution (often 1440p–4K) and
|
||||
// libx264's per-thread lookahead/reference buffers blow past the worker's
|
||||
// memory limit otherwise. Output is also downscaled to 1080p max, which
|
||||
// mobile playback won't notice; the original WebM stays in GCS untouched.
|
||||
// 1440p–4K screen recordings + libx264's lookahead buffers can OOM the
|
||||
// worker. Bound parallelism/lookahead and downscale to 1080p; the
|
||||
// original WebM stays in GCS untouched.
|
||||
args = []string{
|
||||
"-y", "-i", input.SourceURL,
|
||||
"-vf", "scale='min(1920,iw)':-2:flags=lanczos",
|
||||
|
||||
Reference in New Issue
Block a user