-
Notifications
You must be signed in to change notification settings - Fork 119
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #236 from ihors-livestorm/feat/add-broadcasts-list
feat: add `Listing live streaming broadcasts` support
- Loading branch information
Showing
14 changed files
with
872 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
require "opentok/broadcast" | ||
|
||
module OpenTok | ||
# A class for accessing an array of Broadcast objects. | ||
class BroadcastList < Array | ||
# The total number of broadcasts. | ||
attr_reader :total | ||
|
||
def initialize(interface, json) | ||
@total = json["count"] | ||
super json["items"].map { |item| ::OpenTok::Broadcast.new interface, item } | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
module OpenTok | ||
# @private | ||
VERSION = '4.3.0' | ||
VERSION = '4.2.0' | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
<div class="container bump-me"> | ||
|
||
<div class="body-content"> | ||
|
||
<div class="panel panel-default"> | ||
<div class="panel-heading"> | ||
<h3 class="panel-title">Broadcasts List</h3> | ||
</div> | ||
<div class="panel-body"> | ||
<% if broadcasts.count > 0 %> | ||
<table class="table"> | ||
<thead> | ||
<tr> | ||
<th>Created</th> | ||
<th>Status</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
<% for item in broadcasts %> | ||
|
||
<tr data-item-id="<%= item.id %>"> | ||
<td><%= Time.at(item.created_at/1000).strftime("%B %e, %Y at %I:%M %p") %></td> | ||
<td><%= item.status %></td> | ||
</tr> | ||
|
||
<% end %> | ||
</tbody> | ||
</table> | ||
<% else %> | ||
<p> | ||
There are no broadcasts currently. Try making one in the <a href="/host">host view</a>. | ||
</p> | ||
<% end %> | ||
</div> | ||
<div class="panel-footer"> | ||
<% if show_previous %> | ||
<a href="<%= show_previous %>" class="pull-left">← Previous</a> | ||
<% end %> | ||
| ||
<% if show_next %> | ||
<a href="<%= show_next %>" class="pull-right">Next →</a> | ||
<% end %> | ||
</div> | ||
</div> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.