Rahul21 has uploaded a new change for review.
https://gerrit.wikimedia.org/r/80128
Change subject: Added Upload API support ( WIP )
......................................................................
Added Upload API support ( WIP )
Change-Id: Ib2dc578a38c8278f4c43b999b91c7a77eded5f8b
---
M PronunciationRecording.php
M resources/ext.pronunciationRecording.pronunciationRecorder.js
M resources/ext.pronunciationRecording.specialPage.js
3 files changed, 14 insertions(+), 4 deletions(-)
git pull
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/PronunciationRecording
refs/changes/28/80128/1
diff --git a/PronunciationRecording.php b/PronunciationRecording.php
index 940f2e3..1f1d30f 100644
--- a/PronunciationRecording.php
+++ b/PronunciationRecording.php
@@ -49,5 +49,8 @@
'scripts' => 'ext.pronunciationRecording.specialPage.js',
'styles' => 'css/ext.pronunciationRecordingToolbar.css',
'position' => 'top',
- 'dependencies' => 'ext.pronunciationRecording.pronunciationRecorder',
+ 'dependencies' => array(
+ 'ext.pronunciationRecording.pronunciationRecorder',
+ 'ext.uploadWizard.apiUploadHandler',
+ ),
) + $pronunciationRecordingModuleInfo;
diff --git a/resources/ext.pronunciationRecording.pronunciationRecorder.js
b/resources/ext.pronunciationRecording.pronunciationRecorder.js
index 1d8c87e..a9fb7b3 100644
--- a/resources/ext.pronunciationRecording.pronunciationRecorder.js
+++ b/resources/ext.pronunciationRecording.pronunciationRecorder.js
@@ -1,8 +1,7 @@
( function ( mw, $ ) {
mw.PronunciationRecorder = function( ) {
- var audioContext, recorder;
-
+ var audioContext, recorder, uploadPronunciation;
function startUserMedia( stream ) {
var input = audioContext.createMediaStreamSource(
stream );
mw.log( 'Media Stream created' );
@@ -58,8 +57,12 @@
}
);
}
- }
+ },
+ startUploading : function() {
+ uploadPronunciation = new mw.ApiUploadHandler(
);
+ uploadPronunciation.start();
+ }
}
};
} ( mediaWiki, jQuery ) );
diff --git a/resources/ext.pronunciationRecording.specialPage.js
b/resources/ext.pronunciationRecording.specialPage.js
index 68f242b..56af6ac 100644
--- a/resources/ext.pronunciationRecording.specialPage.js
+++ b/resources/ext.pronunciationRecording.specialPage.js
@@ -22,7 +22,11 @@
$( ".mw-pronunciationrecording-preview-audio"
).remove();
$( ".mw-pronunciationrecording-upload"
).remove();
});
+ $( ".mw-pronunciationrecording-upload" ).on("click",
function() {
+ uploadPronunciation.startUploading();
+ });
$( ".mw-pronunciationrecording-toolbar" ).show();
+
}
catch ( e )
{
--
To view, visit https://gerrit.wikimedia.org/r/80128
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib2dc578a38c8278f4c43b999b91c7a77eded5f8b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/PronunciationRecording
Gerrit-Branch: master
Gerrit-Owner: Rahul21 <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits