Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Can now play audio via html5 from /media folder

  • Loading branch information...
commit 6456435de390fd80a475d2590efb3aeba19079bc 1 parent 8bd50d9
Sam Karp authored
View
4 geocamTalk/fixtures/demoTalkMessages.json
@@ -1,8 +1,8 @@
[{"pk": 1, "model": "geocamTalk.talkmessage", "fields": {"recipients": [0], "author": 1, "altitude": null, "longitude": -122.11103110000001, "heading": null, "content": "hello", "content_timestamp": "2011-03-16 21:55:07", "position_timestamp": null, "latitude": 37.401637700000002, "speed": null, "cid": "49689939c6734fc59120ecf9fce5580d", "accuracy": 138.0}},
{"pk": 2, "model": "geocamTalk.talkmessage", "fields": {"recipients": [0], "author": 1, "altitude": 0.0, "longitude": -122.1111588, "heading": null, "content": "bogus", "content_timestamp": "2011-03-16 21:58:38", "position_timestamp": null, "latitude": 37.401529199999999, "speed": null, "cid": "8fe5fc3123c64a87a08708f3d0a84c3d", "accuracy": 35.0}},
-{"pk": 3, "model": "geocamTalk.talkmessage", "fields": {"recipients": [0, 2, 3, 4], "author": 1, "altitude": null, "longitude": -122.11103110000001, "heading": null, "content": "Holy crap, did you feel that earthquake?", "content_timestamp": "2011-03-16 22:37:34", "position_timestamp": null, "latitude": 37.401637700000002, "speed": null, "cid": "fa131ec140f84a9f8af7421a6d2a6f25", "accuracy": 138.0,"audio_file": "car-honk-2.mp3"}},
+{"pk": 3, "model": "geocamTalk.talkmessage", "fields": {"recipients": [0, 2, 3, 4], "author": 1, "altitude": null, "longitude": -122.11103110000001, "heading": null, "content": "Holy crap, did you feel that earthquake?", "content_timestamp": "2011-03-16 22:37:34", "position_timestamp": null, "latitude": 37.401637700000002, "speed": null, "cid": "fa131ec140f84a9f8af7421a6d2a6f25", "accuracy": 138.0,"audio_file": "car-honk-2.mp4"}},
{"pk": 4, "model": "geocamTalk.talkmessage", "fields": {"recipients": [0, 4, 5], "author": 1, "altitude": null, "longitude": -122.11103110000001, "heading": null, "content": "Dude, I think I just got some radiation poisoning from that reactor.", "content_timestamp": "2011-03-16 22:38:04", "position_timestamp": null, "latitude": 37.401637700000002, "speed": null, "cid": "cefad07b5eb1439287dcc88877809049", "accuracy": 138.0}},
{"pk": 5, "model": "geocamTalk.talkmessage", "fields": {"recipients": [0, 2, 3, 4], "author": 1, "altitude": null, "longitude": -122.11103110000001, "heading": null, "content": "A dingo stole my baby.", "content_timestamp": "2011-03-16 22:38:38", "position_timestamp": null, "latitude": 37.401637700000002, "speed": null, "cid": "5d878e265bcb4b768c5fb1cf41183e44", "accuracy": 138.0}},
{"pk": 6, "model": "geocamTalk.talkmessage", "fields": {"recipients": [],"author": 3, "altitude": null, "longitude": -122.4048743, "content": "Some crazy stuff is happening in this neighborhood.", "content_timestamp": "2011-02-19 21:34:46", "position_timestamp": "2011-02-19 15:37:53", "latitude": 37.746198499999998, "speed": null, "heading": null, "accuracy": 190.0,"cid": "5f01f5679c5a4606929e70cb4b903224"}},
{"pk": 7, "model": "geocamTalk.talkmessage", "fields": {"recipients": [],"author": 3, "altitude": null, "longitude": -122.4048743, "content": "Casualties are littering the streets!", "content_timestamp": "2011-02-19 21:35:29", "position_timestamp": "2011-02-19 15:37:53", "latitude": 37.746198499999998, "speed": null, "heading": null, "accuracy": 190.0,"cid": "5f01f5679c5a4606929e70cb4b903125"}},
-{"pk": 8, "model": "geocamTalk.talkmessage", "fields": {"recipients": [],"author": 3, "altitude": null, "longitude": -122.4048743, "content": "The hospital is full, no more beds...", "content_timestamp": "2011-02-19 21:35:52", "position_timestamp": "2011-02-19 15:37:53", "latitude": 37.746198499999998, "speed": null, "heading": null, "accuracy": 190.0,"cid": "5f01f5679c5a4606929e70114b903b65","audio_file": "car-honk-2.mp3"}}]
+{"pk": 8, "model": "geocamTalk.talkmessage", "fields": {"recipients": [],"author": 3, "altitude": null, "longitude": -122.4048743, "content": "The hospital is full, no more beds...", "content_timestamp": "2011-02-19 21:35:52", "position_timestamp": "2011-02-19 15:37:53", "latitude": 37.746198499999998, "speed": null, "heading": null, "accuracy": 190.0,"cid": "5f01f5679c5a4606929e70114b903b65","audio_file": "car-honk-2.mp4"}}]
View
4 geocamTalk/templates/geocamTalk/message_list.html
@@ -44,7 +44,9 @@
said
{% if m.has_geolocation %}<img src="/resources/map.png" />{%endif%}
{% if m.has_audio %}
- I HAVE AUDIO
+ <audio controls="controls">
+ <source src={{ m.audio_file.url }} >
+ </audio>
{%endif%}
</dt>
<dd id="message_{{m.pk}}_content">
Please sign in to comment.
Something went wrong with that request. Please try again.