Skip to content

Commit

Permalink
fix(mobile): format of recorder audio file
Browse files Browse the repository at this point in the history
  • Loading branch information
xyhp915 authored and tiensonqin committed Oct 28, 2022
1 parent 84924c6 commit 65e77e6
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@
"@tippyjs/react": "4.2.5",
"aes-js": "3.1.2",
"bignumber.js": "^9.0.2",
"capacitor-voice-recorder": "2.1.0",
"capacitor-voice-recorder": "4.0.0",
"check-password-strength": "2.0.7",
"chokidar": "3.5.1",
"chrono-node": "2.2.4",
Expand Down
3 changes: 2 additions & 1 deletion src/main/frontend/fs/capacitor_fs.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,8 @@
(str "file://" (js/encodeURI dir)))
dir)
path (some-> path (string/replace #"^/+" ""))
encode-url #(let [encoded-chars? (boolean (re-find #"(?i)%[0-9a-f]{2}" path))]
encode-url #(let [encoded-chars?
(and (string? %) (boolean (re-find #"(?i)%[0-9a-f]{2}" %)))]
(cond-> %
(not encoded-chars?)
(js/encodeURI path)))]
Expand Down
2 changes: 1 addition & 1 deletion src/main/frontend/mobile/record.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@

(defn- embed-audio [database64]
(p/let [page (or (state/get-current-page) (string/lower-case (date/journal-name)))
filename (str (date/get-date-time-string-2) ".m4a")
filename (str (date/get-date-time-string-2) ".aac")
edit-block (state/get-edit-block)
format (or (:block/format edit-block) (db/get-page-format page))
path (editor-handler/get-asset-path filename)
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1599,10 +1599,10 @@ caniuse-lite@^1.0.0, caniuse-lite@^1.0.30001109, caniuse-lite@^1.0.30001370:
resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001393.tgz#1aa161e24fe6af2e2ccda000fc2b94be0b0db356"
integrity sha512-N/od11RX+Gsk+1qY/jbPa0R6zJupEa0lxeBG598EbrtblxVCTJsQwbRBm6+V+rxpc5lHKdsXb9RY83cZIPLseA==

capacitor-voice-recorder@2.1.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/capacitor-voice-recorder/-/capacitor-voice-recorder-2.1.0.tgz#142e7bfa62e88530279f478b79735a0dc68a7d1a"
integrity sha512-H0c/sUVD7cduVS5VqutKk00whyqXZUFi56ChRMl9Ke/LBU71HhHwzonPmheT8i9gQmgOaplc3TOpaKqckXb+3A==
capacitor-voice-recorder@4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/capacitor-voice-recorder/-/capacitor-voice-recorder-4.0.0.tgz#41939aa21e68eb58301e781c217ad17dd48d2a34"
integrity sha512-J5RfSOnTFm0nOJlW46wSNUVY331SHF0jGc+pi5X0/6NsNM6tJPhZtg4dajIY0zPRR94eirE3Z/h6R+RW3EmSQg==
dependencies:
get-blob-duration "^1.2.0"

Expand Down

0 comments on commit 65e77e6

Please sign in to comment.