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);
|
||||
if (drmSessionManager == null && self.drmUUID != null) {
|
||||
// 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");
|
||||
return;
|
||||
}
|
||||
|
||||
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");
|
||||
return;
|
||||
}
|
||||
@ -606,8 +606,8 @@ public class ReactExoplayerView extends FrameLayout implements
|
||||
initializePlayerSource(self, drmSessionManager);
|
||||
} catch (Exception ex) {
|
||||
self.playerNeedsSource = true;
|
||||
DebugLog.e("ExoPlayer Exception", "Failed to initialize Player!");
|
||||
DebugLog.e("ExoPlayer Exception", ex.toString());
|
||||
DebugLog.e(TAG, "Failed to initialize Player!");
|
||||
DebugLog.e(TAG, ex.toString());
|
||||
self.eventEmitter.error(ex.toString(), ex, "1001");
|
||||
}
|
||||
});
|
||||
@ -617,8 +617,8 @@ public class ReactExoplayerView extends FrameLayout implements
|
||||
}
|
||||
} catch (Exception ex) {
|
||||
self.playerNeedsSource = true;
|
||||
DebugLog.e("ExoPlayer Exception", "Failed to initialize Player!");
|
||||
DebugLog.e("ExoPlayer Exception", ex.toString());
|
||||
DebugLog.e(TAG, "Failed to initialize Player!");
|
||||
DebugLog.e(TAG, ex.toString());
|
||||
eventEmitter.error(ex.toString(), ex, "1001");
|
||||
}
|
||||
};
|
||||
@ -734,7 +734,7 @@ public class ReactExoplayerView extends FrameLayout implements
|
||||
wait();
|
||||
} catch (InterruptedException ex) {
|
||||
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> {
|
||||
|
||||
private static final String TAG = "ExoViewManager";
|
||||
private static final String REACT_CLASS = "RCTVideo";
|
||||
private static final String PROP_SRC = "src";
|
||||
private static final String PROP_SRC_URI = "uri";
|
||||
@ -184,7 +185,7 @@ public class ReactExoplayerViewManager extends ViewGroupManager<ReactExoplayerVi
|
||||
try {
|
||||
imageUri = Uri.parse(imageUriString);
|
||||
} 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()
|
||||
@ -255,7 +256,7 @@ public class ReactExoplayerViewManager extends ViewGroupManager<ReactExoplayerVi
|
||||
videoView.setResizeModeModifier(ResizeMode.RESIZE_MODE_FILL);
|
||||
break;
|
||||
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);
|
||||
break;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user