chore(android): clean up logs (#3758)
* perf: ensure we do not provide callback to native if no callback provided from app * chore: rework bufferConfig to make it more generic and reduce ReactExoplayerView code size * chore(android): cleanup logs TAG
This commit is contained in:
parent
2d9484499c
commit
1a48f190f0
@ -588,13 +588,13 @@ public class ReactExoplayerView extends FrameLayout implements
|
|||||||
DrmSessionManager drmSessionManager = initializePlayerDrm(self);
|
DrmSessionManager drmSessionManager = initializePlayerDrm(self);
|
||||||
if (drmSessionManager == null && self.drmUUID != null) {
|
if (drmSessionManager == null && self.drmUUID != null) {
|
||||||
// Failed to intialize DRM session manager - cannot continue
|
// Failed to intialize DRM session manager - cannot continue
|
||||||
DebugLog.e("ExoPlayer Exception", "Failed to initialize DRM Session Manager Framework!");
|
DebugLog.e(TAG, "Failed to initialize DRM Session Manager Framework!");
|
||||||
eventEmitter.error("Failed to initialize DRM Session Manager Framework!", new Exception("DRM Session Manager Framework failure!"), "3003");
|
eventEmitter.error("Failed to initialize DRM Session Manager Framework!", new Exception("DRM Session Manager Framework failure!"), "3003");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (activity == null) {
|
if (activity == null) {
|
||||||
DebugLog.e("ExoPlayer Exception", "Failed to initialize Player!");
|
DebugLog.e(TAG, "Failed to initialize Player!");
|
||||||
eventEmitter.error("Failed to initialize Player!", new Exception("Current Activity is null!"), "1001");
|
eventEmitter.error("Failed to initialize Player!", new Exception("Current Activity is null!"), "1001");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -606,8 +606,8 @@ public class ReactExoplayerView extends FrameLayout implements
|
|||||||
initializePlayerSource(self, drmSessionManager);
|
initializePlayerSource(self, drmSessionManager);
|
||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
self.playerNeedsSource = true;
|
self.playerNeedsSource = true;
|
||||||
DebugLog.e("ExoPlayer Exception", "Failed to initialize Player!");
|
DebugLog.e(TAG, "Failed to initialize Player!");
|
||||||
DebugLog.e("ExoPlayer Exception", ex.toString());
|
DebugLog.e(TAG, ex.toString());
|
||||||
self.eventEmitter.error(ex.toString(), ex, "1001");
|
self.eventEmitter.error(ex.toString(), ex, "1001");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -617,8 +617,8 @@ public class ReactExoplayerView extends FrameLayout implements
|
|||||||
}
|
}
|
||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
self.playerNeedsSource = true;
|
self.playerNeedsSource = true;
|
||||||
DebugLog.e("ExoPlayer Exception", "Failed to initialize Player!");
|
DebugLog.e(TAG, "Failed to initialize Player!");
|
||||||
DebugLog.e("ExoPlayer Exception", ex.toString());
|
DebugLog.e(TAG, ex.toString());
|
||||||
eventEmitter.error(ex.toString(), ex, "1001");
|
eventEmitter.error(ex.toString(), ex, "1001");
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -734,7 +734,7 @@ public class ReactExoplayerView extends FrameLayout implements
|
|||||||
wait();
|
wait();
|
||||||
} catch (InterruptedException ex) {
|
} catch (InterruptedException ex) {
|
||||||
Thread.currentThread().interrupt();
|
Thread.currentThread().interrupt();
|
||||||
DebugLog.e("ExoPlayer Exception", ex.toString());
|
DebugLog.e(TAG, ex.toString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -35,6 +35,7 @@ import javax.annotation.Nullable;
|
|||||||
|
|
||||||
public class ReactExoplayerViewManager extends ViewGroupManager<ReactExoplayerView> {
|
public class ReactExoplayerViewManager extends ViewGroupManager<ReactExoplayerView> {
|
||||||
|
|
||||||
|
private static final String TAG = "ExoViewManager";
|
||||||
private static final String REACT_CLASS = "RCTVideo";
|
private static final String REACT_CLASS = "RCTVideo";
|
||||||
private static final String PROP_SRC = "src";
|
private static final String PROP_SRC = "src";
|
||||||
private static final String PROP_SRC_URI = "uri";
|
private static final String PROP_SRC_URI = "uri";
|
||||||
@ -184,7 +185,7 @@ public class ReactExoplayerViewManager extends ViewGroupManager<ReactExoplayerVi
|
|||||||
try {
|
try {
|
||||||
imageUri = Uri.parse(imageUriString);
|
imageUri = Uri.parse(imageUriString);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
DebugLog.e("ExoPlayer Warning", "Could not parse imageUri in metadata");
|
DebugLog.e(TAG, "Could not parse imageUri in metadata");
|
||||||
}
|
}
|
||||||
|
|
||||||
customMetadata = new MediaMetadata.Builder()
|
customMetadata = new MediaMetadata.Builder()
|
||||||
@ -255,7 +256,7 @@ public class ReactExoplayerViewManager extends ViewGroupManager<ReactExoplayerVi
|
|||||||
videoView.setResizeModeModifier(ResizeMode.RESIZE_MODE_FILL);
|
videoView.setResizeModeModifier(ResizeMode.RESIZE_MODE_FILL);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
DebugLog.w("ExoPlayer Warning", "Unsupported resize mode: " + resizeMode + " - falling back to fit");
|
DebugLog.w(TAG, "Unsupported resize mode: " + resizeMode + " - falling back to fit");
|
||||||
videoView.setResizeModeModifier(ResizeMode.RESIZE_MODE_FIT);
|
videoView.setResizeModeModifier(ResizeMode.RESIZE_MODE_FIT);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user