summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJules Laplace <jules@okfoc.us>2016-04-05 10:47:11 -0400
committerJules Laplace <jules@okfoc.us>2016-04-05 10:47:11 -0400
commit1d919f27ee831abf2ae43aab81443d46233d1d5f (patch)
treea512b235007d94de37604269fea7803b42f2534d
parent284531a8d05aa1790270ae6eae52b499df8fdda5 (diff)
embed videos
-rw-r--r--db.json8
-rw-r--r--public/assets/js/lib/ProjectView.js4
-rw-r--r--public/assets/ok.css3
-rw-r--r--templates/index.liquid2
4 files changed, 11 insertions, 6 deletions
diff --git a/db.json b/db.json
index 5214fb8..a4f386d 100644
--- a/db.json
+++ b/db.json
@@ -76,7 +76,7 @@
"media": [
{
"type": "video",
- "token": "",
+ "token": "http://okfocus.s3.amazonaws.com/video/stone-island-app.mp4",
"width": "1920",
"height": "1080",
"title": "stone-island-app.mp4",
@@ -347,7 +347,7 @@
"media": [
{
"type": "video",
- "token": "",
+ "token": "http://okfocus.s3.amazonaws.com/video/overlayer-app.mp4",
"width": "1920",
"height": "1080",
"title": "overlayer-app.mp4",
@@ -590,7 +590,7 @@
"media": [
{
"type": "video",
- "token": "",
+ "token": "http://okfocus.s3.amazonaws.com/video/drake-shake-app.mp4",
"width": "1920",
"height": "1080",
"title": "drake-shake-app.mp4",
@@ -691,7 +691,7 @@
"media": [
{
"type": "video",
- "token": "",
+ "token": "http://okfocus.s3.amazonaws.com/video/newemoticons-app.mp4",
"width": "1920",
"height": "1080",
"title": "newemoticons-app.mp4",
diff --git a/public/assets/js/lib/ProjectView.js b/public/assets/js/lib/ProjectView.js
index 3eece8f..08538ee 100644
--- a/public/assets/js/lib/ProjectView.js
+++ b/public/assets/js/lib/ProjectView.js
@@ -100,6 +100,10 @@ var ProjectView = View.extend({
var uri = $(this).data("uri")
$(this).html("<iframe src='" + uri + "'>")
})
+ this.$videos.each(function(){
+ var uri = $(this).data("uri")
+ $(this).html("<video src='" + uri + "' autoplay loop>")
+ })
}
app.nav.setActive( this.project_id )
diff --git a/public/assets/ok.css b/public/assets/ok.css
index 971be6c..876354b 100644
--- a/public/assets/ok.css
+++ b/public/assets/ok.css
@@ -602,7 +602,8 @@ button.previous {
}
.cell,
-.cell iframe {
+.cell iframe,
+.cell video {
width: 100vw;
height: 100%;
background-position: top center;
diff --git a/templates/index.liquid b/templates/index.liquid
index d38e8c6..684086f 100644
--- a/templates/index.liquid
+++ b/templates/index.liquid
@@ -124,7 +124,7 @@
{% if media.type == 'image' %}
<div class="cell desktop image" data-uri="{{ media.uri }}" style="{% if media.caption %} background-size:{{ media.caption }}; {% endif %}"></div>
{% elsif media.type == 'video' %}
- <div class="cell desktop video" data-uri="{{ media.uri }}"></div>
+ <div class="cell desktop video" data-uri="{{ media.token }}"></div>
{% elsif media.type == 'link' %}
<div class="cell desktop iframe" data-uri="{{ media.uri }}"></div>
{% endif %}