This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-08-25
Channels
- # admin-announcements (3)
- # alda (2)
- # beginners (10)
- # boot (44)
- # cider (31)
- # cljs-dev (5)
- # cljsjs (2)
- # cljsrn (17)
- # clojure (181)
- # clojure-austin (2)
- # clojure-brasil (18)
- # clojure-canada (1)
- # clojure-conj (5)
- # clojure-dev (11)
- # clojure-gamedev (30)
- # clojure-russia (380)
- # clojure-spec (50)
- # clojure-uk (35)
- # clojurescript (146)
- # clojutre (1)
- # component (1)
- # cursive (62)
- # datomic (27)
- # dirac (7)
- # editors (23)
- # emacs (7)
- # events (34)
- # funcool (22)
- # hoplon (134)
- # jobs (22)
- # jobs-rus (7)
- # juxt (1)
- # kekkonen (1)
- # lein-figwheel (54)
- # leiningen (7)
- # luminus (2)
- # off-topic (5)
- # om (4)
- # onyx (27)
- # proton (5)
- # protorepl (2)
- # re-frame (16)
- # reagent (29)
- # rethinkdb (2)
- # schema (1)
- # untangled (61)
- # yada (9)
Has anyone worked with react-native-sound
? It runs with an absolute path, but I figure an absolute path won't work when I build for release.
The source at https://github.com/zmxv/react-native-sound says to say var whoosh = new Sound('whoosh.mp3', Sound.MAIN_BUNDLE)
.
I have:
(def Audio-player (js/require "react-native-sound"))
(def adv-sound (js/require "./images/advertising.mp3"))
(def audio-player (Audio-player. (.-MAIN_BUNDLE Audio-player) adv-sound))
This doesn't work, although (def audio-player (Audio-player. "absolute-path-to-sound-file"))
does, and no examples on Github come up.@coyotespike So did you log the path Sound.MAIN_BUNDLE? According to source (on iOS) it should be the right one https://github.com/zmxv/react-native-sound/blob/master/RNSound/RNSound.m#L54
hey @artemyarulin, thanks for the suggestion! Do you mean debug on Chrome? Having issues getting that to go, obviously I'll keep trying.
I added the sound file like an image, by dropping into a folder, then running re-natal use-figwheel
. I'm also thinking about whether I'm supposed to add sound files differently.
well I mean (.log js/console Sound.MAIN_BUNDLE)
to see what the actual path and then check if your file is actually there (for IOS simulator it will return local file system full path)
Huh...that path appears to end at data/Containers/Bundle/Application/more-numbers-here/ponder.app
. The app is there, but no file.
what’s inside? app is just a folder, you can ls
inside easily
Oh yeah! lemme check... I also just followed the zmxv/react-native-sound directions to add a file.
Base.lproj PkgInfo assets ponder
Frameworks PlugIns main.jsbundle
Info.plist advertising.mp3 main.jsbundle.meta
`So now I've got /ponder.app/advertising.mp3
, where before I only had /ponder.app/assets/images/advertising.mp3
does it work now?
lol sadly no..."The operation couldn't be completed", error messages
well, that’s some progress 🙂
true!
I'll keep trying to add it manually to Xcode, which I'm guessing will eventually work. In general, though, how does one bundle sound-files with the app, using re-natal? Seems like it should work like the image files, but that doesn't appear to be the case.
Maybe I should open a ticket.
Yeah, I’m not using re-natal, so cannot say
http://blog.thebakery.io/continuous-integration-for-react-native-applications-with-fastlane-and-bitrise-ios-version/ Good read (and references at the end)