<html>
<head>
- <title>html5 video demo</title>
- <script src="http://code.jquery.com/jquery.js"></script>
+ <title>html5 video demo</title>
<script src="popcorn.js"></script>
<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script>
<style type="text/css" media="screen">
<video src="video/webMadeMovies.ogg" data-timeline-sources="xml/webMadeMovies.xml" controls></video>
<div id="sub"></div><br />
<div id="tagthisvideo">In this video:<span id="inthisvideo"></span></div><br />
- <div id="map"></div><br />
- <div>Celine Celine tweets: <br /><span id="div1"></span></div><br />
- <div>Humphd tweets: <br /><span id="div2"></span></div>
+ <div id="map"></div>
</div>
</body>
</html>
};
};
- var TwitterCommand = function(name, params, text) {
- VideoCommand.call(this, name, params, text);
- // Uses JQuery
- var tweets = [];
- $.getJSON("http://search.twitter.com/search.json?rpp=" + this.params.mostrecenttweets + "&callback=?&q=" + this.params.user, function(json) {
- $.each(json.results, function(i, tweet){
- tweets.push(tweet.text);
- });
- });
- this.tweets = tweets;
- this.in = function() {
- document.getElementById(this.params.target).innerHTML = this.tweets[(Math.round((Math.random()*(this.tweets.length-1))))];
- };
- this.out = function() {
- document.getElementById(this.params.target).innerHTML = "";
- };
- };
- // http://twitter.com/celinecelines
+ var TwitterCommand = function(name, params, text) {}; // http://twitter.com/celinecelines
// Wrapper for accessing commands by name
// commands[name].create() returns a new command of type name
create: function(name, params, text) {
return new MapCommand(name, params, text);
}
- },
- tweet: {
- create: function(name, params, text) {
- return new TwitterCommand(name, params, text);
- }
}
};
<location id="map2" in="0:30" out="1:00" lat="43.771" long="-79.5" target="map" zoom="16"/>
<location id="map3" in="1:00" out="1:30" lat="41.771" long="-76.5" target="map" zoom="16"/>
</map>
- <twitter>
- <celine target="div1" mostrecenttweets="15" user="celinecelines">
- <tweet in="0:01" out="0:10"/>
- <tweet in="0:10" out="0:20"/>
- <tweet in="0:20" out="0:30"/>
- </celine>
- <humphd target="div2" mostrecenttweets="15" user="humphd">
- <tweet in="0:01" out="0:10"/>
- <tweet in="0:10" out="0:20"/>
- <tweet in="0:20" out="0:30"/>
- </humphd>
- </twitter>
</popcorn>