I'm getting unexpected results in some generated javascript:
My clojurescript looks like:
(let [video (.getElementById js/document "video")
_ (js/alert video)
success (fn [stream] (aset video "src" (.createObjectURL (.-URL
js/window) stream)))
error (fn [err] (. js/console (log (str "error: ") err)))
params #js {:audio true :video true}]
(.webkitGetUserMedia js/navigator params success error)))
Which is generating the folowing javascript:
var video = document.getElementById("video");
var ___$2 = alert(video);
var on_success = function(video, ___$2, active, completed, ___$1,
map__19073, map__19073__$1, q, map__19068, map__19068__$1, app, todos) {
return function(stream) {
return video["src"] = window.URL.createObjectURL(stream);
};
}(video, ___$2, active, completed, ___$1, map__19073,
map__19073__$1, q, map__19068, map__19068__$1, app, todos);
var on_error = function(video, ___$2, on_success, active,
completed, ___$1, map__19073, map__19073__$1, q, map__19068, map__19068__$1,
app, todos) {
return function(err) {
return console.log([cljs.core.str("navigator.getUserMedia
error: ")].join(""), err);
};
}(video, ___$2, on_success, active, completed, ___$1, map__19073,
map__19073__$1, q, map__19068, map__19068__$1, app, todos);
var constraints = {"video":true, "audio":false};
return navigator.webkitGetUserMedia(constraints, on_success,
on_error);
};
As I'm seeing it, the generated on-success function is just wrong... it doesn't
have the interface that i would be expecting.
Any ideas?
Thanks in advance!
--
Note that posts from new members are moderated - please be patient with your
first post.
---
You received this message because you are subscribed to the Google Groups
"ClojureScript" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to clojurescript+unsubscr...@googlegroups.com.
To post to this group, send email to clojurescript@googlegroups.com.
Visit this group at http://groups.google.com/group/clojurescript.