Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
W
ww_spelling
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
template admin
ww_spelling
Commits
4ca5d838
Commit
4ca5d838
authored
Aug 26, 2020
by
liujiaxin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: add audio record
parent
ed92b4d3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
1 deletion
+11
-1
audio-recorder.component.ts
src/app/common/audio-recorder/audio-recorder.component.ts
+11
-1
No files found.
src/app/common/audio-recorder/audio-recorder.component.ts
View file @
4ca5d838
import
{
Component
,
EventEmitter
,
Input
,
OnDestroy
,
OnInit
,
Output
,
NgZone
,
OnChanges
}
from
'
@angular/core
'
;
import
{
ApplicationRef
,
ChangeDetectorRef
,
Component
,
EventEmitter
,
Input
,
OnDestroy
,
OnInit
,
Output
,
NgZone
,
OnChanges
}
from
'
@angular/core
'
;
import
{
NzMessageService
,
NzNotificationService
,
UploadFile
}
from
'
ng-zorro-antd
'
;
import
{
NzMessageService
,
NzNotificationService
,
UploadFile
}
from
'
ng-zorro-antd
'
;
import
{
HttpClient
,
HttpEvent
,
HttpEventType
,
HttpRequest
}
from
'
@angular/common/http
'
;
import
{
HttpClient
,
HttpEvent
,
HttpEventType
,
HttpRequest
}
from
'
@angular/common/http
'
;
import
{
environment
}
from
'
../../../environments/environment
'
;
import
{
environment
}
from
'
../../../environments/environment
'
;
...
@@ -57,6 +57,8 @@ export class AudioRecorderComponent implements OnInit, OnChanges, OnDestroy {
...
@@ -57,6 +57,8 @@ export class AudioRecorderComponent implements OnInit, OnChanges, OnDestroy {
constructor
(
private
nzMessageService
:
NzMessageService
,
constructor
(
private
nzMessageService
:
NzMessageService
,
private
zone
:
NgZone
,
private
zone
:
NgZone
,
private
nzNotificationService
:
NzNotificationService
,
private
nzNotificationService
:
NzNotificationService
,
private
appRef
:
ApplicationRef
,
private
changeDetectorRef
:
ChangeDetectorRef
,
private
httpClient
:
HttpClient
)
{
private
httpClient
:
HttpClient
)
{
this
.
uploadUrl
=
(
<
any
>
window
).
courseware
.
uploadUrl
();
this
.
uploadUrl
=
(
<
any
>
window
).
courseware
.
uploadUrl
();
this
.
uploadData
=
(
<
any
>
window
).
courseware
.
uploadData
();
this
.
uploadData
=
(
<
any
>
window
).
courseware
.
uploadData
();
...
@@ -214,6 +216,14 @@ export class AudioRecorderComponent implements OnInit, OnChanges, OnDestroy {
...
@@ -214,6 +216,14 @@ export class AudioRecorderComponent implements OnInit, OnChanges, OnDestroy {
}
else
{
}
else
{
this
.
type
=
Type
.
RECORD
;
this
.
type
=
Type
.
RECORD
;
}
}
this
.
changeDetectorRef
.
markForCheck
();
this
.
changeDetectorRef
.
detectChanges
();
this
.
refresh
();
}
refresh
()
{
setTimeout
(()
=>
{
this
.
appRef
.
tick
();
},
1
);
}
}
onBtnClearAudio
()
{
onBtnClearAudio
()
{
this
.
audioUrl
=
null
;
this
.
audioUrl
=
null
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment