Permalink
Browse files

Fixed issue with playback in Flash Audio Recorder

  • Loading branch information...
1 parent 8f10b35 commit 057f51b2efedf4347d84bde816a00db92312ec68 Ankit Gupta committed Feb 24, 2013
Showing with 11 additions and 6 deletions.
  1. 0 README
  2. 0 callback.php
  3. 0 db/access.php
  4. 0 lang/en/repository_mediacapture.php
  5. 0 lib.php
  6. 0 locallib.php
  7. 0 module.js
  8. BIN pix/icon.png
  9. 0 recorder.php
  10. 0 recorder_form.php
  11. BIN recorders/flashaudiorecorder/assets/expressInstall.swf
  12. BIN recorders/flashaudiorecorder/assets/recorder.swf
  13. 0 recorders/flashaudiorecorder/assets/swfobject.js
  14. 0 recorders/flashaudiorecorder/lib.php
  15. +5 −4 recorders/flashaudiorecorder/module.js
  16. +6 −2 recorders/flashaudiorecorder/record.php
  17. 0 recorders/flashaudiorecorder/styles.css
  18. 0 recorders/nanogong/lib.php
  19. 0 recorders/nanogong/module.js
  20. BIN recorders/nanogong/nanogong.jar
  21. 0 recorders/nanogong/record.php
  22. 0 recorders/nanogong/styles.css
  23. 0 recorders/red5recorder/assets/AC_OETags.js
  24. BIN recorders/red5recorder/assets/assets/Thumbs.db
  25. BIN recorders/red5recorder/assets/assets/back.png
  26. BIN recorders/red5recorder/assets/assets/circle.png
  27. BIN recorders/red5recorder/assets/assets/player_pause.png
  28. BIN recorders/red5recorder/assets/assets/player_play.png
  29. BIN recorders/red5recorder/assets/assets/player_stop.png
  30. BIN recorders/red5recorder/assets/assets/rec32.png
  31. BIN recorders/red5recorder/assets/assets/red48.png
  32. BIN recorders/red5recorder/assets/assets/webcamON.png
  33. BIN recorders/red5recorder/assets/playerProductInstall.swf
  34. 0 recorders/red5recorder/assets/red5recorder-app/WEB-INF/red5-web.properties
  35. 0 recorders/red5recorder/assets/red5recorder-app/WEB-INF/red5-web.xml
  36. 0 recorders/red5recorder/assets/red5recorder-app/WEB-INF/web.xml
  37. BIN recorders/red5recorder/assets/red5recorder.swf
  38. 0 recorders/red5recorder/assets/style.css
  39. 0 recorders/red5recorder/lib.php
  40. 0 recorders/red5recorder/module.js
  41. 0 recorders/red5recorder/record.php
  42. 0 recorders/red5recorder/styles.css
  43. 0 styles.css
  44. 0 version.php
  45. 0 view.php
View
0 README 100644 → 100755
No changes.
View
0 callback.php 100644 → 100755
No changes.
View
0 db/access.php 100644 → 100755
No changes.
View
No changes.
View
0 lib.php 100644 → 100755
No changes.
View
0 locallib.php 100644 → 100755
No changes.
View
0 module.js 100644 → 100755
No changes.
View
0 pix/icon.png 100644 → 100755
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
0 recorder.php 100644 → 100755
No changes.
View
0 recorder_form.php 100644 → 100755
No changes.
No changes.
View
No changes.
View
No changes.
View
No changes.
View
@@ -16,7 +16,7 @@ M.repository_mediacapture_flashaudiorecorder.validate = function (filename, file
var recorder = Y.one('#onlineaudiorecorder').getDOMNode(),
filepath = Y.one('*[name="filepath"]'),
form = Y.one('#mform1');
-
+
filename = filename.replace(/^\s+|\s+$/g,"");
filename = filename.replace(".mp3", "");
if (!filename) {
@@ -37,10 +37,11 @@ M.repository_mediacapture_flashaudiorecorder.validate = function (filename, file
// Make an HTTP POST request to posturl.
cfg = {
method: 'POST',
- data: 'filedata=' + encodeURIComponent(filedata) +
- '&filename=' + filename,
- sync:true
+ data: 'filedata=' + filedata +
+ '&filename=' + filename,
+ sync: true
};
+ //Y.io.header('Content-type', 'application/octet-stream');
var request = Y.io(posturl, cfg);
if (!path) {
alert(M.str.repository_mediacapture.noflashaudiofound);
View
@@ -24,10 +24,14 @@
$client = new repository_mediacapture_flashaudiorecorder();
$tmpdir = $client->temp_dir();
-$tmpdata = required_param('filedata', PARAM_RAW);
$tmpname = required_param('filename', PARAM_TEXT);
+$tmpdata = required_param('filedata', PARAM_RAW);
+
+// While posting the media content, the data is urlencoded which replaces '+' with ' '
+// which breaks the recording when it is played back in multimedia filter
+$tmpdata = str_replace(' ', '+', $tmpdata);
+$tmpdata = base64_decode($tmpdata);
-$tmpdata = urldecode(base64_decode($tmpdata));
// Copy the uploaded file to temp dir and return location.
if ($tmpdata) {
file_put_contents("$tmpdir/$tmpname.mp3", $tmpdata);
View
No changes.
View
0 recorders/nanogong/lib.php 100644 → 100755
No changes.
View
0 recorders/nanogong/module.js 100644 → 100755
No changes.
View
0 recorders/nanogong/nanogong.jar 100644 → 100755
No changes.
View
0 recorders/nanogong/record.php 100644 → 100755
No changes.
View
0 recorders/nanogong/styles.css 100644 → 100755
No changes.
View
No changes.
View
No changes.
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
No changes.
No changes.
No changes.
View
No changes.
View
No changes.
View
0 recorders/red5recorder/lib.php 100644 → 100755
No changes.
View
0 recorders/red5recorder/module.js 100644 → 100755
No changes.
View
0 recorders/red5recorder/record.php 100644 → 100755
No changes.
View
0 recorders/red5recorder/styles.css 100644 → 100755
No changes.
View
0 styles.css 100644 → 100755
No changes.
View
0 version.php 100644 → 100755
No changes.
View
0 view.php 100644 → 100755
No changes.

0 comments on commit 057f51b

Please sign in to comment.