Skip to content

Commit 6774962

Browse files
committed
audio/video recorders in one swf file
We've made modifications to Kaltura's swf recorder that will allow it to record either just audio or audio and video, with both options now available from the same swf file. I've also made some additional tweaks to the UI to help clean things up in this interface. Also included a fix for enabling storing to Kaltura over SSL. Change-Id: Ia30b407ea1f0b049f7553d11195fceee75f23e7a Reviewed-on: https://gerrit.instructure.com/3404 Tested-by: Hudson <[email protected]> Reviewed-by: Zach Wily <[email protected]>
1 parent 5a895d6 commit 6774962

File tree

6 files changed

+19
-14
lines changed

6 files changed

+19
-14
lines changed

Diff for: app/stylesheets/g_media_comments.sass

+6-3
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,14 @@
2424
width: 600px
2525
height: 600px
2626
z-index: 9999
27-
background-color: #888
27+
background-color: #666666
2828
position: absolute
2929
display: none
3030
.recorder_message
3131
color: #eee
3232
font-size: 1.5em
3333
opacity: 1.0
34-
margin: 100px 20px
34+
margin: 120px 55px
3535
width: 300px
3636
text-align: center
3737
&.saving
@@ -78,7 +78,10 @@ div#audio_upload,div#video_upload
7878
height: 300px
7979
overflow: hidden
8080
position: relative
81-
border: 2px solid #888
81+
border: 0
82+
background: #fff url(/images/ajax-loader-medium-444.gif) no-repeat 10px 10px
83+
+box-shadow( rgba(0,0,0,1.0), 0, 0, 10px)
84+
margin: 10px
8285

8386
#audio_record,#video_record
8487
border: 0px solid #888

Diff for: public/javascripts/media_comments.js

+11-9
Original file line numberDiff line numberDiff line change
@@ -413,8 +413,8 @@
413413
$dialog.dialog('close').dialog({
414414
autoOpen: false,
415415
title: "Record/Upload Media Comment",
416-
width: 530,
417-
height: 440,
416+
width: 560,
417+
height: 460,
418418
modal: (opts.modal == false ? false : true)
419419
}).dialog('open');
420420
$dialog.dialog('option', 'close', function() {
@@ -451,7 +451,7 @@
451451
var temporaryName = $.trim($("#identity .user_name").text()) + " " + (new Date()).toISOString();
452452
setTimeout(function() {
453453
var recordVars = {
454-
host:INST.kalturaSettings.domain,
454+
host:location.protocol + "//" + INST.kalturaSettings.domain,
455455
rtmpHost:"rtmp://" + INST.kalturaSettings.domain,
456456
kshowId:"-1",
457457
pid:INST.kalturaSettings.partner_id,
@@ -463,7 +463,7 @@
463463
thumbOffset:"1",
464464
licenseType:"CC-0.1",
465465
showUi:"true",
466-
useCamera:"false",
466+
useCamera:"0",
467467
maxFileSize: INST.kalturaSettings.max_file_size_bytes / 1048576,
468468
maxUploads: 1,
469469
partnerData: $.mediaComment.partnerData(),
@@ -481,11 +481,12 @@
481481
"wmode": "opaque"
482482
}
483483
$("#audio_record").html("Flash required for recording audio.")
484-
swfobject.embedSWF("/media_record/KRecordAudio.swf", "audio_record", "400", "300", "9.0.0", false, recordVars, params);
484+
swfobject.embedSWF("/media_record/KRecord.swf", "audio_record", "400", "300", "9.0.0", false, recordVars, params);
485485

486-
var params = $.extend({}, params, {name: 'KRecordVideo'})
486+
var params = $.extend({}, params, {name: 'KRecordVideo'});
487+
var recordVars = $.extend({}, recordVars, {useCamera: '1'});
487488
$("#video_record").html("Flash required for recording video.")
488-
swfobject.embedSWF("/media_record/KRecordVideo.swf", "video_record", "400", "300", "9.0.0", false, recordVars, params);
489+
swfobject.embedSWF("/media_record/KRecord.swf", "video_record", "400", "300", "9.0.0", false, recordVars, params);
489490
// give the dialog time to initialize or the recorder will
490491
// render funky in ie
491492
}, INST.browser.ie ? 500 : 10);
@@ -607,7 +608,8 @@
607608
$div.dialog('close').dialog({
608609
autoOpen: false,
609610
title: "Record/Upload Media Comment",
610-
width: 450,
611+
resizable: false,
612+
width: 470,
611613
height: 300
612614
}).dialog('open');
613615
$.ajaxJSON('/dashboard/comment_session', 'GET', {}, function(data) {
@@ -719,7 +721,7 @@ function beforeAddEntry() {
719721
if($.mediaComment.lastAddAttemptId == attemptId) {
720722
$(document).triggerHandler('media_recording_error');
721723
}
722-
}, 300000);
724+
}, 30000);
723725
$("#audio_record_holder_message,#video_record_holder_message").addClass('saving');
724726
}
725727
function addEntryFail() {

Diff for: public/media_record/KRecord.swf

-32.4 KB
Binary file not shown.

Diff for: public/media_record/KRecordAudio.swf

-101 KB
Binary file not shown.

Diff for: public/media_record/KRecordVideo.swf

-68.3 KB
Binary file not shown.

Diff for: public/partials/_media_comments.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
<div id="video_record_holder_message">
2323
<div class="recorder_message">Saving Recording...</div>
2424
</div>
25-
<div style="margin-bottom: 1px;">
25+
<div style="margin-bottom: 1px; margin-left: 10px;">
2626
Title: <input id="video_record_title" type="text" style="width: 250px;"/>
2727
</div>
2828
<div id="video_record_holder">
@@ -46,7 +46,7 @@
4646
<div id="audio_record_holder_message">
4747
<div class="recorder_message">Saving Recording...</div>
4848
</div>
49-
<div style="margin-bottom: 1px;">
49+
<div style="margin-bottom: 1px; margin-left: 10px;">
5050
Title: <input id="audio_record_title" type="text" style="width: 250px;"/>
5151
</div>
5252
<div id="audio_record_holder">

0 commit comments

Comments
 (0)