diff --git a/app/assets/javascripts/play_previous_recordings.js b/app/assets/javascripts/play_previous_recordings.js
deleted file mode 100644
index f2d1212..0000000
--- a/app/assets/javascripts/play_previous_recordings.js
+++ /dev/null
@@ -1,24 +0,0 @@
-$(document).on("click", "[data-behavior=play_recording]", function() {
- if ($(this).hasClass('active')){
- return false;
- }
-
- var playback_url = $(this).attr("data-playback-url")
- $("#broadcast_video").empty();
-
- new Clappr.Player({
- parentId: '#broadcast_video',
- source: playback_url,
- width: '100%',
- height: '100%',
- autoPlay: true
- });
-
- $(".dropdown-menu").children().removeClass('active');
- $(".dropdown-menu").children().children('i').remove();
- $(this).siblings().removeClass('active');
- $(this).siblings().children("i").remove();
- $(this).addClass('active');
- $(this).prepend(' ');
-});
-
diff --git a/app/assets/javascripts/play_previous_recordings.js.erb b/app/assets/javascripts/play_previous_recordings.js.erb
new file mode 100644
index 0000000..c3c7b49
--- /dev/null
+++ b/app/assets/javascripts/play_previous_recordings.js.erb
@@ -0,0 +1,26 @@
+$(document).on("click", "[data-behavior=play_recording]", function() {
+ if ($(this).hasClass('active')){
+ return false;
+ }
+
+ console.warn('Play prev : ', playback_url);
+
+ var playback_url = $(this).attr("data-playback-url")
+ $("#broadcast_video").empty();
+
+ new Clappr.Player({
+ <%= "baseUrl: 'http://cdn.clappr.io/latest'," if Rails.env.test? %>
+ parentId: '#broadcast_video',
+ source: playback_url,
+ width: '100%',
+ height: '100%',
+ autoPlay: true
+ });
+
+ $(".dropdown-menu").children().removeClass('active');
+ $(".dropdown-menu").children().children('i').remove();
+ $(this).siblings().removeClass('active');
+ $(this).siblings().children("i").remove();
+ $(this).addClass('active');
+ $(this).prepend(' ');
+});
\ No newline at end of file