From 7aab02541b4cd3dd793b7386bf57247d35096e5f Mon Sep 17 00:00:00 2001
From: Phuong Dinh
Date: Mon, 19 Oct 2020 14:42:46 -0400
Subject: [PATCH 1/4] Add simple player with quality selector
---
app/views/items/show.html.erb | 41 +++++++++++++++++++++++++++++++++++
1 file changed, 41 insertions(+)
diff --git a/app/views/items/show.html.erb b/app/views/items/show.html.erb
index 30e050f..bacd873 100644
--- a/app/views/items/show.html.erb
+++ b/app/views/items/show.html.erb
@@ -1,3 +1,6 @@
+
+
+
<%= notice %>
@@ -10,5 +13,43 @@
<%= @item.streams %>
+
+
+
+
<%= link_to 'Edit', edit_item_path(@item) %> |
<%= link_to 'Back', items_path %>
+
+
+
+
+
+
\ No newline at end of file
From ce10e9a50d8c2cebee73903662e0f866afc3b3e2 Mon Sep 17 00:00:00 2001
From: Phuong Dinh
Date: Wed, 21 Oct 2020 10:42:49 -0400
Subject: [PATCH 2/4] Use new streams format
---
app/views/items/show.html.erb | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/app/views/items/show.html.erb b/app/views/items/show.html.erb
index bacd873..cee1eae 100644
--- a/app/views/items/show.html.erb
+++ b/app/views/items/show.html.erb
@@ -23,8 +23,8 @@
preload="auto"
data-setup="{}"
>
- <% @item.streams.each do |q, url| %>
-
+ <% @item.streams.each do |stream| %>
+ " type="application/x-mpegURL" label="<%= stream["label"] %>"/>
<% end %>
From 4b8bb4abb4375c1874bd9e7f2f3701d3cdc00b4e Mon Sep 17 00:00:00 2001
From: Phuong Dinh
Date: Wed, 21 Oct 2020 11:58:53 -0400
Subject: [PATCH 3/4] Avoid reinitialize videojs
---
app/views/items/show.html.erb | 1 -
1 file changed, 1 deletion(-)
diff --git a/app/views/items/show.html.erb b/app/views/items/show.html.erb
index cee1eae..40c0347 100644
--- a/app/views/items/show.html.erb
+++ b/app/views/items/show.html.erb
@@ -21,7 +21,6 @@
height="480"
controls
preload="auto"
- data-setup="{}"
>
<% @item.streams.each do |stream| %>
" type="application/x-mpegURL" label="<%= stream["label"] %>"/>
From 46f823c00187e2b07471f2154d03f923e8ced0e7 Mon Sep 17 00:00:00 2001
From: Phuong Dinh
Date: Wed, 21 Oct 2020 13:30:06 -0400
Subject: [PATCH 4/4] Add streaming service
---
docker-compose.yml | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/docker-compose.yml b/docker-compose.yml
index f190a1a..a37f9b3 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -17,3 +17,9 @@ services:
- "3000:3000"
depends_on:
- db
+ streaming:
+ build: ./nginx
+ volumes:
+ - ./streams:/data
+ ports:
+ - "3333:80"