Permalink
Browse files

from social networks on result view + embed issue on facebook

  • Loading branch information...
2 parents a4db362 + bde0945 commit 76a59c13a7e7b9832b1a8c2bec64a661ec492d3f @Evangenieur committed Dec 3, 2012
@@ -20,6 +20,7 @@ fork = (file, args) ->
spawned.stdin.write JSON.stringify obj
spawned.on_message = (cb) ->
spawned.stdout.on "data", (msg) ->
+ console.log "parent got message", arguments
try
cb JSON.parse(msg.toString())
catch e
@@ -30,7 +31,6 @@ module.exports = (file, opts, cb) ->
console.log "forking", file, opts
forked = fork file, opts
forked.on_message (obj) ->
- console.log "parent got message", arguments
cb obj
forked.on "exit", ->
console.log "Exited"
View
@@ -1,6 +1,6 @@
{
"name": "hvid.io",
- "version": "0.0.0-18",
+ "version": "0.0.0-22",
"description": "RealTime Video Search Twitter / Facebook / GooglePlus",
"main": "server.coffee",
"scripts": {
@@ -280,10 +280,17 @@
callback([this]);
} else {
var html = hvidio.templatize('#videoTemplate', { video: this });
- //$list.append(html);
var $mylist = $("#video-list-" + urlify(keyword));
+ //$list.append(html);
+ /*
$mylist.append(html);
$(html).fadeIn()
+ */
+ var $html = $(html);
+
+ $mylist.append($html);
+
+ $html.css('visibility','visible').hide().fadeIn('slow');
hvidio.initScroll();
}
@@ -155,17 +155,21 @@ p.tagline {
box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.5) inset;
border-radius: 20px;
}
+.visibile {
+ visibility: visible !important;
+}
#results {
height: 0;
position: relative;
z-index: 1;
- margin-top: 20px;
+ padding-top: 20px;
}
#results #video-list {
margin: 20px 1%;
width: 98%;
}
#results .video {
+ visibility: hidden;
display: inline-block;
margin: 10px 1%;
min-height: 200px;
@@ -175,6 +179,9 @@ p.tagline {
#results .video .video-wrapper {
position: relative;
}
+#results .video.current {
+ visibility: visible;
+}
#results .video.current .play {
background: none;
}
@@ -266,13 +273,13 @@ p.tagline {
font-size: 10px;
}
#results .video .video-cell img.preview {
+ /*
width: 217px;
height: 127px;
- /*
+ */
min-width: 215px;
min-height: 122px;
max-height: 120px;
- */
border: 1px solid gray;
box-shadow: 0px 5px 30px black;
}
@@ -204,18 +204,23 @@ p.tagline {
border-radius: 20px;
}
+.visible {
+ visibility: visible !important;
+}
+
#results {
height: 0;
position: relative;
z-index:1;
- margin-top: 20px;
+ padding-top: 20px;
#video-list {
margin: 20px 1%;
width: 98%;
}
.video {
+ visibility: hidden;
display: inline-block;
margin: 10px 1%;
min-height: @cell-height;
@@ -227,6 +232,8 @@ p.tagline {
}
&.current {
+ visibility: visible;
+
.play {
background: none;
}
View
@@ -62,7 +62,7 @@ block content
| <li>
| <time datetime="<%= video.msgs[0].post_date %>"><%= video.date %></time>
| <br>
- | from <a class="from" href="<%= video.url %>"><%= video.provider %></a>
+ | from <a class="from" href="<%= video.url %>"><%= video.msgs[0].provider %></a>
| </li>
| </li>
| </div>
@@ -34,7 +34,7 @@ video_search = (search, opts = {}) ->
).map (post) ->
url = post.link
return unless url
- console.log post.from
+ #console.log post.from
msg =
provider: "facebook"
id: "facebook/#{post.id}"
@@ -53,7 +53,7 @@ video_search = (search, opts = {}) ->
vdo = {}
vdo.title = post.name if post.name?
- vdo.embed = post.source if post.source?
+ #vdo.embed = post.source if post.source?
vdo.thumbnail = thumb if thumb?
video_platforms.getVideoFromMsg msg, url, vdo
@@ -17,7 +17,7 @@ video_search = (search, opts = {}) ->
opts_str += "#{k}=#{v}&"
url = "https://www.googleapis.com/plus/v1/activities?key=#{google_conf.api_key}&query=#{encodeURIComponent search}&#{opts_str}"
- console.log url
+ #console.log url
request url,
(err, res, body) ->
try
@@ -29,6 +29,7 @@ video_search = (search, opts = {}) ->
_(tweets).chain().map (tweet) ->
_(tweet.entities.urls).map (url) ->
url = url.expanded_url
+ #console.log url
msg =
provider: "twitter"
id: "twitter/#{tweet.id_str}"

0 comments on commit 76a59c1

Please sign in to comment.