Compare commits
3 Commits
change-big
...
API-can-fe
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4ae8525ba8 | ||
|
|
69d4ef0fb2 | ||
|
|
566f8dae05 |
@@ -16,10 +16,9 @@ REDIS_URL=
|
||||
# Required for Zoom.us integration
|
||||
ZOOM_API_KEY=
|
||||
ZOOM_API_SECRET=
|
||||
ZOOM_ACCOUNT_NUMBER=
|
||||
ZOOM_PRO_USERS_LIMIT= # defaults to 3
|
||||
ZOOM_USER_TYPE= # 'pro' / 'basic'
|
||||
ZOOM_ENABLE_RECORDINGS= # true / false (default: false)
|
||||
ZOOM_ENABLE_RECORDINGS=0 # 0 / 1
|
||||
# Token for webhooks authorization
|
||||
ZOOM_VERIFICATION_TOKEN=
|
||||
|
||||
|
||||
@@ -20,7 +20,6 @@ class Admin::AccountsController < Admin::ApplicationController
|
||||
|
||||
def show
|
||||
@videos = filtered_account_videos.order(created_at: :desc, project_id: :desc).paginate(page: params[:page])
|
||||
@broadcasts = account_broadcasts.order(created_at: :desc, project_id: :desc).paginate(page: params[:page])
|
||||
end
|
||||
|
||||
def edit
|
||||
@@ -71,8 +70,4 @@ class Admin::AccountsController < Admin::ApplicationController
|
||||
@account.videos
|
||||
end
|
||||
end
|
||||
|
||||
def account_broadcasts
|
||||
@account.broadcasts
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,24 +0,0 @@
|
||||
class Admin::BroadcastsController < Admin::ApplicationController
|
||||
before_action :set_broadcast, only: [:edit, :update]
|
||||
|
||||
def edit
|
||||
end
|
||||
|
||||
def update
|
||||
if @broadcast.update(broadcast_update_params)
|
||||
redirect_to [:admin, @broadcast.project.account], notice: t(".notice")
|
||||
else
|
||||
render :edit
|
||||
end
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def set_broadcast
|
||||
@broadcast = authorize policy_scope(Broadcast).find(params[:id])
|
||||
end
|
||||
|
||||
def broadcast_update_params
|
||||
params.require(:broadcast).permit(:stream_url_override, :stream_key_override, :director_mode_video_embed)
|
||||
end
|
||||
end
|
||||
@@ -1,5 +1,12 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
require './lib/knock_monkeypatch'
|
||||
|
||||
class Api::UserTokenController < Knock::AuthTokenController
|
||||
include Oath::ControllerHelpers
|
||||
|
||||
skip_before_action :verify_authenticity_token
|
||||
before_action :sign_in_user
|
||||
|
||||
rescue_from Exception, :with => :return_error
|
||||
|
||||
@@ -10,7 +17,7 @@ class Api::UserTokenController < Knock::AuthTokenController
|
||||
logger.error "==Handled======="
|
||||
logger.error exception.message
|
||||
logger.error exception.backtrace.join("\n")
|
||||
logger.error "==Handled======="
|
||||
logger.error "==Handled======="
|
||||
case exception
|
||||
when ActiveRecord::RecordNotFound
|
||||
@status = 404
|
||||
@@ -27,12 +34,18 @@ class Api::UserTokenController < Knock::AuthTokenController
|
||||
end
|
||||
|
||||
# for some reason render json_errors is not working
|
||||
# simulating JSON API support
|
||||
render json: {
|
||||
# simulating JSON API support
|
||||
render json: {
|
||||
errors: [{
|
||||
status: @status.to_s,
|
||||
title: @message
|
||||
}]
|
||||
}
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def sign_in_user
|
||||
sign_in(entity)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
class BroadcastRecordingsController < ApplicationController
|
||||
layout "project"
|
||||
|
||||
before_action :set_project
|
||||
before_action :set_broadcast
|
||||
before_action :set_recording
|
||||
|
||||
def destroy
|
||||
@recording.update(hidden: true)
|
||||
@recordings = @broadcast.broadcast_recordings.visible.order_by_recent.paginate(page: params[:page])
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def set_project
|
||||
@project = policy_scope(Project).find(params[:project_id])
|
||||
end
|
||||
|
||||
def set_broadcast
|
||||
@broadcast = authorize policy_scope(@project.broadcasts).find(params[:broadcast_id])
|
||||
end
|
||||
|
||||
def set_recording
|
||||
@recording = authorize policy_scope(@broadcast.broadcast_recordings).find(params[:id])
|
||||
end
|
||||
end
|
||||
@@ -27,7 +27,7 @@ class BroadcastsController < ApplicationController
|
||||
|
||||
def show
|
||||
@conference_url = url_for [@broadcast.project, @broadcast, :zoom_meeting]
|
||||
@recordings = @broadcast.broadcast_recordings.visible.order_by_recent.paginate(page: params[:page])
|
||||
@recordings = @broadcast.broadcast_recordings.order_by_recent.paginate(page: params[:page])
|
||||
@files = @broadcast.files.order("created_at DESC").paginate(page: params[:files_page])
|
||||
render layout: 'application'
|
||||
end
|
||||
|
||||
@@ -5,7 +5,7 @@ class Public::BroadcastsController < Public::BaseController
|
||||
def show
|
||||
@conference_url = broadcast_zoom_meeting_url(@broadcast.token)
|
||||
@multi_view_broadcasts = multi_view_broadcasts
|
||||
@recordings = @broadcast.broadcast_recordings.visible.order_by_recent.paginate(page: params[:page])
|
||||
@recordings = @broadcast.broadcast_recordings.order_by_recent.paginate(page: params[:page])
|
||||
@files = @broadcast.files.order("created_at DESC").paginate(page: params[:files_page])
|
||||
|
||||
render 'broadcasts/show'
|
||||
|
||||
@@ -35,7 +35,7 @@ class StreamNotificationsController < ApplicationController
|
||||
duration = notification.dig(:data, :duration)
|
||||
|
||||
recording = @broadcast.broadcast_recordings.create!(asset_uid: asset_uid, asset_playback_uid: playback_uid, file_name: file_name, duration: duration)
|
||||
recordings = @broadcast.broadcast_recordings.visible.order_by_recent.paginate(page: params[:page])
|
||||
recordings = @broadcast.broadcast_recordings.order_by_recent.paginate(page: params[:page])
|
||||
|
||||
link = helpers.link_to(recording.broadcast_name.titleize, recording.download_url, target: "_blank")
|
||||
message = "Your recent live stream has been recorded and is available for download here: #{link}"
|
||||
|
||||
@@ -6,6 +6,6 @@ module MailHelper
|
||||
"1. Tell us the name of the video: \n\n" \
|
||||
"2. Attach each EDL to this email. Please make sure to indicate whether the EDL is a Video Only, Graphics Only, or Audio Only EDL."
|
||||
|
||||
mail_to "info@mesuite.ai", content, subject: subject, body: body
|
||||
mail_to "info@bigmedia.ai", content, subject: subject, body: body
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
class AdminMailer < ApplicationMailer
|
||||
default to: %w[bray@mesuite.ai]
|
||||
default to: %w(bray@bigmedia.ai lee@bigmedia.ai)
|
||||
|
||||
def new_video(video)
|
||||
@video = video
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class ApplicationMailer < ActionMailer::Base
|
||||
default from: ENV.fetch("MAILER_FROM_ADDRESS") { "support@mesuite.ai" }
|
||||
default from: ENV.fetch("MAILER_FROM_ADDRESS") { "support@bigmedia.ai" }
|
||||
layout "mailer"
|
||||
end
|
||||
|
||||
@@ -5,7 +5,6 @@ class Account < ApplicationRecord
|
||||
has_many :users, through: :account_auths
|
||||
has_many :projects, dependent: :destroy
|
||||
has_many :videos, through: :projects
|
||||
has_many :broadcasts, through: :projects
|
||||
has_many :contract_templates, through: :projects
|
||||
|
||||
validates :name, presence: true
|
||||
|
||||
@@ -40,7 +40,7 @@ class AppHost
|
||||
use_ssl: false,
|
||||
},
|
||||
production: {
|
||||
host: "mesuite.ai",
|
||||
host: "bigmedia.ai",
|
||||
use_ssl: true,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -35,11 +35,7 @@ class Broadcast < ApplicationRecord
|
||||
end
|
||||
|
||||
def stream_server_url
|
||||
stream_url_override.presence || ENV["MUX_BROADCAST_SERVER_URL"]
|
||||
end
|
||||
|
||||
def stream_server_key
|
||||
stream_key_override.presence || stream_key
|
||||
ENV['MUX_BROADCAST_SERVER_URL']
|
||||
end
|
||||
|
||||
def zoom_meeting_url
|
||||
|
||||
@@ -5,8 +5,6 @@ class BroadcastRecording < ApplicationRecord
|
||||
|
||||
validates :asset_uid, uniqueness: true
|
||||
|
||||
scope :visible, -> { where(hidden: false) }
|
||||
|
||||
def download_url
|
||||
"https://stream.mux.com/#{asset_playback_uid}/#{file_name}?download=#{download_file_name}"
|
||||
end
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
class BroadcastRecordingPolicy < ApplicationPolicy
|
||||
def destroy?
|
||||
if user.nil? || user.user.nil?
|
||||
return false
|
||||
end
|
||||
|
||||
user.manager? || user.account_manager?
|
||||
end
|
||||
end
|
||||
@@ -1,13 +0,0 @@
|
||||
<tr>
|
||||
<td><%= broadcast.project.name %></td>
|
||||
<td><%= broadcast.name %></td>
|
||||
<td class="text-right">
|
||||
<div class="btn-group">
|
||||
<%= button_tag "Manage", class: "btn btn-light btn-sm dropdown-toggle border", data: { toggle: "dropdown", boundary: "window" }, aria: { haspopup: true, expanded: false } %>
|
||||
<div class="dropdown-menu dropdown-menu-right">
|
||||
<%= link_to "View on Mux", "#{ENV['MUX_LIVE_STREAM_DASHBOARD_URL']}/#{broadcast.stream_uid}", class: "dropdown-item", target: "_blank" %>
|
||||
<%= link_to "Edit", [:edit, :admin, broadcast, locale: I18n.locale], class: "dropdown-item" %>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -34,25 +34,5 @@
|
||||
<%= will_paginate @videos %>
|
||||
</div>
|
||||
<% end %>
|
||||
<hr>
|
||||
<%= card_field_set_tag "Broadcasts" do %>
|
||||
<div class="table-responsive-sm">
|
||||
<table class="table table-striped tr-px-4 align-all-middle">
|
||||
<thead class="thead-light">
|
||||
<tr>
|
||||
<th>Project</th>
|
||||
<th>Name</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="broadcasts">
|
||||
<%= render partial: "admin/accounts/broadcast", collection: @broadcasts %>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div id="broadcasts_pagination">
|
||||
<%= will_paginate @broadcasts %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
<%= errors_summary_for broadcast %>
|
||||
|
||||
<%= bootstrap_form_with model: model, local: true do |form| %>
|
||||
<%= form.text_field :stream_url_override %>
|
||||
<%= form.text_field :stream_key_override %>
|
||||
<%= form.text_area :director_mode_video_embed %>
|
||||
|
||||
<div class="row align-items-center text-center mt-4">
|
||||
<%= link_to t("shared.cancel"), [:admin, broadcast.project.account], class: "col-3 text-reset" %>
|
||||
<div class="col-9">
|
||||
<%= form.submit class: class_string("btn btn-block", ["btn-success", "btn-primary"] => broadcast.new_record?), data: { disable_with: t("shared.disable_with") } %>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
@@ -1,6 +0,0 @@
|
||||
<div class="card shadow-sm">
|
||||
<%= card_header text: t(".heading"), close_action_path: [:admin, @broadcast.project.account] %>
|
||||
<div class="card-body">
|
||||
<%= render "form", model: [:admin, @broadcast], broadcast: @broadcast %>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1,6 +0,0 @@
|
||||
var dom_id = "<%= dom_id(@recording) %>"
|
||||
$('[data-id="' + dom_id + '"]').remove();
|
||||
<% if @recordings.empty? %>
|
||||
$("#broadcast_recordings_nav").append('<p class="dropdown-item text-muted">Recordings will appear here</p>')
|
||||
<% end %>
|
||||
$("#broadcast_recordings").html("<%= j render(partial: 'broadcasts/broadcast_recordings', locals: { recordings: @recordings, broadcast: @broadcast }) %>");
|
||||
@@ -16,8 +16,8 @@
|
||||
<div class="btn-group">
|
||||
<%= button_tag t(".actions.manage"), class: "btn btn-light btn-sm dropdown-toggle border", data: { toggle: "dropdown", boundary: "window" }, aria: { haspopup: true, expanded: false } %>
|
||||
<div class="dropdown-menu dropdown-menu-right">
|
||||
<%= link_to fa_icon("link fw", text: "Copy Stream URL"), broadcast.stream_server_url, class: "dropdown-item", data: { behavior: "clipboard" } %>
|
||||
<%= link_to fa_icon("key fw", text: "Copy Stream Key"), broadcast.stream_server_key, class: "dropdown-item", data: { behavior: "clipboard" } %>
|
||||
<%= link_to fa_icon("link fw", text: "Copy Stream URL"), ENV['MUX_BROADCAST_SERVER_URL'], class: "dropdown-item", data: { behavior: "clipboard" } %>
|
||||
<%= link_to fa_icon("key fw", text: "Copy Stream Key"), broadcast.stream_key, class: "dropdown-item", data: { behavior: "clipboard" } %>
|
||||
<% if policy(broadcast).show? %>
|
||||
<%= link_to fa_icon("file-video-o fw", text: "View"), [broadcast.project, broadcast], class: "dropdown-item", target: '_blank' %>
|
||||
<% end %>
|
||||
|
||||
@@ -1,3 +1,2 @@
|
||||
<%= link_to broadcast_recording.download_file_name, "javascript:void(0);", class: "dropdown-item", data: { behavior: "play_recording", playback_url: broadcast_recording.playback_url, id: dom_id(broadcast_recording) } %>
|
||||
|
||||
<%= link_to broadcast_recording.download_file_name, "javascript:void(0);", class: "dropdown-item", data: { behavior: "play_recording", playback_url: broadcast_recording.playback_url } %>
|
||||
|
||||
|
||||
@@ -2,12 +2,7 @@
|
||||
<p>Click below to download the recordings of the live stream.</p>
|
||||
<ul class="mt-2">
|
||||
<% recordings.each do |recording| %>
|
||||
<li>
|
||||
<%= link_to(recording.download_file_name, recording.download_url, target: "_blank") %>
|
||||
<% if (controller.class.module_parent.to_s != "Public" && policy(BroadcastRecording).destroy?) %>
|
||||
<%= link_to "Hide", [broadcast.project, broadcast, recording], class: "btn-sm btn-primary ml-1 text-decoration-none", remote: true, method: :delete, data: { confirm: t('.confirm_hide') } %>
|
||||
<% end %>
|
||||
</li>
|
||||
<li><%= link_to(recording.download_file_name, recording.download_url, target: "_blank") %></li>
|
||||
<% end %>
|
||||
</ul>
|
||||
<div id="recordings_pagination" class="row mt-5 justify-content-center">
|
||||
|
||||
@@ -1,9 +1,5 @@
|
||||
<% if broadcast.streamer_recording? && broadcast.active? %>
|
||||
<div id="broadcast_video" class="embed-responsive-item" data-video-type="stream"></div>
|
||||
<% elsif broadcast.director_mode_video_embed.present? && params[:director_mode] == "true" %>
|
||||
<div class="embed-responsive-item" data-video-type="stream">
|
||||
<%= raw broadcast.director_mode_video_embed %>
|
||||
</div>
|
||||
<% else %>
|
||||
<div id="broadcast_video" class="embed-responsive-item" data-video-type="stream">
|
||||
<table class="w-100 h-100 bg-secondary">
|
||||
@@ -16,4 +12,4 @@
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
@@ -39,15 +39,6 @@
|
||||
<%= link_to broadcast.name.titleize, broadcast.url, data: { behavior: "play_stream"}, class: class_string("dropdown-item", "active" => @broadcast.id == broadcast.id) %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% if @broadcast.director_mode_video_embed.present? %>
|
||||
<h5 class="dropdown-header">Director Mode</h5>
|
||||
<% unless params[:director_mode] %>
|
||||
<%= link_to "Enable Director Mode", url_for(params.permit!.merge(director_mode: true)), class: "dropdown-item" %>
|
||||
<% else %>
|
||||
<%= link_to "Disable Director Mode", url_for(params.permit!.except(:director_mode)), class: "dropdown-item" %>
|
||||
|
||||
<% end %>
|
||||
<% end %>
|
||||
<h5 class="dropdown-header">Previous Sessions</h5>
|
||||
<div id="broadcast_recordings_nav">
|
||||
<% if @recordings.any? %>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="<%= I18n.locale %>">
|
||||
<head>
|
||||
<title>MESuite.ai App</title>
|
||||
<title>BiGMedia.ai App</title>
|
||||
<%= csrf_meta_tags %>
|
||||
<%= csp_meta_tag %>
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="<%= I18n.locale %>">
|
||||
<head>
|
||||
<title>MESuite.ai App</title>
|
||||
<title>BiGMedia.ai App</title>
|
||||
<%= csrf_meta_tags %>
|
||||
<%= csp_meta_tag %>
|
||||
|
||||
|
||||
@@ -16,10 +16,10 @@
|
||||
<% end %>
|
||||
</td>
|
||||
<td>
|
||||
<%= contact_info(name: location_release.name, address: location_release.address) %>
|
||||
<%= location_release.name %>
|
||||
</td>
|
||||
<td>
|
||||
<%= contact_info_for(location_release.contact_person) %>
|
||||
<%= contact_info address: location_release.address %>
|
||||
</td>
|
||||
<td>
|
||||
<%= notes_preview location_release.notes.order_by_recent %>
|
||||
|
||||
@@ -28,8 +28,8 @@
|
||||
<th data-behavior="all-selectable"><%= check_box_tag "location_release_ids[]", false, false %></th>
|
||||
<th><%= t '.table_headers.approved'%></th>
|
||||
<th></th>
|
||||
<th><%= t(".table_headers.location_info") %></th>
|
||||
<th><%= t(".table_headers.owner_info") %>
|
||||
<th><%= t(".table_headers.name") %></th>
|
||||
<th><%= t(".table_headers.address") %>
|
||||
<th><%= t(".table_headers.notes") %></th>
|
||||
<th><%= t(".table_headers.tags") %></th>
|
||||
<th><%= t(".table_headers.signed_at") %></th>
|
||||
|
||||
@@ -8,10 +8,6 @@
|
||||
<div class="card-body">
|
||||
<%= errors_summary_for @release %>
|
||||
<%= bootstrap_form_with model: @release, method: :post, url: public_send("account_project_contract_template_#{@contract_template.release_type}_release_amendments_path"), local: true do |form| %>
|
||||
<%= card_field_set_tag t('.signed_contract_preview') do %>
|
||||
<embed class="embeded-contract-preview" type="application/pdf" src="<%= url_for([@release, :contracts, format: "pdf"]) %>" width="80%" height="1200" />
|
||||
<% end %>
|
||||
|
||||
<%= card_field_set_tag t(".amendment.heading") do %>
|
||||
<p><%= @contract_template.amendment_clause %></p>
|
||||
<% end %>
|
||||
|
||||
@@ -10,5 +10,5 @@
|
||||
</p>
|
||||
|
||||
<p>
|
||||
If you have questions about how to use the software, please visit <%= link_to "MESuite.ai", "https://www.mesuite.ai/contact" %>.
|
||||
If you have questions about how to use the software, please visit <%= link_to "BiGMedia.ai", "https://www.bigmedia.ai/contact" %>.
|
||||
</p>
|
||||
|
||||
@@ -7,4 +7,4 @@ Please click below to set your password.
|
||||
<%= edit_password_reset_url(id: @user.password_reset_token, host: AppHost.new.domain_with_port) %>
|
||||
<% end %>
|
||||
|
||||
If you have questions about how to use the software, please visit https://www.mesuite.ai/contact.
|
||||
If you have questions about how to use the software, please visit https://www.bigmedia.ai/contact.
|
||||
|
||||
@@ -111,11 +111,6 @@ en:
|
||||
application:
|
||||
header:
|
||||
sign_out: Sign Out
|
||||
broadcasts:
|
||||
edit:
|
||||
heading: Edit Broadcast
|
||||
update:
|
||||
notice: The broadcast has been updated
|
||||
task_requests:
|
||||
index:
|
||||
empty: Task requests will appear here
|
||||
@@ -223,8 +218,6 @@ en:
|
||||
broadcast:
|
||||
actions:
|
||||
manage: Manage
|
||||
broadcast_recordings:
|
||||
confirm_hide: Are you sure you want to hide this recording from everyone?
|
||||
create:
|
||||
notice: A live stream has been created
|
||||
destroy:
|
||||
@@ -848,11 +841,11 @@ en:
|
||||
search: Search
|
||||
empty: Location Releases will appear here
|
||||
table_headers:
|
||||
address: Address
|
||||
amendment_signed: Amendment
|
||||
approved: Approved
|
||||
location_info: Location Info
|
||||
name: Location Name
|
||||
notes: Notes
|
||||
owner_info: Owner Info
|
||||
signed_at: Date Signed
|
||||
tags: Tags
|
||||
location_release:
|
||||
@@ -1145,7 +1138,6 @@ en:
|
||||
copy_url: Copy sign amendment URL
|
||||
signature:
|
||||
heading: Signature
|
||||
signed_contract_preview: Signed Contract Preview
|
||||
appearance_releases:
|
||||
create:
|
||||
notice: Your release has been signed. Thank you!
|
||||
|
||||
@@ -504,7 +504,6 @@ es:
|
||||
copy_url: Copy sign amendment URL (ES)
|
||||
signature:
|
||||
heading: Signature (ES)
|
||||
signed_contract_preview: Signed Contract Preview (ES)
|
||||
appearance_releases:
|
||||
create:
|
||||
notice: La autorización está firmada. ¡Gracias!
|
||||
|
||||
@@ -35,7 +35,6 @@ Rails.application.routes.draw do
|
||||
resource :masquerade, only: :create
|
||||
end
|
||||
resources :task_requests, only: [:index, :edit, :update, :show]
|
||||
resources :broadcasts, only: [:edit, :update]
|
||||
|
||||
root to: "accounts#index", as: :signed_in_root
|
||||
end
|
||||
@@ -101,7 +100,6 @@ Rails.application.routes.draw do
|
||||
delete :destroy_file
|
||||
end
|
||||
resource :zoom_meeting, only: [:show]
|
||||
resources :broadcast_recordings, only: :destroy
|
||||
end
|
||||
resources :directories, except: [:index] do
|
||||
member do
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
class AddHiddenFieldToBroadcastRecordings < ActiveRecord::Migration[6.0]
|
||||
def change
|
||||
add_column :broadcast_recordings, :hidden, :boolean, default: false
|
||||
end
|
||||
end
|
||||
@@ -1,7 +0,0 @@
|
||||
class AddStreamAndKeyOverrideToBroadcasts < ActiveRecord::Migration[6.0]
|
||||
def change
|
||||
add_column :broadcasts, :stream_url_override, :string
|
||||
add_column :broadcasts, :stream_key_override, :string
|
||||
add_column :broadcasts, :youtube_uid, :string
|
||||
end
|
||||
end
|
||||
@@ -1,5 +0,0 @@
|
||||
class RemoveYoutubeUidFromBroadcasts < ActiveRecord::Migration[6.0]
|
||||
def change
|
||||
remove_column :broadcasts, :youtube_uid, :string
|
||||
end
|
||||
end
|
||||
@@ -1,5 +0,0 @@
|
||||
class AddDirectorModeVideoEmbedToBroadcasts < ActiveRecord::Migration[6.0]
|
||||
def change
|
||||
add_column :broadcasts, :director_mode_video_embed, :text
|
||||
end
|
||||
end
|
||||
@@ -522,8 +522,7 @@ CREATE TABLE public.broadcast_recordings (
|
||||
file_name character varying NOT NULL,
|
||||
created_at timestamp(6) without time zone NOT NULL,
|
||||
updated_at timestamp(6) without time zone NOT NULL,
|
||||
duration double precision,
|
||||
hidden boolean DEFAULT false
|
||||
duration double precision
|
||||
);
|
||||
|
||||
|
||||
@@ -563,10 +562,7 @@ CREATE TABLE public.broadcasts (
|
||||
token character varying,
|
||||
streamer_status integer DEFAULT 0,
|
||||
shoot_location_time_zone character varying DEFAULT 'UTC'::character varying,
|
||||
full_live_stream_playback_uid character varying,
|
||||
stream_url_override character varying,
|
||||
stream_key_override character varying,
|
||||
director_mode_video_embed text
|
||||
full_live_stream_playback_uid character varying
|
||||
);
|
||||
|
||||
|
||||
@@ -3991,11 +3987,7 @@ INSERT INTO "schema_migrations" (version) VALUES
|
||||
('20200720051634'),
|
||||
('20200720131309'),
|
||||
('20200721140821'),
|
||||
('20200724084722'),
|
||||
('20200725231419'),
|
||||
('20200727143209'),
|
||||
('20200730050903'),
|
||||
('20200803145912'),
|
||||
('20200803150138');
|
||||
('20200727143209');
|
||||
|
||||
|
||||
|
||||
7
lib/knock_monkeypatch.rb
Normal file
7
lib/knock_monkeypatch.rb
Normal file
@@ -0,0 +1,7 @@
|
||||
module Knock
|
||||
class AuthTokenController < ApplicationController
|
||||
skip_before_action :authenticate
|
||||
alias authenticate_with_token authenticate
|
||||
before_action :authenticate_with_token
|
||||
end
|
||||
end
|
||||
@@ -35,7 +35,7 @@ RSpec.describe BroadcastsChannel, type: :channel do
|
||||
describe '#stream_recording_ready' do
|
||||
it 'broadcasts to the channel with the right data' do
|
||||
create_list(:broadcast_recording, 1, broadcast: broadcast)
|
||||
recordings = broadcast.broadcast_recordings.visible.paginate(page: 1)
|
||||
recordings = broadcast.broadcast_recordings.paginate(page: 1)
|
||||
flash_message = OpenStruct.new(notice: 'Hello world', alert: nil)
|
||||
flash_content = ApplicationController.render partial: 'application/flash', locals: { flash: flash_message }
|
||||
recordings_content = ApplicationController.render partial: 'broadcasts/broadcast_recordings', locals: { recordings: recordings, broadcast: broadcast }
|
||||
|
||||
@@ -116,16 +116,6 @@ RSpec.describe Admin::AccountsController, type: :controller do
|
||||
expect(response.body).to have_link("2", href: admin_account_path(current_user.primary_account, page: 2))
|
||||
end
|
||||
|
||||
it "paginates the broadcast list" do
|
||||
allow(MuxLiveStream).to receive(:new).and_return(double(id: "id", key: "key", playback_id: "playback_id"))
|
||||
project = create(:project, account: current_user.primary_account)
|
||||
create_list(:broadcast, 20, project: project )
|
||||
|
||||
get :show, params: { id: current_user.primary_account }
|
||||
|
||||
expect(response.body).to have_link("2", href: admin_account_path(current_user.primary_account, page: 2))
|
||||
end
|
||||
|
||||
it "filters the videos by a query param" do
|
||||
project = create(:project, account: current_user.primary_account)
|
||||
create(:video, project: project, name: "First video")
|
||||
|
||||
@@ -1,77 +0,0 @@
|
||||
require "rails_helper"
|
||||
|
||||
RSpec.describe Admin::BroadcastsController, type: :controller do
|
||||
render_views
|
||||
|
||||
let!(:current_user) { create(:user, :admin) }
|
||||
|
||||
before do
|
||||
sign_in(current_user)
|
||||
allow(MuxLiveStream).to receive(:new).and_return(double(id: "id", key: "key", playback_id: "playback_id"))
|
||||
end
|
||||
|
||||
describe "#edit" do
|
||||
let(:broadcast) { create(:broadcast) }
|
||||
|
||||
it "returns a successful response" do
|
||||
get :edit, params: { id: broadcast }
|
||||
|
||||
expect(response).to be_successful
|
||||
end
|
||||
|
||||
it "assigns broadcast" do
|
||||
get :edit, params: { id: broadcast }
|
||||
|
||||
expect(assigns(:broadcast)).to eq broadcast
|
||||
end
|
||||
end
|
||||
|
||||
describe "#update" do
|
||||
let(:broadcast) { create(:broadcast) }
|
||||
|
||||
it "redirects to broadcasts page" do
|
||||
patch :update, params: { id: broadcast, broadcast: broadcast_update_params }
|
||||
|
||||
expect(response).to be_redirect
|
||||
expect(response).to redirect_to [:admin, broadcast.project.account]
|
||||
end
|
||||
|
||||
it "sets a flash notice" do
|
||||
patch :update, params: { id: broadcast, broadcast: broadcast_update_params }
|
||||
|
||||
expect(flash.notice).to eq "The broadcast has been updated"
|
||||
end
|
||||
|
||||
it "updates the broadcast record" do
|
||||
patch :update, params: { id: broadcast, broadcast: broadcast_update_params }
|
||||
|
||||
expect(assigns(:broadcast)).to have_attributes(
|
||||
stream_url_override: "https://example.com/streams/abcd",
|
||||
stream_key_override: "abcdef",
|
||||
)
|
||||
end
|
||||
|
||||
context "when record cannot be saved" do
|
||||
before do
|
||||
allow_any_instance_of(Broadcast).to receive(:update).and_return(false)
|
||||
end
|
||||
|
||||
it "re-displays the form" do
|
||||
patch :update, params: { id: broadcast, broadcast: broadcast_update_params }
|
||||
|
||||
expect(response).to be_successful
|
||||
expect(flash.notice).to be_nil
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def broadcast_update_params
|
||||
{
|
||||
stream_url_override: "https://example.com/streams/abcd",
|
||||
stream_key_override: "abcdef",
|
||||
director_mode_video_embed: "<iframe>Video player</iframe>",
|
||||
}
|
||||
end
|
||||
end
|
||||
63
spec/controllers/api/user_token_controller_spec.rb
Normal file
63
spec/controllers/api/user_token_controller_spec.rb
Normal file
@@ -0,0 +1,63 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
RSpec.describe Api::UserTokenController, type: :request do
|
||||
let(:current_user) { create(:user) }
|
||||
|
||||
describe '#create' do
|
||||
it 'returns error if credentials are not corrent and does not set cookie' do
|
||||
|
||||
post create_endpoint, params: wrong_auth_params
|
||||
|
||||
expect(response).to be_successful
|
||||
expect(response.body).to match record_not_found
|
||||
expect(cookie_data).to eq nil
|
||||
end
|
||||
|
||||
it 'sends token and cookie if credentials are correct' do
|
||||
post create_endpoint, params: correct_auth_params
|
||||
|
||||
expect(response).to be_successful
|
||||
expect(response.body).not_to match record_not_found
|
||||
expect(response.body).to match token_response
|
||||
expect(cookie_data).not_to eq nil
|
||||
end
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def wrong_auth_params
|
||||
{
|
||||
auth: {
|
||||
email: 'wrong_email@api-test.com',
|
||||
password: 'password'
|
||||
}
|
||||
}
|
||||
end
|
||||
|
||||
def correct_auth_params
|
||||
{
|
||||
auth: {
|
||||
email: current_user.email,
|
||||
password: 'password'
|
||||
}
|
||||
}
|
||||
end
|
||||
|
||||
def create_endpoint
|
||||
'/api/v1/user_token'
|
||||
end
|
||||
|
||||
def record_not_found
|
||||
/Record not found/
|
||||
end
|
||||
|
||||
def token_response
|
||||
/jwt/
|
||||
end
|
||||
|
||||
def cookie_data
|
||||
cookies[:_easy_release_session]
|
||||
end
|
||||
end
|
||||
@@ -1,30 +0,0 @@
|
||||
require 'rails_helper'
|
||||
|
||||
RSpec.describe BroadcastRecordingsController, type: :controller do
|
||||
render_views
|
||||
|
||||
let(:user) { create(:user) }
|
||||
let(:account) { user.primary_account }
|
||||
let(:project) { create(:project, account: user.primary_account) }
|
||||
|
||||
before do
|
||||
sign_in user
|
||||
end
|
||||
|
||||
describe "#destroy" do
|
||||
let(:broadcast) { create(:broadcast, project: project, name: "New Broadcast") }
|
||||
let(:recording) { create(:broadcast_recording, broadcast: broadcast) }
|
||||
|
||||
before do
|
||||
allow(MuxLiveStream).to receive(:new).and_return(double(id: "id", key: "key", playback_id: "playback_id"))
|
||||
end
|
||||
|
||||
it "hides the broadcast recording" do
|
||||
expect(recording.hidden).to be false
|
||||
|
||||
post :destroy, params: { project_id: project, broadcast_id: broadcast, id: recording }, xhr: true
|
||||
|
||||
expect(recording.reload.hidden).to be true
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -184,35 +184,6 @@ RSpec.describe BroadcastsController, type: :controller do
|
||||
expect(response.body).to have_selector(".dropdown-menu a.dropdown-item", text: recording.download_file_name)
|
||||
end
|
||||
end
|
||||
|
||||
context "when virtual director video embed is available" do
|
||||
let(:broadcast) { create(:broadcast, project: project, name: "Another Broadcast",
|
||||
director_mode_video_embed: "<iframe>video player</iframe>") }
|
||||
|
||||
it "renders the view dropdown with a director mode enable option" do
|
||||
get :show, params: { project_id: project, id: broadcast }
|
||||
|
||||
expect(response.body).to have_content "Switch View"
|
||||
expect(response.body).to have_selector(".dropdown-menu h5.dropdown-header", text: "Director Mode")
|
||||
expect(response.body).to have_selector(".dropdown-menu a.dropdown-item", text: "Enable Director Mode")
|
||||
end
|
||||
|
||||
context "when director mode is enabled" do
|
||||
it "shows the video embed" do
|
||||
get :show, params: { project_id: project, id: broadcast, director_mode: true }
|
||||
|
||||
expect(response.body).to have_selector("iframe", text: "video player")
|
||||
end
|
||||
|
||||
it "renders the view dropdown with a director mode disable option" do
|
||||
get :show, params: { project_id: project, id: broadcast, director_mode: true }
|
||||
|
||||
expect(response.body).to have_content "Switch View"
|
||||
expect(response.body).to have_selector(".dropdown-menu h5.dropdown-header", text: "Director Mode")
|
||||
expect(response.body).to have_selector(".dropdown-menu a.dropdown-item", text: "Disable Director Mode")
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
describe "#update" do
|
||||
|
||||
@@ -3,7 +3,6 @@ FactoryBot.define do
|
||||
association :broadcast
|
||||
file_name "high.mp4"
|
||||
asset_uid "asset_uid"
|
||||
asset_playback_uid "asset_playback_uid"
|
||||
hidden { false }
|
||||
asset_playback_uid "asset_playback_uid"
|
||||
end
|
||||
end
|
||||
|
||||
@@ -16,17 +16,6 @@ FactoryBot.define do
|
||||
streamer_status "idle"
|
||||
end
|
||||
|
||||
trait :with_overriden_stream do
|
||||
stream_uid "mux_stream"
|
||||
stream_key "mux_key"
|
||||
stream_playback_uid "mux_playback_id"
|
||||
full_live_stream_playback_uid "full_live_stream_playback_uid"
|
||||
status "created"
|
||||
streamer_status "idle"
|
||||
stream_url_override "overriden_stream_url"
|
||||
stream_key_override "overriden_stream_key"
|
||||
end
|
||||
|
||||
trait :with_files do
|
||||
files do
|
||||
[
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
require 'rails_helper'
|
||||
|
||||
feature 'User managing broadcasts' do
|
||||
|
||||
let(:current_user) { create(:user, :manager) }
|
||||
let(:project) { create(:project, members: current_user, account: current_user.primary_account) }
|
||||
|
||||
@@ -51,7 +50,7 @@ feature 'User managing broadcasts' do
|
||||
|
||||
scenario 'visit show page of broadcast', js: true do
|
||||
broadcast = create(:broadcast, :with_stream, :with_files, project: project)
|
||||
recording = create(:broadcast_recording, broadcast: broadcast, asset_uid: "asset_uid_1")
|
||||
recording = create(:broadcast_recording, broadcast: broadcast)
|
||||
|
||||
visit project_broadcast_path(project, broadcast)
|
||||
|
||||
@@ -205,24 +204,6 @@ feature 'User managing broadcasts' do
|
||||
end
|
||||
end
|
||||
|
||||
scenario 'project manager can hide broadcast recordings', js: true do
|
||||
broadcast = create(:broadcast, :with_stream, :with_files, project: project)
|
||||
recording = create(:broadcast_recording, broadcast: broadcast, asset_uid: "another_asset_uid")
|
||||
|
||||
visit project_broadcast_path(project, broadcast)
|
||||
|
||||
click_on 'Previous Sessions'
|
||||
expect(page).to have_content(recording.download_file_name)
|
||||
expect(page).to have_content('Hide')
|
||||
|
||||
accept_alert do
|
||||
click_link "Hide"
|
||||
end
|
||||
|
||||
expect(page).not_to have_content(recording.download_file_name)
|
||||
expect(page).to have_content("Recording of the live stream will appear here")
|
||||
end
|
||||
|
||||
context 'When the user is associate' do
|
||||
let(:current_user) { create(:user, :associate) }
|
||||
|
||||
@@ -240,17 +221,6 @@ feature 'User managing broadcasts' do
|
||||
|
||||
expect(page).to have_content delete_file_button, count: 0
|
||||
end
|
||||
|
||||
scenario 'associate does not see hide button in front of recording' do
|
||||
broadcast = create(:broadcast, :with_stream, :with_files, project: project)
|
||||
recording = create(:broadcast_recording, broadcast: broadcast, asset_uid: "another_asset_uid")
|
||||
|
||||
visit project_broadcast_path(project, broadcast)
|
||||
|
||||
click_on 'Previous Sessions'
|
||||
expect(page).to have_content(recording.download_file_name)
|
||||
expect(page).not_to have_content('Hide')
|
||||
end
|
||||
end
|
||||
|
||||
context 'When the user is account manager' do
|
||||
@@ -277,24 +247,6 @@ feature 'User managing broadcasts' do
|
||||
expect(page).to have_content delete_file_button, count: 2
|
||||
expect(Broadcast.find(broadcast.id).files.count).to eq 2
|
||||
end
|
||||
|
||||
scenario 'account manager can hide broadcast recordings', js: true do
|
||||
broadcast = create(:broadcast, :with_stream, :with_files, project: project)
|
||||
recording = create(:broadcast_recording, broadcast: broadcast, asset_uid: "another_asset_uid")
|
||||
|
||||
visit project_broadcast_path(project, broadcast)
|
||||
|
||||
click_on 'Previous Sessions'
|
||||
expect(page).to have_content(recording.download_file_name)
|
||||
expect(page).to have_content('Hide')
|
||||
|
||||
accept_alert do
|
||||
click_link "Hide"
|
||||
end
|
||||
|
||||
expect(page).not_to have_content(recording.download_file_name)
|
||||
expect(page).to have_content("Recording of the live stream will appear here")
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
@@ -251,9 +251,6 @@ feature "User managing location releases" do
|
||||
new_window = window_opened_by { click_link sign_amendment_link }
|
||||
within_window new_window do
|
||||
expect(page).to have_content amendments_heading
|
||||
expect(page).to have_content signed_contract_preview.upcase
|
||||
|
||||
expect(page).to have_selector 'embed'
|
||||
|
||||
fill_in amendment_signer_name_field, with: 'Big Signer'
|
||||
draw_signature file_fixture("signature.png"), amendment_signature_field
|
||||
@@ -693,10 +690,6 @@ feature "User managing location releases" do
|
||||
t 'public.amendments.new.amendment.heading'
|
||||
end
|
||||
|
||||
def signed_contract_preview
|
||||
t 'public.amendments.new.signed_contract_preview'
|
||||
end
|
||||
|
||||
def amendment_signer_name_field
|
||||
'location_release[amendment_signer_name]'
|
||||
end
|
||||
@@ -748,8 +741,8 @@ feature "User managing location releases" do
|
||||
def table_headers
|
||||
[
|
||||
t('location_releases.index.table_headers.approved'),
|
||||
t('location_releases.index.table_headers.location_info'),
|
||||
t('location_releases.index.table_headers.owner_info'),
|
||||
t('location_releases.index.table_headers.name'),
|
||||
t('location_releases.index.table_headers.address'),
|
||||
t('location_releases.index.table_headers.notes'),
|
||||
t('location_releases.index.table_headers.tags'),
|
||||
t('location_releases.index.table_headers.signed_at'),
|
||||
|
||||
@@ -40,7 +40,7 @@ feature "User managing videos" do
|
||||
expect(page).to have_selector "#video_edl_file", visible: :all
|
||||
expect(page).to have_selector "#video_graphics_only_edl_file", visible: :all
|
||||
expect(page).to have_selector "#video_audio_only_edl_file", visible: :all
|
||||
expect(page).to have_link "click here", href: /mailto:info@mesuite\.ai/
|
||||
expect(page).to have_link "click here", href: /mailto:info@bigmedia\.ai/
|
||||
|
||||
fill_in_video_fields name: "New name", number: "99"
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ RSpec.describe MailHelper, type: :helper do
|
||||
link = CGI.unescape helper.mail_to_for_multiple_edls("test content", project)
|
||||
|
||||
expect(link).to match "test content"
|
||||
expect(link).to match "info@mesuite.ai"
|
||||
expect(link).to match "info@bigmedia.ai"
|
||||
expect(link).to match /Multiple Adobe Premiere EDLs needed for Test Account's Test Project project/
|
||||
expect(link).to match "INSTRUCTIONS"
|
||||
end
|
||||
|
||||
@@ -8,8 +8,8 @@ RSpec.describe AdminMailer do
|
||||
|
||||
it "renders the headers" do
|
||||
expect(mail.subject).to eq("[New Video] Test Account has uploaded a new video")
|
||||
expect(mail.to).to eq(["bray@mesuite.ai"])
|
||||
expect(mail.from).to eq(["support@mesuite.ai"])
|
||||
expect(mail.to).to eq(["bray@bigmedia.ai", "lee@bigmedia.ai"])
|
||||
expect(mail.from).to eq(["support@bigmedia.ai"])
|
||||
end
|
||||
|
||||
it "renders the body" do
|
||||
@@ -24,8 +24,8 @@ RSpec.describe AdminMailer do
|
||||
|
||||
it "renders the headers" do
|
||||
expect(mail.subject).to eq("[Updated Video EDL File] Test Account has updated the EDL file for video_file.mp4")
|
||||
expect(mail.to).to eq(["bray@mesuite.ai"])
|
||||
expect(mail.from).to eq(["support@mesuite.ai"])
|
||||
expect(mail.to).to eq(["bray@bigmedia.ai", "lee@bigmedia.ai"])
|
||||
expect(mail.from).to eq(["support@bigmedia.ai"])
|
||||
end
|
||||
|
||||
it "renders the body" do
|
||||
@@ -41,8 +41,8 @@ RSpec.describe AdminMailer do
|
||||
|
||||
it "renders the headers" do
|
||||
expect(mail.subject).to eq("[Updated Video Graphics Only EDL File] Test Account has updated the Graphics Only EDL file for video_file.mp4")
|
||||
expect(mail.to).to eq(["bray@mesuite.ai"])
|
||||
expect(mail.from).to eq(["support@mesuite.ai"])
|
||||
expect(mail.to).to eq(["bray@bigmedia.ai", "lee@bigmedia.ai"])
|
||||
expect(mail.from).to eq(["support@bigmedia.ai"])
|
||||
end
|
||||
|
||||
it "renders the body" do
|
||||
@@ -58,8 +58,8 @@ RSpec.describe AdminMailer do
|
||||
|
||||
it "renders the headers" do
|
||||
expect(mail.subject).to eq("[Updated Video Audio Only EDL File] Test Account has updated the Audio Only EDL file for video_file.mp4")
|
||||
expect(mail.to).to eq(["bray@mesuite.ai"])
|
||||
expect(mail.from).to eq(["support@mesuite.ai"])
|
||||
expect(mail.to).to eq(["bray@bigmedia.ai", "lee@bigmedia.ai"])
|
||||
expect(mail.from).to eq(["support@bigmedia.ai"])
|
||||
end
|
||||
|
||||
it "renders the body" do
|
||||
|
||||
@@ -8,7 +8,7 @@ describe UserMailer do
|
||||
it "renders the headers" do
|
||||
expect(mail.subject).to eq("Password reset")
|
||||
expect(mail.to).to eq([user.email])
|
||||
expect(mail.from).to eq(["support@mesuite.ai"])
|
||||
expect(mail.from).to eq(["support@bigmedia.ai"])
|
||||
end
|
||||
|
||||
it "renders the body" do
|
||||
@@ -24,7 +24,7 @@ describe UserMailer do
|
||||
it "renders the headers" do
|
||||
expect(mail.subject).to eq("You've been added to a project in the ME Suite")
|
||||
expect(mail.to).to eq([user.email])
|
||||
expect(mail.from).to eq(["support@mesuite.ai"])
|
||||
expect(mail.from).to eq(["support@bigmedia.ai"])
|
||||
end
|
||||
|
||||
it "renders the body" do
|
||||
@@ -50,7 +50,7 @@ describe UserMailer do
|
||||
it "renders the headers" do
|
||||
expect(mail.subject).to eq("Welcome to BiG")
|
||||
expect(mail.to).to eq([user.email])
|
||||
expect(mail.from).to eq(["support@mesuite.ai"])
|
||||
expect(mail.from).to eq(["support@bigmedia.ai"])
|
||||
end
|
||||
|
||||
it "renders the body" do
|
||||
|
||||
@@ -32,7 +32,7 @@ describe AppHost do
|
||||
|
||||
app_domain = AppHost.new(env, "production")
|
||||
|
||||
expect(app_domain.domain).to eq("mesuite.ai")
|
||||
expect(app_domain.domain).to eq("bigmedia.ai")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -49,36 +49,6 @@ RSpec.describe Broadcast, type: :model do
|
||||
expect(broadcast).to have_received(:destroy_mux_live_stream)
|
||||
end
|
||||
end
|
||||
|
||||
context "#stream_server_url" do
|
||||
it "returns mux stream url when overriden stream url is absent" do
|
||||
ENV["MUX_BROADCAST_SERVER_URL"] = "mux_stream"
|
||||
broadcast = create(:broadcast, :with_stream, skip_create_callback: true, name: "My Broadcast")
|
||||
|
||||
expect(broadcast.stream_server_url).to eq("mux_stream")
|
||||
end
|
||||
|
||||
it "returns overriden stream url when it is present" do
|
||||
ENV["MUX_BROADCAST_SERVER_URL"] = "mux_stream"
|
||||
broadcast = create(:broadcast, :with_overriden_stream, skip_create_callback: true, name: "My Broadcast")
|
||||
|
||||
expect(broadcast.stream_server_url).to eq("overriden_stream_url")
|
||||
end
|
||||
end
|
||||
|
||||
context "#stream_server_key" do
|
||||
it "returns mux stream key when overriden stream key is absent" do
|
||||
broadcast = create(:broadcast, :with_stream, skip_create_callback: true, name: "My Broadcast")
|
||||
|
||||
expect(broadcast.stream_server_key).to eq("mux_key")
|
||||
end
|
||||
|
||||
it "returns overriden stream key when it is present" do
|
||||
broadcast = create(:broadcast, :with_overriden_stream, skip_create_callback: true, name: "My Broadcast")
|
||||
|
||||
expect(broadcast.stream_server_key).to eq("overriden_stream_key")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
describe "#zoom_meeting_url" do
|
||||
|
||||
Reference in New Issue
Block a user