|
@@ -598,26 +598,20 @@ function _disposeTracks(tracks) {
|
598
|
598
|
* Implements the {@code Promise} rejection handler of
|
599
|
599
|
* {@code createLocalTracksA} and {@code createLocalTracksF}.
|
600
|
600
|
*
|
601
|
|
- * @param {Object} reason - The {@code Promise} rejection reason.
|
|
601
|
+ * @param {Object} error - The {@code Promise} rejection reason.
|
602
|
602
|
* @param {string} device - The device/{@code MEDIA_TYPE} associated with the
|
603
|
603
|
* rejection.
|
604
|
604
|
* @private
|
605
|
605
|
* @returns {Function}
|
606
|
606
|
*/
|
607
|
|
-function _onCreateLocalTracksRejected({ gum }, device) {
|
|
607
|
+function _onCreateLocalTracksRejected(error, device) {
|
608
|
608
|
return dispatch => {
|
609
|
609
|
// If permissions are not allowed, alert the user.
|
610
|
|
- if (gum) {
|
611
|
|
- const { error } = gum;
|
612
|
|
-
|
613
|
|
- if (error) {
|
614
|
|
- dispatch({
|
615
|
|
- type: TRACK_CREATE_ERROR,
|
616
|
|
- permissionDenied: error.name === 'SecurityError',
|
617
|
|
- trackType: device
|
618
|
|
- });
|
619
|
|
- }
|
620
|
|
- }
|
|
610
|
+ dispatch({
|
|
611
|
+ type: TRACK_CREATE_ERROR,
|
|
612
|
+ permissionDenied: error?.name === 'SecurityError',
|
|
613
|
+ trackType: device
|
|
614
|
+ });
|
621
|
615
|
};
|
622
|
616
|
}
|
623
|
617
|
|