@@ -15,32 +15,6 @@ import classNames from 'classnames';
1515
1616export class MeetingItem extends Component {
1717
18- componentDidMount ( ) {
19- if ( this . props . meetSoundPlay && this . props . meetSoundPlay . play )
20- this . playSound ( ) ;
21- }
22-
23- componentWillReceiveProps ( nextProps ) {
24- if ( nextProps . meetSoundPlay ) {
25- if ( nextProps . meetSoundPlay . play )
26- this . playSound ( ) ;
27- else
28- this . closeSound ( ) ;
29- }
30- }
31-
32- playSound ( ) {
33- var meetSound = this . refs [ 'meetSound' ] ;
34- meetSound . autoplay = true ;
35- meetSound . loop = true ;
36- } ;
37-
38- closeSound ( ) {
39- var meetSound = this . refs [ 'meetSound' ] ;
40- meetSound . pause ( ) ;
41- meetSound . currentTime = 0 ;
42- }
43-
4418 render ( ) {
4519 const statusColorType = this . props . statusColorType ;
4620 const AVATAR_LIMIT = this . props . avatarLimit ;
@@ -59,9 +33,11 @@ export class MeetingItem extends Component {
5933 onContextMenu = { this . props . onContextMenu } >
6034
6135 < audio
36+ autoPlay
37+ loop
6238 ref = "meetSound"
63- src = { this . props . meetSoundPlay && this . props . meetSoundPlay . src }
64- autoPlay />
39+ muted = { this . props . audioMuted }
40+ src = { this . props . audioSource } />
6541
6642 < div className = "rce-mtitem" >
6743 < div className = "rce-mtitem-top" >
@@ -153,7 +129,8 @@ MeetingItem.defaultProps = {
153129 lazyLoadingImage : undefined ,
154130 avatarLimit : 5 ,
155131 avatars : [ ] ,
156- meetSoundPlay : null ,
132+ audioMuted : true ,
133+ audioSource : null ,
157134 onAvatarError : ( ) => void ( 0 ) ,
158135 onMeetingClick : ( ) => void ( 0 ) ,
159136 onShareClick : ( ) => void ( 0 ) ,
0 commit comments