Skip to content

Commit

Permalink
chore: revert auto formatting.
Browse files Browse the repository at this point in the history
chore: revert auto formatting.

chore: revert auto formatting.

chore: revert auto formatting.
  • Loading branch information
coofzilla committed Mar 6, 2024
1 parent 3e3fbdb commit 6cb55e0
Show file tree
Hide file tree
Showing 3 changed files with 186 additions and 82 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ WritableMap aspectRatioToNaturalSize(int videoWidth, int videoHeight) {

WritableArray audioTracksToArray(ArrayList<Track> audioTracks) {
WritableArray waAudioTracks = Arguments.createArray();
if (audioTracks != null) {
if( audioTracks != null ){
for (int i = 0; i < audioTracks.size(); ++i) {
Track format = audioTracks.get(i);
WritableMap audioTrack = Arguments.createMap();
Expand All @@ -208,15 +208,15 @@ WritableArray audioTracksToArray(ArrayList<Track> audioTracks) {

WritableArray videoTracksToArray(ArrayList<VideoTrack> videoTracks) {
WritableArray waVideoTracks = Arguments.createArray();
if (videoTracks != null) {
if( videoTracks != null ){
for (int i = 0; i < videoTracks.size(); ++i) {
VideoTrack vTrack = videoTracks.get(i);
WritableMap videoTrack = Arguments.createMap();
videoTrack.putInt("width", vTrack.getWidth());
videoTrack.putInt("height", vTrack.getHeight());
videoTrack.putInt("height",vTrack.getHeight());
videoTrack.putInt("bitrate", vTrack.getBitrate());
videoTrack.putString("codecs", vTrack.getCodecs());
videoTrack.putInt("trackId", vTrack.getId());
videoTrack.putInt("trackId",vTrack.getId());
videoTrack.putBoolean("selected", vTrack.isSelected());
waVideoTracks.pushMap(videoTrack);
}
Expand All @@ -242,12 +242,12 @@ WritableArray textTracksToArray(ArrayList<Track> textTracks) {
}

public void load(double duration, double currentPosition, int videoWidth, int videoHeight,
ArrayList<Track> audioTracks, ArrayList<Track> textTracks, ArrayList<VideoTrack> videoTracks, String trackId) {
ArrayList<Track> audioTracks, ArrayList<Track> textTracks, ArrayList<VideoTrack> videoTracks, String trackId){
WritableArray waAudioTracks = audioTracksToArray(audioTracks);
WritableArray waVideoTracks = videoTracksToArray(videoTracks);
WritableArray waTextTracks = textTracksToArray(textTracks);

load(duration, currentPosition, videoWidth, videoHeight, waAudioTracks, waTextTracks, waVideoTracks, trackId);
load( duration, currentPosition, videoWidth, videoHeight, waAudioTracks, waTextTracks, waVideoTracks, trackId);
}

void load(double duration, double currentPosition, int videoWidth, int videoHeight,
Expand Down Expand Up @@ -281,21 +281,21 @@ WritableMap arrayToObject(String field, WritableArray array) {
return event;
}

public void audioTracks(ArrayList<Track> audioTracks) {
public void audioTracks(ArrayList<Track> audioTracks){
receiveEvent(EVENT_AUDIO_TRACKS, arrayToObject(EVENT_PROP_AUDIO_TRACKS, audioTracksToArray(audioTracks)));
}

public void textTracks(ArrayList<Track> textTracks) {
public void textTracks(ArrayList<Track> textTracks){
receiveEvent(EVENT_TEXT_TRACKS, arrayToObject(EVENT_PROP_TEXT_TRACKS, textTracksToArray(textTracks)));
}

public void textTrackDataChanged(String textTrackData) {
public void textTrackDataChanged(String textTrackData){
WritableMap event = Arguments.createMap();
event.putString(EVENT_PROP_TEXT_TRACK_DATA, textTrackData);
receiveEvent(EVENT_TEXT_TRACK_DATA_CHANGED, event);
}

public void videoTracks(ArrayList<VideoTrack> videoTracks) {
public void videoTracks(ArrayList<VideoTrack> videoTracks){
receiveEvent(EVENT_VIDEO_TRACKS, arrayToObject(EVENT_PROP_VIDEO_TRACKS, videoTracksToArray(videoTracks)));
}

Expand Down Expand Up @@ -391,7 +391,7 @@ void _error(String errorString, Exception exception, String errorCode) {

public void playbackRateChange(float rate) {
WritableMap map = Arguments.createMap();
map.putDouble(EVENT_PROP_PLAYBACK_RATE, (double) rate);
map.putDouble(EVENT_PROP_PLAYBACK_RATE, (double)rate);
receiveEvent(EVENT_PLAYBACK_RATE_CHANGE, map);
}

Expand Down Expand Up @@ -465,8 +465,8 @@ public void receiveAdErrorEvent(AdError error) {
private void receiveEvent(@VideoEvents String type, WritableMap event) {
UIManager uiManager = UIManagerHelper.getUIManager(mReactContext, ViewUtil.getUIManagerType(viewId));

if (uiManager != null) {
uiManager.receiveEvent(UIManagerHelper.getSurfaceId(mReactContext), viewId, type, event);
if(uiManager != null) {
uiManager.receiveEvent(UIManagerHelper.getSurfaceId(mReactContext), viewId, type, event);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ private void updateSurfaceView() {
if (!useTextureView || useSecureView) {
view = new SurfaceView(context);
if (useSecureView) {
((SurfaceView) view).setSecure(true);
((SurfaceView)view).setSecure(true);
}
} else {
view = new TextureView(context);
Expand Down
Loading

0 comments on commit 6cb55e0

Please sign in to comment.