Browse Source

fix(Thumbnail): Improve naming.

master
Hristo Terezov 4 years ago
parent
commit
e990f6984a

+ 6
- 5
react/features/base/media/components/web/AudioTrack.js View File

35
     volume: ?number,
35
     volume: ?number,
36
 
36
 
37
     /**
37
     /**
38
-     * A function that will be executed when the reference to the underlying audio element changes.
38
+     * A function that will be executed when the reference to the underlying audio element changes in order to report
39
+     * the initial volume value.
39
      */
40
      */
40
-    onAudioElementReferenceChanged: Function
41
+    onInitialVolumeSet: Function
41
 };
42
 };
42
 
43
 
43
 /**
44
 /**
207
      */
208
      */
208
     _setRef(audioElement: ?HTMLAudioElement) {
209
     _setRef(audioElement: ?HTMLAudioElement) {
209
         this._ref = audioElement;
210
         this._ref = audioElement;
210
-        const { onAudioElementReferenceChanged } = this.props;
211
+        const { onInitialVolumeSet } = this.props;
211
 
212
 
212
-        if (this._ref && onAudioElementReferenceChanged) {
213
-            onAudioElementReferenceChanged({ volume: this._ref.volume });
213
+        if (this._ref && onInitialVolumeSet) {
214
+            onInitialVolumeSet(this._ref.volume);
214
         }
215
         }
215
     }
216
     }
216
 }
217
 }

+ 10
- 10
react/features/filmstrip/components/web/Thumbnail.js View File

162
 
162
 
163
         this._updateAudioLevel = this._updateAudioLevel.bind(this);
163
         this._updateAudioLevel = this._updateAudioLevel.bind(this);
164
         this._onVolumeChange = this._onVolumeChange.bind(this);
164
         this._onVolumeChange = this._onVolumeChange.bind(this);
165
-        this._onAudioElementReferenceChanged = this._onAudioElementReferenceChanged.bind(this);
165
+        this._onInitialVolumeSet = this._onInitialVolumeSet.bind(this);
166
     }
166
     }
167
 
167
 
168
     /**
168
     /**
308
     }
308
     }
309
 
309
 
310
     /**
310
     /**
311
-     * Renders the top toolbar of the thumbnail.
311
+     * Renders the top indicators of the thumbnail.
312
      *
312
      *
313
      * @returns {Component}
313
      * @returns {Component}
314
      */
314
      */
315
-    _renderTopToolbar() {
315
+    _renderTopIndicators() {
316
         const {
316
         const {
317
             _connectionIndicatorAutoHideEnabled,
317
             _connectionIndicatorAutoHideEnabled,
318
             _connectionIndicatorDisabled,
318
             _connectionIndicatorDisabled,
416
                     <StatusIndicators participantID = { id } />
416
                     <StatusIndicators participantID = { id } />
417
                 </div>
417
                 </div>
418
                 <div className = 'videocontainer__toptoolbar'>
418
                 <div className = 'videocontainer__toptoolbar'>
419
-                    { this._renderTopToolbar() }
419
+                    { this._renderTopIndicators() }
420
                 </div>
420
                 </div>
421
                 <div className = 'videocontainer__hoverOverlay' />
421
                 <div className = 'videocontainer__hoverOverlay' />
422
                 <div className = 'displayNameContainer'>
422
                 <div className = 'displayNameContainer'>
462
                             audioTrack = { _audioTrack }
462
                             audioTrack = { _audioTrack }
463
                             id = { `remoteAudio_${audioTrackId || ''}` }
463
                             id = { `remoteAudio_${audioTrackId || ''}` }
464
                             muted = { _startSilent }
464
                             muted = { _startSilent }
465
-                            onAudioElementReferenceChanged = { this._onAudioElementReferenceChanged }
465
+                            onInitialVolumeSet = { this._onInitialVolumeSet }
466
                             volume = { this.state.volume } />
466
                             volume = { this.state.volume } />
467
                         : null
467
                         : null
468
 
468
 
469
                 }
469
                 }
470
                 <div className = 'videocontainer__background' />
470
                 <div className = 'videocontainer__background' />
471
                 <div className = 'videocontainer__toptoolbar'>
471
                 <div className = 'videocontainer__toptoolbar'>
472
-                    { this._renderTopToolbar() }
472
+                    { this._renderTopIndicators() }
473
                 </div>
473
                 </div>
474
                 <div className = 'videocontainer__toolbar'>
474
                 <div className = 'videocontainer__toolbar'>
475
                     <StatusIndicators participantID = { id } />
475
                     <StatusIndicators participantID = { id } />
501
         );
501
         );
502
     }
502
     }
503
 
503
 
504
-    _onAudioElementReferenceChanged: Object => void;
504
+    _onInitialVolumeSet: Object => void;
505
 
505
 
506
     /**
506
     /**
507
-     * Handles audio element references changes by receiving some properties from the audio element.
507
+     * A handler for the initial volume value of the audio element.
508
      *
508
      *
509
-     * @param {Obejct} audioElementProps - Properties of the audio element.
509
+     * @param {number} volume - Properties of the audio element.
510
      * @returns {void}
510
      * @returns {void}
511
      */
511
      */
512
-    _onAudioElementReferenceChanged({ volume }) {
512
+    _onInitialVolumeSet(volume) {
513
         if (this.state.volume !== volume) {
513
         if (this.state.volume !== volume) {
514
             this.setState({ volume });
514
             this.setState({ volume });
515
         }
515
         }

Loading…
Cancel
Save