From 11735bed886724b761d9726931e2e5f93995db50 Mon Sep 17 00:00:00 2001 From: chinloong Date: Tue, 11 Jul 2017 16:18:26 +0800 Subject: [PATCH 01/53] Fix nil string parameter error --- Video.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Video.js b/Video.js index 4d69b333..b7c6b89d 100644 --- a/Video.js +++ b/Video.js @@ -162,6 +162,8 @@ export default class Video extends Component { let uri = source.uri || ''; if (uri && uri.match(/^\//)) { uri = `file://${uri}`; + } else if (uri === '') { + return null; } const isNetwork = !!(uri && uri.match(/^https?:/)); From 94bceb472bce35b08e04b2e93bb0c11096ce30fe Mon Sep 17 00:00:00 2001 From: Tuan Luong Date: Sat, 4 Jul 2020 17:41:15 +0700 Subject: [PATCH 02/53] add fullscreen activity --- .../ExoPlayerFullscreenVideoActivity.java | 107 ++++++++++++++++++ .../brentvatne/exoplayer/ExoPlayerView.java | 3 - .../exoplayer/ReactExoplayerView.java | 91 ++++++++++----- .../res/layout/exo_player_control_view.xml | 19 +++- .../layout/exo_player_fullscreen_video.xml | 18 +++ android/src/main/AndroidManifest.xml | 8 +- 6 files changed, 211 insertions(+), 35 deletions(-) create mode 100644 android-exoplayer/src/main/java/com/brentvatne/exoplayer/ExoPlayerFullscreenVideoActivity.java create mode 100644 android-exoplayer/src/main/res/layout/exo_player_fullscreen_video.xml diff --git a/android-exoplayer/src/main/java/com/brentvatne/exoplayer/ExoPlayerFullscreenVideoActivity.java b/android-exoplayer/src/main/java/com/brentvatne/exoplayer/ExoPlayerFullscreenVideoActivity.java new file mode 100644 index 00000000..1f2ee1d5 --- /dev/null +++ b/android-exoplayer/src/main/java/com/brentvatne/exoplayer/ExoPlayerFullscreenVideoActivity.java @@ -0,0 +1,107 @@ +package com.brentvatne.exoplayer; + +import android.os.Bundle; +import android.view.View; +import android.widget.ImageView; + +import androidx.appcompat.app.AppCompatActivity; + +import com.brentvatne.react.R; +import com.google.android.exoplayer2.Player; +import com.google.android.exoplayer2.SimpleExoPlayer; +import com.google.android.exoplayer2.ui.PlayerControlView; + +public class ExoPlayerFullscreenVideoActivity extends AppCompatActivity implements ReactExoplayerView.FullScreenDelegate { + public static final String EXTRA_ID = "extra_id"; + public static final String EXTRA_IS_PLAYING = "extra_is_playing"; + + private int id; + private PlayerControlView playerControlView; + private SimpleExoPlayer player; + + @Override + public void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.exo_player_fullscreen_video); + id = getIntent().getIntExtra(EXTRA_ID, -1); + player = ReactExoplayerView.getViewInstance(id).getPlayer(); + + ExoPlayerView playerView = findViewById(R.id.player_view); + playerView.setPlayer(player); + playerView.setOnClickListener(v -> togglePlayerControlVisibility()); + + playerControlView = findViewById(R.id.player_controls); + playerControlView.setPlayer(player); + // Set the fullscreen button to "close fullscreen" icon + ImageView fullscreenIcon = playerControlView.findViewById(R.id.exo_fullscreen_icon); + fullscreenIcon.setImageResource(R.drawable.exo_controls_fullscreen_exit); + playerControlView.findViewById(R.id.exo_fullscreen_button) + .setOnClickListener(v -> finish()); + } + + @Override + public void onResume() { + super.onResume(); + boolean isPlaying = getIntent().getBooleanExtra(EXTRA_IS_PLAYING, false); + player.setPlayWhenReady(isPlaying); + ReactExoplayerView.getViewInstance(id).registerFullScreenDelegate(this); + } + + @Override + public void onPause() { + super.onPause(); + boolean isPlaying = player.getPlayWhenReady() && player.getPlaybackState() == Player.STATE_READY; + ReactExoplayerView.getViewInstance(id).setPausedModifier(!isPlaying); + player.setPlayWhenReady(false); + ReactExoplayerView.getViewInstance(id).registerFullScreenDelegate(null); + } + + @Override + public void onWindowFocusChanged(boolean hasFocus) { + super.onWindowFocusChanged(hasFocus); + if (hasFocus) { + hideSystemUI(); + } + } + + private void togglePlayerControlVisibility() { + if (playerControlView.isVisible()) { + playerControlView.hide(); + } else { + playerControlView.show(); + } + } + + /** + * Enables regular immersive mode. + */ + private void hideSystemUI() { + View decorView = getWindow().getDecorView(); + decorView.setSystemUiVisibility( + View.SYSTEM_UI_FLAG_IMMERSIVE + // Set the content to appear under the system bars so that the + // content doesn't resize when the system bars hide and show. + | View.SYSTEM_UI_FLAG_LAYOUT_STABLE + | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION + | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN + // Hide the nav bar and status bar + | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION + | View.SYSTEM_UI_FLAG_FULLSCREEN); + } + + /** + * Shows the system bars by removing all the flags + * except for the ones that make the content appear under the system bars. + */ + private void showSystemUI() { + View decorView = getWindow().getDecorView(); + decorView.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_STABLE + | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION + | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN); + } + + @Override + public void closeFullScreen() { + finish(); + } +} diff --git a/android-exoplayer/src/main/java/com/brentvatne/exoplayer/ExoPlayerView.java b/android-exoplayer/src/main/java/com/brentvatne/exoplayer/ExoPlayerView.java index afa5106c..1a244f29 100644 --- a/android-exoplayer/src/main/java/com/brentvatne/exoplayer/ExoPlayerView.java +++ b/android-exoplayer/src/main/java/com/brentvatne/exoplayer/ExoPlayerView.java @@ -120,9 +120,6 @@ public final class ExoPlayerView extends FrameLayout { * @param player The {@link SimpleExoPlayer} to use. */ public void setPlayer(SimpleExoPlayer player) { - if (this.player == player) { - return; - } if (this.player != null) { this.player.setTextOutput(null); this.player.setVideoListener(null); diff --git a/android-exoplayer/src/main/java/com/brentvatne/exoplayer/ReactExoplayerView.java b/android-exoplayer/src/main/java/com/brentvatne/exoplayer/ReactExoplayerView.java index 4e6fea58..6cd6b844 100644 --- a/android-exoplayer/src/main/java/com/brentvatne/exoplayer/ReactExoplayerView.java +++ b/android-exoplayer/src/main/java/com/brentvatne/exoplayer/ReactExoplayerView.java @@ -1,8 +1,8 @@ package com.brentvatne.exoplayer; import android.annotation.SuppressLint; -import android.app.Activity; import android.content.Context; +import android.content.Intent; import android.media.AudioManager; import android.net.Uri; import android.os.Handler; @@ -10,10 +10,12 @@ import android.os.Message; import android.text.TextUtils; import android.util.Log; import android.view.View; -import android.view.Window; import android.view.accessibility.CaptioningManager; import android.widget.FrameLayout; -import android.widget.ImageButton; + +import androidx.fragment.app.Fragment; +import androidx.fragment.app.FragmentActivity; +import androidx.fragment.app.FragmentTransaction; import com.brentvatne.react.R; import com.brentvatne.receiver.AudioBecomingNoisyReceiver; @@ -25,28 +27,33 @@ import com.facebook.react.bridge.ReadableArray; import com.facebook.react.bridge.ReadableMap; import com.facebook.react.bridge.WritableArray; import com.facebook.react.bridge.WritableMap; +import com.facebook.react.modules.timepicker.TimePickerDialogFragment; +import com.facebook.react.uimanager.NativeViewHierarchyManager; import com.facebook.react.uimanager.ThemedReactContext; +import com.facebook.react.uimanager.UIBlock; +import com.facebook.react.uimanager.UIManagerModule; import com.google.android.exoplayer2.C; import com.google.android.exoplayer2.DefaultLoadControl; -import com.google.android.exoplayer2.DefaultRenderersFactory; import com.google.android.exoplayer2.ExoPlaybackException; +import com.google.android.exoplayer2.ExoPlayer; import com.google.android.exoplayer2.ExoPlayerFactory; import com.google.android.exoplayer2.Format; import com.google.android.exoplayer2.PlaybackParameters; import com.google.android.exoplayer2.Player; import com.google.android.exoplayer2.SimpleExoPlayer; import com.google.android.exoplayer2.Timeline; +import com.google.android.exoplayer2.extractor.DefaultExtractorsFactory; import com.google.android.exoplayer2.mediacodec.MediaCodecRenderer; import com.google.android.exoplayer2.mediacodec.MediaCodecUtil; import com.google.android.exoplayer2.metadata.Metadata; -import com.google.android.exoplayer2.metadata.MetadataOutput; +import com.google.android.exoplayer2.metadata.MetadataRenderer; import com.google.android.exoplayer2.source.BehindLiveWindowException; +import com.google.android.exoplayer2.source.ExtractorMediaSource; import com.google.android.exoplayer2.source.MediaSource; import com.google.android.exoplayer2.source.MergingMediaSource; -import com.google.android.exoplayer2.source.ProgressiveMediaSource; import com.google.android.exoplayer2.source.SingleSampleMediaSource; -import com.google.android.exoplayer2.source.TrackGroup; import com.google.android.exoplayer2.source.TrackGroupArray; +import com.google.android.exoplayer2.source.TrackGroup; import com.google.android.exoplayer2.source.dash.DashMediaSource; import com.google.android.exoplayer2.source.dash.DefaultDashChunkSource; import com.google.android.exoplayer2.source.hls.HlsMediaSource; @@ -57,17 +64,20 @@ import com.google.android.exoplayer2.trackselection.DefaultTrackSelector; import com.google.android.exoplayer2.trackselection.MappingTrackSelector; import com.google.android.exoplayer2.trackselection.TrackSelection; import com.google.android.exoplayer2.trackselection.TrackSelectionArray; -import com.google.android.exoplayer2.ui.PlayerControlView; -import com.google.android.exoplayer2.upstream.BandwidthMeter; import com.google.android.exoplayer2.upstream.DataSource; import com.google.android.exoplayer2.upstream.DefaultAllocator; +import com.google.android.exoplayer2.upstream.BandwidthMeter; import com.google.android.exoplayer2.upstream.DefaultBandwidthMeter; -import com.google.android.exoplayer2.upstream.HttpDataSource; import com.google.android.exoplayer2.util.Util; +import com.google.android.exoplayer2.ui.PlayerControlView; import java.net.CookieHandler; import java.net.CookieManager; import java.net.CookiePolicy; +import java.lang.Math; +import java.util.HashMap; +import java.util.Map; +import java.lang.Object; import java.util.ArrayList; import java.util.Locale; import java.util.Map; @@ -91,6 +101,11 @@ class ReactExoplayerView extends FrameLayout implements DEFAULT_COOKIE_MANAGER.setCookiePolicy(CookiePolicy.ACCEPT_ORIGINAL_SERVER); } + private static Map instances = new HashMap<>(); + private static int UNIQUE_ID = 0; + private int uid = ++UNIQUE_ID; + private FullScreenDelegate fullScreenDelegate; + private final VideoEventEmitter eventEmitter; private final ReactExoplayerConfig config; private final DefaultBandwidthMeter bandwidthMeter; @@ -187,7 +202,6 @@ class ReactExoplayerView extends FrameLayout implements createViews(); audioManager = (AudioManager) context.getSystemService(Context.AUDIO_SERVICE); - themedReactContext.addLifecycleEventListener(this); audioBecomingNoisyReceiver = new AudioBecomingNoisyReceiver(themedReactContext); initializePlayer(); @@ -235,6 +249,7 @@ class ReactExoplayerView extends FrameLayout implements @Override public void onHostResume() { + exoPlayerView.setPlayer(player); if (!playInBackground || !isInBackground) { setPlayWhenReady(!isPaused); } @@ -275,6 +290,22 @@ class ReactExoplayerView extends FrameLayout implements } } + public static ReactExoplayerView getViewInstance(Integer uid) { + return instances.get(uid); + } + + public SimpleExoPlayer getPlayer() { + return player; + } + + public boolean isPaused() { + return isPaused; + } + + public void registerFullScreenDelegate(FullScreenDelegate delegate) { + this.fullScreenDelegate = delegate; + } + // Internal methods /** @@ -290,6 +321,15 @@ class ReactExoplayerView extends FrameLayout implements } } + private void showFullscreen() { + instances.put(uid, this); + Intent intent = new Intent(getContext(), ExoPlayerFullscreenVideoActivity.class); + intent.putExtra(ExoPlayerFullscreenVideoActivity.EXTRA_ID, this.uid); + boolean isPlaying = player.getPlayWhenReady() && player.getPlaybackState() == Player.STATE_READY; + intent.putExtra(ExoPlayerFullscreenVideoActivity.EXTRA_IS_PLAYING, isPlaying); + getContext().startActivity(intent); + } + /** * Initializing Player control */ @@ -302,6 +342,7 @@ class ReactExoplayerView extends FrameLayout implements playerControlView.setPlayer(player); playerControlView.show(); playPauseControlContainer = playerControlView.findViewById(R.id.exo_play_pause_container); + playerControlView.findViewById(R.id.exo_fullscreen_button).setOnClickListener(v -> showFullscreen()); // Invoking onClick event for exoplayerView exoPlayerView.setOnClickListener(new OnClickListener() { @@ -374,6 +415,7 @@ class ReactExoplayerView extends FrameLayout implements } private void initializePlayer() { + themedReactContext.addLifecycleEventListener(this); ReactExoplayerView self = this; // This ensures all props have been settled, to avoid async racing conditions. new Handler().postDelayed(new Runnable() { @@ -1217,30 +1259,15 @@ class ReactExoplayerView extends FrameLayout implements return; // Avoid generating events when nothing is changing } isFullscreen = fullscreen; - - Activity activity = themedReactContext.getCurrentActivity(); - if (activity == null) { - return; - } - Window window = activity.getWindow(); - View decorView = window.getDecorView(); - int uiOptions; if (isFullscreen) { - if (Util.SDK_INT >= 19) { // 4.4+ - uiOptions = SYSTEM_UI_FLAG_HIDE_NAVIGATION - | SYSTEM_UI_FLAG_IMMERSIVE_STICKY - | SYSTEM_UI_FLAG_FULLSCREEN; - } else { - uiOptions = SYSTEM_UI_FLAG_HIDE_NAVIGATION - | SYSTEM_UI_FLAG_FULLSCREEN; - } eventEmitter.fullscreenWillPresent(); - decorView.setSystemUiVisibility(uiOptions); + showFullscreen(); eventEmitter.fullscreenDidPresent(); } else { - uiOptions = View.SYSTEM_UI_FLAG_VISIBLE; eventEmitter.fullscreenWillDismiss(); - decorView.setSystemUiVisibility(uiOptions); + if (fullScreenDelegate != null) { + fullScreenDelegate.closeFullScreen(); + } eventEmitter.fullscreenDidDismiss(); } } @@ -1279,4 +1306,8 @@ class ReactExoplayerView extends FrameLayout implements } } } + + public interface FullScreenDelegate { + void closeFullScreen(); + } } diff --git a/android-exoplayer/src/main/res/layout/exo_player_control_view.xml b/android-exoplayer/src/main/res/layout/exo_player_control_view.xml index becee6a9..51cbf3a8 100644 --- a/android-exoplayer/src/main/res/layout/exo_player_control_view.xml +++ b/android-exoplayer/src/main/res/layout/exo_player_control_view.xml @@ -1,5 +1,6 @@ - + + + + + + diff --git a/android-exoplayer/src/main/res/layout/exo_player_fullscreen_video.xml b/android-exoplayer/src/main/res/layout/exo_player_fullscreen_video.xml new file mode 100644 index 00000000..671a00ee --- /dev/null +++ b/android-exoplayer/src/main/res/layout/exo_player_fullscreen_video.xml @@ -0,0 +1,18 @@ + + + + + + + \ No newline at end of file diff --git a/android/src/main/AndroidManifest.xml b/android/src/main/AndroidManifest.xml index 3535ad44..2d632b3d 100644 --- a/android/src/main/AndroidManifest.xml +++ b/android/src/main/AndroidManifest.xml @@ -1,3 +1,9 @@ + package="com.brentvatne.react"> + + + + From 32880544e5aa7424067feefa6f947b3e0e5b6688 Mon Sep 17 00:00:00 2001 From: Tuan Luong Date: Sat, 4 Jul 2020 22:08:57 +0700 Subject: [PATCH 03/53] update manifest and import --- .../src/main/AndroidManifest.xml | 5 ++++ .../exoplayer/ReactExoplayerView.java | 28 ++++++------------- android/src/main/AndroidManifest.xml | 6 ---- 3 files changed, 14 insertions(+), 25 deletions(-) diff --git a/android-exoplayer/src/main/AndroidManifest.xml b/android-exoplayer/src/main/AndroidManifest.xml index 3535ad44..39515895 100644 --- a/android-exoplayer/src/main/AndroidManifest.xml +++ b/android-exoplayer/src/main/AndroidManifest.xml @@ -1,3 +1,8 @@ + + + diff --git a/android-exoplayer/src/main/java/com/brentvatne/exoplayer/ReactExoplayerView.java b/android-exoplayer/src/main/java/com/brentvatne/exoplayer/ReactExoplayerView.java index 6cd6b844..5d546877 100644 --- a/android-exoplayer/src/main/java/com/brentvatne/exoplayer/ReactExoplayerView.java +++ b/android-exoplayer/src/main/java/com/brentvatne/exoplayer/ReactExoplayerView.java @@ -12,10 +12,7 @@ import android.util.Log; import android.view.View; import android.view.accessibility.CaptioningManager; import android.widget.FrameLayout; - -import androidx.fragment.app.Fragment; -import androidx.fragment.app.FragmentActivity; -import androidx.fragment.app.FragmentTransaction; +import android.widget.ImageButton; import com.brentvatne.react.R; import com.brentvatne.receiver.AudioBecomingNoisyReceiver; @@ -27,33 +24,28 @@ import com.facebook.react.bridge.ReadableArray; import com.facebook.react.bridge.ReadableMap; import com.facebook.react.bridge.WritableArray; import com.facebook.react.bridge.WritableMap; -import com.facebook.react.modules.timepicker.TimePickerDialogFragment; -import com.facebook.react.uimanager.NativeViewHierarchyManager; import com.facebook.react.uimanager.ThemedReactContext; -import com.facebook.react.uimanager.UIBlock; -import com.facebook.react.uimanager.UIManagerModule; import com.google.android.exoplayer2.C; import com.google.android.exoplayer2.DefaultLoadControl; +import com.google.android.exoplayer2.DefaultRenderersFactory; import com.google.android.exoplayer2.ExoPlaybackException; -import com.google.android.exoplayer2.ExoPlayer; import com.google.android.exoplayer2.ExoPlayerFactory; import com.google.android.exoplayer2.Format; import com.google.android.exoplayer2.PlaybackParameters; import com.google.android.exoplayer2.Player; import com.google.android.exoplayer2.SimpleExoPlayer; import com.google.android.exoplayer2.Timeline; -import com.google.android.exoplayer2.extractor.DefaultExtractorsFactory; import com.google.android.exoplayer2.mediacodec.MediaCodecRenderer; import com.google.android.exoplayer2.mediacodec.MediaCodecUtil; import com.google.android.exoplayer2.metadata.Metadata; -import com.google.android.exoplayer2.metadata.MetadataRenderer; +import com.google.android.exoplayer2.metadata.MetadataOutput; import com.google.android.exoplayer2.source.BehindLiveWindowException; -import com.google.android.exoplayer2.source.ExtractorMediaSource; import com.google.android.exoplayer2.source.MediaSource; import com.google.android.exoplayer2.source.MergingMediaSource; +import com.google.android.exoplayer2.source.ProgressiveMediaSource; import com.google.android.exoplayer2.source.SingleSampleMediaSource; -import com.google.android.exoplayer2.source.TrackGroupArray; import com.google.android.exoplayer2.source.TrackGroup; +import com.google.android.exoplayer2.source.TrackGroupArray; import com.google.android.exoplayer2.source.dash.DashMediaSource; import com.google.android.exoplayer2.source.dash.DefaultDashChunkSource; import com.google.android.exoplayer2.source.hls.HlsMediaSource; @@ -64,21 +56,19 @@ import com.google.android.exoplayer2.trackselection.DefaultTrackSelector; import com.google.android.exoplayer2.trackselection.MappingTrackSelector; import com.google.android.exoplayer2.trackselection.TrackSelection; import com.google.android.exoplayer2.trackselection.TrackSelectionArray; +import com.google.android.exoplayer2.ui.PlayerControlView; +import com.google.android.exoplayer2.upstream.BandwidthMeter; import com.google.android.exoplayer2.upstream.DataSource; import com.google.android.exoplayer2.upstream.DefaultAllocator; -import com.google.android.exoplayer2.upstream.BandwidthMeter; import com.google.android.exoplayer2.upstream.DefaultBandwidthMeter; +import com.google.android.exoplayer2.upstream.HttpDataSource; import com.google.android.exoplayer2.util.Util; -import com.google.android.exoplayer2.ui.PlayerControlView; import java.net.CookieHandler; import java.net.CookieManager; import java.net.CookiePolicy; -import java.lang.Math; -import java.util.HashMap; -import java.util.Map; -import java.lang.Object; import java.util.ArrayList; +import java.util.HashMap; import java.util.Locale; import java.util.Map; diff --git a/android/src/main/AndroidManifest.xml b/android/src/main/AndroidManifest.xml index 2d632b3d..42a828cc 100644 --- a/android/src/main/AndroidManifest.xml +++ b/android/src/main/AndroidManifest.xml @@ -1,9 +1,3 @@ - - - - From 0b7ea71d7707516c8c108f021f70477e962c7bcb Mon Sep 17 00:00:00 2001 From: Tuan Luong Date: Sun, 5 Jul 2020 11:00:25 +0700 Subject: [PATCH 04/53] update fullscreen activity --- .../src/main/AndroidManifest.xml | 3 +- .../ExoPlayerFullscreenVideoActivity.java | 35 +++++++++++++++---- .../exoplayer/ReactExoplayerView.java | 16 ++++++--- 3 files changed, 42 insertions(+), 12 deletions(-) diff --git a/android-exoplayer/src/main/AndroidManifest.xml b/android-exoplayer/src/main/AndroidManifest.xml index 39515895..53e507e0 100644 --- a/android-exoplayer/src/main/AndroidManifest.xml +++ b/android-exoplayer/src/main/AndroidManifest.xml @@ -3,6 +3,7 @@ + android:configChanges="orientation|keyboardHidden|screenSize" + android:launchMode="singleTop" /> diff --git a/android-exoplayer/src/main/java/com/brentvatne/exoplayer/ExoPlayerFullscreenVideoActivity.java b/android-exoplayer/src/main/java/com/brentvatne/exoplayer/ExoPlayerFullscreenVideoActivity.java index 1f2ee1d5..5492145f 100644 --- a/android-exoplayer/src/main/java/com/brentvatne/exoplayer/ExoPlayerFullscreenVideoActivity.java +++ b/android-exoplayer/src/main/java/com/brentvatne/exoplayer/ExoPlayerFullscreenVideoActivity.java @@ -1,6 +1,7 @@ package com.brentvatne.exoplayer; import android.os.Bundle; +import android.view.KeyEvent; import android.view.View; import android.widget.ImageView; @@ -13,7 +14,6 @@ import com.google.android.exoplayer2.ui.PlayerControlView; public class ExoPlayerFullscreenVideoActivity extends AppCompatActivity implements ReactExoplayerView.FullScreenDelegate { public static final String EXTRA_ID = "extra_id"; - public static final String EXTRA_IS_PLAYING = "extra_is_playing"; private int id; private PlayerControlView playerControlView; @@ -36,26 +36,40 @@ public class ExoPlayerFullscreenVideoActivity extends AppCompatActivity implemen ImageView fullscreenIcon = playerControlView.findViewById(R.id.exo_fullscreen_icon); fullscreenIcon.setImageResource(R.drawable.exo_controls_fullscreen_exit); playerControlView.findViewById(R.id.exo_fullscreen_button) - .setOnClickListener(v -> finish()); + .setOnClickListener(v -> ReactExoplayerView.getViewInstance(id).setFullscreen(false)); + //Handling the playButton click event + playerControlView.findViewById(R.id.exo_play).setOnClickListener(v -> { + if (player != null && player.getPlaybackState() == Player.STATE_ENDED) { + player.seekTo(0); + } + ReactExoplayerView.getViewInstance(id).setPausedModifier(false); + }); + + //Handling the pauseButton click event + playerControlView.findViewById(R.id.exo_pause).setOnClickListener(v -> ReactExoplayerView.getViewInstance(id).setPausedModifier(true)); } @Override public void onResume() { super.onResume(); - boolean isPlaying = getIntent().getBooleanExtra(EXTRA_IS_PLAYING, false); - player.setPlayWhenReady(isPlaying); + boolean isPaused = ReactExoplayerView.getViewInstance(id).isPaused(); + player.setPlayWhenReady(!isPaused); ReactExoplayerView.getViewInstance(id).registerFullScreenDelegate(this); } @Override public void onPause() { super.onPause(); - boolean isPlaying = player.getPlayWhenReady() && player.getPlaybackState() == Player.STATE_READY; - ReactExoplayerView.getViewInstance(id).setPausedModifier(!isPlaying); player.setPlayWhenReady(false); ReactExoplayerView.getViewInstance(id).registerFullScreenDelegate(null); } + @Override + protected void onDestroy() { + super.onDestroy(); + ReactExoplayerView.getViewInstance(id).removeViewInstance(); + } + @Override public void onWindowFocusChanged(boolean hasFocus) { super.onWindowFocusChanged(hasFocus); @@ -64,6 +78,15 @@ public class ExoPlayerFullscreenVideoActivity extends AppCompatActivity implemen } } + @Override + public boolean onKeyDown(int keyCode, KeyEvent event) { + if ((keyCode == KeyEvent.KEYCODE_BACK)) { + ReactExoplayerView.getViewInstance(id).setFullscreen(false); + return false; + } + return super.onKeyDown(keyCode, event); + } + private void togglePlayerControlVisibility() { if (playerControlView.isVisible()) { playerControlView.hide(); diff --git a/android-exoplayer/src/main/java/com/brentvatne/exoplayer/ReactExoplayerView.java b/android-exoplayer/src/main/java/com/brentvatne/exoplayer/ReactExoplayerView.java index 5d546877..38bcd827 100644 --- a/android-exoplayer/src/main/java/com/brentvatne/exoplayer/ReactExoplayerView.java +++ b/android-exoplayer/src/main/java/com/brentvatne/exoplayer/ReactExoplayerView.java @@ -239,9 +239,13 @@ class ReactExoplayerView extends FrameLayout implements @Override public void onHostResume() { - exoPlayerView.setPlayer(player); if (!playInBackground || !isInBackground) { - setPlayWhenReady(!isPaused); + if (player != null) { + exoPlayerView.setPlayer(player); + boolean temp = this.disableFocus; + player.setPlayWhenReady(!isPaused); + this.disableFocus = temp; + } } isInBackground = false; } @@ -296,6 +300,10 @@ class ReactExoplayerView extends FrameLayout implements this.fullScreenDelegate = delegate; } + public void removeViewInstance() { + instances.remove(uid); + } + // Internal methods /** @@ -315,8 +323,6 @@ class ReactExoplayerView extends FrameLayout implements instances.put(uid, this); Intent intent = new Intent(getContext(), ExoPlayerFullscreenVideoActivity.class); intent.putExtra(ExoPlayerFullscreenVideoActivity.EXTRA_ID, this.uid); - boolean isPlaying = player.getPlayWhenReady() && player.getPlaybackState() == Player.STATE_READY; - intent.putExtra(ExoPlayerFullscreenVideoActivity.EXTRA_IS_PLAYING, isPlaying); getContext().startActivity(intent); } @@ -332,7 +338,7 @@ class ReactExoplayerView extends FrameLayout implements playerControlView.setPlayer(player); playerControlView.show(); playPauseControlContainer = playerControlView.findViewById(R.id.exo_play_pause_container); - playerControlView.findViewById(R.id.exo_fullscreen_button).setOnClickListener(v -> showFullscreen()); + playerControlView.findViewById(R.id.exo_fullscreen_button).setOnClickListener(v -> setFullscreen(true)); // Invoking onClick event for exoplayerView exoPlayerView.setOnClickListener(new OnClickListener() { From 5fe76574bbf30b7ea95fa4308760c12b26377f5e Mon Sep 17 00:00:00 2001 From: Tuan Luong Date: Fri, 10 Jul 2020 10:45:41 +0700 Subject: [PATCH 05/53] add fullscreenOrientation --- README.md | 2 +- .../ExoPlayerFullscreenVideoActivity.java | 33 ++++++++++++------- .../exoplayer/ReactExoplayerView.java | 11 ++++--- .../exoplayer/ReactExoplayerViewManager.java | 6 ++++ 4 files changed, 35 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index 00fc7932..3e701aa7 100644 --- a/README.md +++ b/README.md @@ -469,7 +469,7 @@ Platforms: iOS * **landscape** * **portrait** -Platforms: iOS +Platforms: Android ExoPlayer, iOS #### headers Pass headers to the HTTP client. Can be used for authorization. Headers must be a part of the source object. diff --git a/android-exoplayer/src/main/java/com/brentvatne/exoplayer/ExoPlayerFullscreenVideoActivity.java b/android-exoplayer/src/main/java/com/brentvatne/exoplayer/ExoPlayerFullscreenVideoActivity.java index 5492145f..6996eb6c 100644 --- a/android-exoplayer/src/main/java/com/brentvatne/exoplayer/ExoPlayerFullscreenVideoActivity.java +++ b/android-exoplayer/src/main/java/com/brentvatne/exoplayer/ExoPlayerFullscreenVideoActivity.java @@ -1,5 +1,6 @@ package com.brentvatne.exoplayer; +import android.content.pm.ActivityInfo; import android.os.Bundle; import android.view.KeyEvent; import android.view.View; @@ -14,7 +15,8 @@ import com.google.android.exoplayer2.ui.PlayerControlView; public class ExoPlayerFullscreenVideoActivity extends AppCompatActivity implements ReactExoplayerView.FullScreenDelegate { public static final String EXTRA_ID = "extra_id"; - + public static final String EXTRA_ORIENTATION = "extra_orientation"; + private int id; private PlayerControlView playerControlView; private SimpleExoPlayer player; @@ -22,8 +24,14 @@ public class ExoPlayerFullscreenVideoActivity extends AppCompatActivity implemen @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); - setContentView(R.layout.exo_player_fullscreen_video); id = getIntent().getIntExtra(EXTRA_ID, -1); + String orientation = getIntent().getStringExtra(EXTRA_ORIENTATION); + if ("landscape".equals(orientation)) { + setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_SENSOR_LANDSCAPE); + } else if ("portrait".equals(orientation)) { + setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_SENSOR_PORTRAIT); + } + setContentView(R.layout.exo_player_fullscreen_video); player = ReactExoplayerView.getViewInstance(id).getPlayer(); ExoPlayerView playerView = findViewById(R.id.player_view); @@ -54,20 +62,18 @@ public class ExoPlayerFullscreenVideoActivity extends AppCompatActivity implemen super.onResume(); boolean isPaused = ReactExoplayerView.getViewInstance(id).isPaused(); player.setPlayWhenReady(!isPaused); - ReactExoplayerView.getViewInstance(id).registerFullScreenDelegate(this); + if (ReactExoplayerView.getViewInstance(id) != null) { + ReactExoplayerView.getViewInstance(id).registerFullScreenDelegate(this); + } } @Override public void onPause() { super.onPause(); player.setPlayWhenReady(false); - ReactExoplayerView.getViewInstance(id).registerFullScreenDelegate(null); - } - - @Override - protected void onDestroy() { - super.onDestroy(); - ReactExoplayerView.getViewInstance(id).removeViewInstance(); + if (ReactExoplayerView.getViewInstance(id) != null) { + ReactExoplayerView.getViewInstance(id).registerFullScreenDelegate(null); + } } @Override @@ -81,8 +87,11 @@ public class ExoPlayerFullscreenVideoActivity extends AppCompatActivity implemen @Override public boolean onKeyDown(int keyCode, KeyEvent event) { if ((keyCode == KeyEvent.KEYCODE_BACK)) { - ReactExoplayerView.getViewInstance(id).setFullscreen(false); - return false; + if (ReactExoplayerView.getViewInstance(id) != null) { + ReactExoplayerView.getViewInstance(id).setFullscreen(false); + return false; + } + return true; } return super.onKeyDown(keyCode, event); } diff --git a/android-exoplayer/src/main/java/com/brentvatne/exoplayer/ReactExoplayerView.java b/android-exoplayer/src/main/java/com/brentvatne/exoplayer/ReactExoplayerView.java index 38bcd827..875d3402 100644 --- a/android-exoplayer/src/main/java/com/brentvatne/exoplayer/ReactExoplayerView.java +++ b/android-exoplayer/src/main/java/com/brentvatne/exoplayer/ReactExoplayerView.java @@ -114,6 +114,7 @@ class ReactExoplayerView extends FrameLayout implements private long resumePosition; private boolean loadVideoStarted; private boolean isFullscreen; + private String fullScreenOrientation; private boolean isInBackground; private boolean isPaused; private boolean isBuffering; @@ -266,6 +267,7 @@ class ReactExoplayerView extends FrameLayout implements public void cleanUpResources() { stopPlayback(); + instances.remove(uid); } //BandwidthMeter.EventListener implementation @@ -300,10 +302,6 @@ class ReactExoplayerView extends FrameLayout implements this.fullScreenDelegate = delegate; } - public void removeViewInstance() { - instances.remove(uid); - } - // Internal methods /** @@ -323,6 +321,7 @@ class ReactExoplayerView extends FrameLayout implements instances.put(uid, this); Intent intent = new Intent(getContext(), ExoPlayerFullscreenVideoActivity.class); intent.putExtra(ExoPlayerFullscreenVideoActivity.EXTRA_ID, this.uid); + intent.putExtra(ExoPlayerFullscreenVideoActivity.EXTRA_ORIENTATION, this.fullScreenOrientation); getContext().startActivity(intent); } @@ -1268,6 +1267,10 @@ class ReactExoplayerView extends FrameLayout implements } } + public void setFullscreenOrientation(String orientation) { + this.fullScreenOrientation = orientation; + } + public void setUseTextureView(boolean useTextureView) { exoPlayerView.setUseTextureView(useTextureView); } diff --git a/android-exoplayer/src/main/java/com/brentvatne/exoplayer/ReactExoplayerViewManager.java b/android-exoplayer/src/main/java/com/brentvatne/exoplayer/ReactExoplayerViewManager.java index cf50fdae..d520970d 100644 --- a/android-exoplayer/src/main/java/com/brentvatne/exoplayer/ReactExoplayerViewManager.java +++ b/android-exoplayer/src/main/java/com/brentvatne/exoplayer/ReactExoplayerViewManager.java @@ -54,6 +54,7 @@ public class ReactExoplayerViewManager extends ViewGroupManager Date: Mon, 13 Jul 2020 14:41:38 +0700 Subject: [PATCH 06/53] do not hide fullscreen in stopPlayback --- .../ExoPlayerFullscreenVideoActivity.java | 3 +- .../exoplayer/ReactExoplayerView.java | 29 ++++++++++++------- 2 files changed, 20 insertions(+), 12 deletions(-) diff --git a/android-exoplayer/src/main/java/com/brentvatne/exoplayer/ExoPlayerFullscreenVideoActivity.java b/android-exoplayer/src/main/java/com/brentvatne/exoplayer/ExoPlayerFullscreenVideoActivity.java index 6996eb6c..329a8fda 100644 --- a/android-exoplayer/src/main/java/com/brentvatne/exoplayer/ExoPlayerFullscreenVideoActivity.java +++ b/android-exoplayer/src/main/java/com/brentvatne/exoplayer/ExoPlayerFullscreenVideoActivity.java @@ -60,9 +60,8 @@ public class ExoPlayerFullscreenVideoActivity extends AppCompatActivity implemen @Override public void onResume() { super.onResume(); - boolean isPaused = ReactExoplayerView.getViewInstance(id).isPaused(); - player.setPlayWhenReady(!isPaused); if (ReactExoplayerView.getViewInstance(id) != null) { + ReactExoplayerView.getViewInstance(id).syncPlayerState(); ReactExoplayerView.getViewInstance(id).registerFullScreenDelegate(this); } } diff --git a/android-exoplayer/src/main/java/com/brentvatne/exoplayer/ReactExoplayerView.java b/android-exoplayer/src/main/java/com/brentvatne/exoplayer/ReactExoplayerView.java index 875d3402..83d70361 100644 --- a/android-exoplayer/src/main/java/com/brentvatne/exoplayer/ReactExoplayerView.java +++ b/android-exoplayer/src/main/java/com/brentvatne/exoplayer/ReactExoplayerView.java @@ -116,6 +116,7 @@ class ReactExoplayerView extends FrameLayout implements private boolean isFullscreen; private String fullScreenOrientation; private boolean isInBackground; + private boolean isInFullscreen; private boolean isPaused; private boolean isBuffering; private boolean muted = false; @@ -241,11 +242,14 @@ class ReactExoplayerView extends FrameLayout implements @Override public void onHostResume() { if (!playInBackground || !isInBackground) { - if (player != null) { - exoPlayerView.setPlayer(player); - boolean temp = this.disableFocus; - player.setPlayWhenReady(!isPaused); - this.disableFocus = temp; + if (isInFullscreen) { + if (player != null) { + exoPlayerView.setPlayer(player); + syncPlayerState(); + } + isInFullscreen = false; + } else { + setPlayWhenReady(!isPaused); } } isInBackground = false; @@ -294,8 +298,15 @@ class ReactExoplayerView extends FrameLayout implements return player; } - public boolean isPaused() { - return isPaused; + public void syncPlayerState() { + if (player == null) return; + if (player.getPlaybackState() == Player.STATE_ENDED) { + // Try to get last frame displayed + player.seekTo(player.getDuration() - 200); + player.setPlayWhenReady(true); + } else { + player.setPlayWhenReady(!isPaused); + } } public void registerFullScreenDelegate(FullScreenDelegate delegate) { @@ -323,6 +334,7 @@ class ReactExoplayerView extends FrameLayout implements intent.putExtra(ExoPlayerFullscreenVideoActivity.EXTRA_ID, this.uid); intent.putExtra(ExoPlayerFullscreenVideoActivity.EXTRA_ORIENTATION, this.fullScreenOrientation); getContext().startActivity(intent); + isInFullscreen = true; } /** @@ -623,9 +635,6 @@ class ReactExoplayerView extends FrameLayout implements } private void onStopPlayback() { - if (isFullscreen) { - setFullscreen(false); - } audioManager.abandonAudioFocus(this); } From 4d35511fb98f5494fc915502f5fe7799237ab724 Mon Sep 17 00:00:00 2001 From: Tuan Luong Date: Mon, 13 Jul 2020 14:50:09 +0700 Subject: [PATCH 07/53] add delay when hideSystemUI --- .../brentvatne/exoplayer/ExoPlayerFullscreenVideoActivity.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android-exoplayer/src/main/java/com/brentvatne/exoplayer/ExoPlayerFullscreenVideoActivity.java b/android-exoplayer/src/main/java/com/brentvatne/exoplayer/ExoPlayerFullscreenVideoActivity.java index 329a8fda..d3b87208 100644 --- a/android-exoplayer/src/main/java/com/brentvatne/exoplayer/ExoPlayerFullscreenVideoActivity.java +++ b/android-exoplayer/src/main/java/com/brentvatne/exoplayer/ExoPlayerFullscreenVideoActivity.java @@ -79,7 +79,7 @@ public class ExoPlayerFullscreenVideoActivity extends AppCompatActivity implemen public void onWindowFocusChanged(boolean hasFocus) { super.onWindowFocusChanged(hasFocus); if (hasFocus) { - hideSystemUI(); + playerControlView.postDelayed(this::hideSystemUI, 200); } } From 5f1ec04cef478545507ab149411ee7cb331860ba Mon Sep 17 00:00:00 2001 From: Alec Winograd Date: Thu, 15 Oct 2020 11:17:49 -0500 Subject: [PATCH 08/53] Fix default behavior for captions in ExoPlayer --- .../main/java/com/brentvatne/exoplayer/ReactExoplayerView.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android-exoplayer/src/main/java/com/brentvatne/exoplayer/ReactExoplayerView.java b/android-exoplayer/src/main/java/com/brentvatne/exoplayer/ReactExoplayerView.java index b41b2768..652178b1 100644 --- a/android-exoplayer/src/main/java/com/brentvatne/exoplayer/ReactExoplayerView.java +++ b/android-exoplayer/src/main/java/com/brentvatne/exoplayer/ReactExoplayerView.java @@ -1134,7 +1134,7 @@ class ReactExoplayerView extends FrameLayout implements } } } - } else if (rendererIndex == C.TRACK_TYPE_TEXT && Util.SDK_INT > 18) { // Text default + } else if (trackType == C.TRACK_TYPE_TEXT && Util.SDK_INT > 18) { // Text default // Use system settings if possible CaptioningManager captioningManager = (CaptioningManager)themedReactContext.getSystemService(Context.CAPTIONING_SERVICE); From 42deedc8d1056ffc6a8d454e28ce449a400add3e Mon Sep 17 00:00:00 2001 From: Alec Winograd Date: Thu, 15 Oct 2020 11:24:46 -0500 Subject: [PATCH 09/53] Update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 53e2518c..9ca56b48 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ ### Version 5.1.0-alpha9 - Add ARM64 support for windows [#2137](https://github.com/react-native-community/react-native-video/pull/2137) +- Fix default closed captioning behavior for Android ExoPlayer [#2181](https://github.com/react-native-video/react-native-video/pull/2181) ### Version 5.1.0-alpha8 From 991f94b22842c842d7e522904b23a0dfd995002a Mon Sep 17 00:00:00 2001 From: Mudaser Ali Date: Fri, 16 Oct 2020 18:54:50 +0500 Subject: [PATCH 10/53] Update README.md --- README.md | 91 ++++++++++++++++++++++++++++--------------------------- 1 file changed, 47 insertions(+), 44 deletions(-) diff --git a/README.md b/README.md index 1b6a913e..0a24a868 100644 --- a/README.md +++ b/README.md @@ -101,11 +101,11 @@ First select your project in Xcode. -After that, select the tvOS target of your application and select « General » tab +After that, select the tvOS target of your application and select « General » tab -Scroll to « Linked Frameworks and Libraries » and tap on the + button +Scroll to « Linked Frameworks and Libraries » and tap on the + button @@ -273,48 +273,51 @@ var styles = StyleSheet.create({ ``` ### Configurable props -* [allowsExternalPlayback](#allowsexternalplayback) -* [audioOnly](#audioonly) -* [automaticallyWaitsToMinimizeStalling](#automaticallyWaitsToMinimizeStalling) -* [bufferConfig](#bufferconfig) -* [controls](#controls) -* [currentPlaybackTime](#currentPlaybackTime) -* [disableFocus](#disableFocus) -* [filter](#filter) -* [filterEnabled](#filterEnabled) -* [fullscreen](#fullscreen) -* [fullscreenAutorotate](#fullscreenautorotate) -* [fullscreenOrientation](#fullscreenorientation) -* [headers](#headers) -* [hideShutterView](#hideshutterview) -* [id](#id) -* [ignoreSilentSwitch](#ignoresilentswitch) -* [maxBitRate](#maxbitrate) -* [minLoadRetryCount](#minLoadRetryCount) -* [mixWithOthers](#mixWithOthers) -* [muted](#muted) -* [paused](#paused) -* [pictureInPicture](#pictureinpicture) -* [playInBackground](#playinbackground) -* [playWhenInactive](#playwheninactive) -* [poster](#poster) -* [posterResizeMode](#posterresizemode) -* [preferredForwardBufferDuration](#preferredForwardBufferDuration) -* [preventsDisplaySleepDuringVideoPlayback](#preventsDisplaySleepDuringVideoPlayback) -* [progressUpdateInterval](#progressupdateinterval) -* [rate](#rate) -* [repeat](#repeat) -* [reportBandwidth](#reportbandwidth) -* [resizeMode](#resizemode) -* [selectedAudioTrack](#selectedaudiotrack) -* [selectedTextTrack](#selectedtexttrack) -* [selectedVideoTrack](#selectedvideotrack) -* [source](#source) -* [stereoPan](#stereopan) -* [textTracks](#texttracks) -* [trackId](#trackId) -* [useTextureView](#usetextureview) -* [volume](#volume) +| Prop Name |Plateforms Support | +|--|--| +|[allowsExternalPlayback](#allowsexternalplayback) |iOS | +|[audioOnly](#audioonly)|All | +|[automaticallyWaitsToMinimizeStalling](#automaticallyWaitsToMinimizeStalling) | iOS| +|[bufferConfig](#bufferconfig)|Android ExoPlayer| +|[controls](#controls)|Android ExoPlayer, iOS, react-native-dom| +|[currentPlaybackTime](#currentPlaybackTime)|Android Exoplayer| +|[disableFocus](#disableFocus)|Android Exoplayer, iOS| +|[filter](#filter)|iOS| +|[filterEnabled](#filterEnabled)|iOS| +|[fullscreen](#fullscreen)|iOS| +|[fullscreenAutorotate](#fullscreenautorotate)|iOS| +|[fullscreenOrientation](#fullscreenorientation)|iOS| +|[headers](#headers)|Android ExoPlayer| +|[hideShutterView](#hideshutterview)|Android ExoPlayer| +|[id](#id)|react-native-dom| +|[ignoreSilentSwitch](#ignoresilentswitch)|iOS| +|[maxBitRate](#maxbitrate)|Android ExoPlayer, iOS| +|[minLoadRetryCount](#minLoadRetryCount)|Android ExoPlayer| +|[mixWithOthers](#mixWithOthers)|iOS| +|[muted](#muted)|All| +|[paused](#paused)|All| +|[pictureInPicture](#pictureinpicture)|iOS| +|[playInBackground](#playinbackground)|Android ExoPlayer, Android MediaPlayer, iOS| +|[playWhenInactive](#playwheninactive)|iOS| +|[poster](#poster)|All| +|[posterResizeMode](#posterresizemode)|All| +|[preferredForwardBufferDuration](#preferredForwardBufferDuration)|iOS| +| [preventsDisplaySleepDuringVideoPlayback](#preventsDisplaySleepDuringVideoPlayback)|iOS, Android| +|[progressUpdateInterval](#progressupdateinterval)|All| +|[rate](#rate)|All| +|[repeat](#repeat)|All| +|[reportBandwidth](#reportbandwidth)|Android ExoPlayer| +|[resizeMode](#resizemode)|Android ExoPlayer, Android MediaPlayer, iOS, Windows UWP| +|[selectedAudioTrack](#selectedaudiotrack)|Android ExoPlayer, iOS| +|[selectedTextTrack](#selectedtexttrack)|Android ExoPlayer, iOS| +|[selectedVideoTrack](#selectedvideotrack)|Android ExoPlayer| +|[source](#source)|All| +|[stereoPan](#stereopan)|Android MediaPlayer| +|[textTracks](#texttracks)|Android ExoPlayer, iOS| +|[trackId](#trackId)|Android ExoPlayer| +|[useTextureView](#usetextureview)|Android ExoPlayer| +|[volume](#volume)|All| + ### Event props * [onAudioBecomingNoisy](#onaudiobecomingnoisy) From 2dea87c2207d0bb90e7a2ac859a8191778ab7e3f Mon Sep 17 00:00:00 2001 From: Mudaser Ali Date: Sat, 17 Oct 2020 08:54:44 +0500 Subject: [PATCH 11/53] Update Event props in README.md --- README.md | 37 ++++++++++++++++++++----------------- 1 file changed, 20 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index 0a24a868..bc845dee 100644 --- a/README.md +++ b/README.md @@ -320,23 +320,26 @@ var styles = StyleSheet.create({ ### Event props -* [onAudioBecomingNoisy](#onaudiobecomingnoisy) -* [onBandwidthUpdate](#onbandwidthupdate) -* [onEnd](#onend) -* [onExternalPlaybackChange](#onexternalplaybackchange) -* [onFullscreenPlayerWillPresent](#onfullscreenplayerwillpresent) -* [onFullscreenPlayerDidPresent](#onfullscreenplayerdidpresent) -* [onFullscreenPlayerWillDismiss](#onfullscreenplayerwilldismiss) -* [onFullscreenPlayerDidDismiss](#onfullscreenplayerdiddismiss) -* [onLoad](#onload) -* [onLoadStart](#onloadstart) -* [onReadyForDisplay](#onreadyfordisplay) -* [onPictureInPictureStatusChanged](#onpictureinpicturestatuschanged) -* [onPlaybackRateChange](#onplaybackratechange) -* [onProgress](#onprogress) -* [onSeek](#onseek) -* [onRestoreUserInterfaceForPictureInPictureStop](#onrestoreuserinterfaceforpictureinpicturestop) -* [onTimedMetadata](#ontimedmetadata) +| Prop Name |Plateforms Support | +|--|--| +|[onAudioBecomingNoisy](#onaudiobecomingnoisy)|Android ExoPlayer, iOS| +|[onBandwidthUpdate](#onbandwidthupdate)|Android ExoPlayer| +|[onEnd](#onend)|All| +|[onExternalPlaybackChange](#onexternalplaybackchange)|iOS| +|[onFullscreenPlayerWillPresent](#onfullscreenplayerwillpresent)|Android ExoPlayer, Android MediaPlayer, iOS| +|[onFullscreenPlayerDidPresent](#onfullscreenplayerdidpresent)|Android ExoPlayer, Android MediaPlayer, iOS| +|[onFullscreenPlayerWillDismiss](#onfullscreenplayerwilldismiss)|Android ExoPlayer, Android MediaPlayer, iOS| +|[onFullscreenPlayerDidDismiss](#onfullscreenplayerdiddismiss)|Android ExoPlayer, Android MediaPlayer, iOS| +|[onLoad](#onload)|All| +|[onLoadStart](#onloadstart)|All| +|[onReadyForDisplay](#onreadyfordisplay)|Android ExoPlayer, Android MediaPlayer, iOS, Web| +|[onPictureInPictureStatusChanged](#onpictureinpicturestatuschanged)|iOS| +|[onPlaybackRateChange](#onplaybackratechange)|All| +|[onProgress](#onprogress)|All| +|[onSeek](#onseek)|Android ExoPlayer, Android MediaPlayer, iOS, Windows UWP| +|[onRestoreUserInterfaceForPictureInPictureStop](#onrestoreuserinterfaceforpictureinpicturestop)|iOS| +|[onTimedMetadata](#ontimedmetadata)|Android ExoPlayer, Android MediaPlayer, iOS| + ### Methods * [dismissFullscreenPlayer](#dismissfullscreenplayer) From 38511bbf1c213a2defd8b1f3e5a4991183d572e3 Mon Sep 17 00:00:00 2001 From: Mudaser Ali Date: Sat, 17 Oct 2020 08:58:05 +0500 Subject: [PATCH 12/53] Update Method List --- README.md | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index bc845dee..ab509e1b 100644 --- a/README.md +++ b/README.md @@ -342,11 +342,14 @@ var styles = StyleSheet.create({ ### Methods -* [dismissFullscreenPlayer](#dismissfullscreenplayer) -* [presentFullscreenPlayer](#presentfullscreenplayer) -* [save](#save) -* [restoreUserInterfaceForPictureInPictureStop](#restoreuserinterfaceforpictureinpicturestop) -* [seek](#seek) +| Method Name |Plateforms Support | +|--|--| +|[dismissFullscreenPlayer](#dismissfullscreenplayer)|Android ExoPlayer, Android MediaPlayer, iOS| +|[presentFullscreenPlayer](#presentfullscreenplayer)|Android ExoPlayer, Android MediaPlayer, iOS| +|[save](#save)|iOS| +|[restoreUserInterfaceForPictureInPictureStop](#restoreuserinterfaceforpictureinpicturestop)|iOS| +|[seek](#seek)|All| + ### Configurable props From e17ee74f79ca28f0180c2bfdac8136b7045657e2 Mon Sep 17 00:00:00 2001 From: Mudaser Ali Date: Sat, 17 Oct 2020 08:59:12 +0500 Subject: [PATCH 13/53] Update README.md --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index ab509e1b..5966b37e 100644 --- a/README.md +++ b/README.md @@ -273,7 +273,7 @@ var styles = StyleSheet.create({ ``` ### Configurable props -| Prop Name |Plateforms Support | +| Name |Plateforms Support | |--|--| |[allowsExternalPlayback](#allowsexternalplayback) |iOS | |[audioOnly](#audioonly)|All | @@ -320,7 +320,7 @@ var styles = StyleSheet.create({ ### Event props -| Prop Name |Plateforms Support | +| Name |Plateforms Support | |--|--| |[onAudioBecomingNoisy](#onaudiobecomingnoisy)|Android ExoPlayer, iOS| |[onBandwidthUpdate](#onbandwidthupdate)|Android ExoPlayer| @@ -342,7 +342,7 @@ var styles = StyleSheet.create({ ### Methods -| Method Name |Plateforms Support | +| Name |Plateforms Support | |--|--| |[dismissFullscreenPlayer](#dismissfullscreenplayer)|Android ExoPlayer, Android MediaPlayer, iOS| |[presentFullscreenPlayer](#presentfullscreenplayer)|Android ExoPlayer, Android MediaPlayer, iOS| From dcea67eb963c24a5876c75621dd15ecef8dc197c Mon Sep 17 00:00:00 2001 From: anderslemke Date: Thu, 3 Jun 2021 15:11:57 +0200 Subject: [PATCH 14/53] Make sure modifiers are applied before playing --- ios/Video/RCTVideo.m | 1 + 1 file changed, 1 insertion(+) diff --git a/ios/Video/RCTVideo.m b/ios/Video/RCTVideo.m index 989167a6..8811b65c 100644 --- a/ios/Video/RCTVideo.m +++ b/ios/Video/RCTVideo.m @@ -383,6 +383,7 @@ static int const RCTVideoUnset = -1; } self->_player = [AVPlayer playerWithPlayerItem:self->_playerItem]; + [self applyModifiers]; self->_player.actionAtItemEnd = AVPlayerActionAtItemEndNone; [self->_player addObserver:self forKeyPath:playbackRate options:0 context:nil]; From d094886087c046bc79888c47f48833463bf7350a Mon Sep 17 00:00:00 2001 From: Tuan Luong Date: Sun, 13 Jun 2021 12:06:37 +0700 Subject: [PATCH 15/53] keep screen on when in fullscreen mode --- .../brentvatne/exoplayer/ExoPlayerFullscreenVideoActivity.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/android-exoplayer/src/main/java/com/brentvatne/exoplayer/ExoPlayerFullscreenVideoActivity.java b/android-exoplayer/src/main/java/com/brentvatne/exoplayer/ExoPlayerFullscreenVideoActivity.java index d3b87208..09b2cdfd 100644 --- a/android-exoplayer/src/main/java/com/brentvatne/exoplayer/ExoPlayerFullscreenVideoActivity.java +++ b/android-exoplayer/src/main/java/com/brentvatne/exoplayer/ExoPlayerFullscreenVideoActivity.java @@ -4,6 +4,7 @@ import android.content.pm.ActivityInfo; import android.os.Bundle; import android.view.KeyEvent; import android.view.View; +import android.view.WindowManager; import android.widget.ImageView; import androidx.appcompat.app.AppCompatActivity; @@ -24,6 +25,8 @@ public class ExoPlayerFullscreenVideoActivity extends AppCompatActivity implemen @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); + getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON); + id = getIntent().getIntExtra(EXTRA_ID, -1); String orientation = getIntent().getStringExtra(EXTRA_ORIENTATION); if ("landscape".equals(orientation)) { From 7c17f5ec96e7913ffe5d97db952c061882ab4681 Mon Sep 17 00:00:00 2001 From: Tuan Luong Date: Fri, 6 Aug 2021 10:56:07 +0700 Subject: [PATCH 16/53] Update ReactExoplayerView.java --- .../main/java/com/brentvatne/exoplayer/ReactExoplayerView.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android-exoplayer/src/main/java/com/brentvatne/exoplayer/ReactExoplayerView.java b/android-exoplayer/src/main/java/com/brentvatne/exoplayer/ReactExoplayerView.java index 9ada2571..f2469032 100644 --- a/android-exoplayer/src/main/java/com/brentvatne/exoplayer/ReactExoplayerView.java +++ b/android-exoplayer/src/main/java/com/brentvatne/exoplayer/ReactExoplayerView.java @@ -460,7 +460,7 @@ class ReactExoplayerView extends FrameLayout implements new DefaultRenderersFactory(getContext()) .setExtensionRendererMode(DefaultRenderersFactory.EXTENSION_RENDERER_MODE_OFF); player = new SimpleExoPlayer.Builder(getContext(), renderersFactory) - .setTrackSelector​(trackSelector) + .setTrackSelector(trackSelector) .setBandwidthMeter(bandwidthMeter) .setLoadControl(defaultLoadControl) .build(); From dad33ef8851f6af64d15581c164f4432ab81c0b3 Mon Sep 17 00:00:00 2001 From: Tomasz Baranowicz <851131+tombaranowicz@users.noreply.github.com> Date: Fri, 5 Nov 2021 12:42:45 +0100 Subject: [PATCH 17/53] Disable pipController init if pictureInPicture is false Disable pipController init if pictureInPicture is set to false prevents going to PIP mode on iOS when the app goes to the background. --- ios/Video/RCTVideo.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ios/Video/RCTVideo.m b/ios/Video/RCTVideo.m index a757c08a..4226db9d 100644 --- a/ios/Video/RCTVideo.m +++ b/ios/Video/RCTVideo.m @@ -907,7 +907,7 @@ static int const RCTVideoUnset = -1; } - (void)setupPipController { - if (!_pipController && _playerLayer && [AVPictureInPictureController isPictureInPictureSupported]) { + if (!_pipController && _playerLayer && [AVPictureInPictureController isPictureInPictureSupported] && _pictureInPicture) { // Create new controller passing reference to the AVPlayerLayer _pipController = [[AVPictureInPictureController alloc] initWithPlayerLayer:_playerLayer]; _pipController.delegate = self; From 79d6ebf99ec8d81b7f4c5d0ed424d81d75c0d079 Mon Sep 17 00:00:00 2001 From: namrog84 Date: Mon, 15 Nov 2021 15:57:24 -0800 Subject: [PATCH 18/53] remove unsupported arch and fix uimanager for rnw release --- Video.js | 8 ++-- examples/basic/windows/VideoPlayer.sln | 36 --------------- .../windows/VideoPlayer/VideoPlayer.vcxproj | 8 ---- windows/ReactNativeVideoCPP.sln | 39 ---------------- .../ReactNativeVideoCPP.vcxproj | 8 ---- windows/ReactNativeVideoCPP61.sln | 30 ------------- .../ReactNativeVideoCPP61.vcxproj | 8 ---- windows/ReactNativeVideoCPP62.sln | 45 ------------------- 8 files changed, 4 insertions(+), 178 deletions(-) diff --git a/Video.js b/Video.js index b492d48b..34037684 100644 --- a/Video.js +++ b/Video.js @@ -1,6 +1,6 @@ import React, { Component } from 'react'; import PropTypes from 'prop-types'; -import { StyleSheet, requireNativeComponent, NativeModules, View, ViewPropTypes, Image, Platform, findNodeHandle } from 'react-native'; +import { StyleSheet, requireNativeComponent, NativeModules, UIManager, View, ViewPropTypes, Image, Platform, findNodeHandle } from 'react-native'; import resolveAssetSource from 'react-native/Libraries/Image/resolveAssetSource'; import TextTrackType from './TextTrackType'; import FilterType from './FilterType'; @@ -254,10 +254,10 @@ export default class Video extends Component { } } getViewManagerConfig = viewManagerName => { - if (!NativeModules.UIManager.getViewManagerConfig) { - return NativeModules.UIManager[viewManagerName]; + if (!UIManager.getViewManagerConfig) { + return UIManager[viewManagerName]; } - return NativeModules.UIManager.getViewManagerConfig(viewManagerName); + return UIManager.getViewManagerConfig(viewManagerName); }; render() { diff --git a/examples/basic/windows/VideoPlayer.sln b/examples/basic/windows/VideoPlayer.sln index c3c7265b..d4490e0a 100644 --- a/examples/basic/windows/VideoPlayer.sln +++ b/examples/basic/windows/VideoPlayer.sln @@ -59,19 +59,14 @@ Global ..\node_modules\react-native-windows\Shared\Shared.vcxitems*{f7d32bd0-2749-483e-9a0d-1635ef7e3136}*SharedItemsImports = 4 EndGlobalSection GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|ARM = Debug|ARM Debug|ARM64 = Debug|ARM64 Debug|x64 = Debug|x64 Debug|x86 = Debug|x86 - Release|ARM = Release|ARM Release|ARM64 = Release|ARM64 Release|x64 = Release|x64 Release|x86 = Release|x86 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {ADF1CF02-8224-4167-A737-8CBE1A0D5208}.Debug|ARM.ActiveCfg = Debug|ARM - {ADF1CF02-8224-4167-A737-8CBE1A0D5208}.Debug|ARM.Build.0 = Debug|ARM - {ADF1CF02-8224-4167-A737-8CBE1A0D5208}.Debug|ARM.Deploy.0 = Debug|ARM {ADF1CF02-8224-4167-A737-8CBE1A0D5208}.Debug|ARM64.ActiveCfg = Debug|ARM64 {ADF1CF02-8224-4167-A737-8CBE1A0D5208}.Debug|ARM64.Build.0 = Debug|ARM64 {ADF1CF02-8224-4167-A737-8CBE1A0D5208}.Debug|ARM64.Deploy.0 = Debug|ARM64 @@ -81,9 +76,6 @@ Global {ADF1CF02-8224-4167-A737-8CBE1A0D5208}.Debug|x86.ActiveCfg = Debug|Win32 {ADF1CF02-8224-4167-A737-8CBE1A0D5208}.Debug|x86.Build.0 = Debug|Win32 {ADF1CF02-8224-4167-A737-8CBE1A0D5208}.Debug|x86.Deploy.0 = Debug|Win32 - {ADF1CF02-8224-4167-A737-8CBE1A0D5208}.Release|ARM.ActiveCfg = Release|ARM - {ADF1CF02-8224-4167-A737-8CBE1A0D5208}.Release|ARM.Build.0 = Release|ARM - {ADF1CF02-8224-4167-A737-8CBE1A0D5208}.Release|ARM.Deploy.0 = Release|ARM {ADF1CF02-8224-4167-A737-8CBE1A0D5208}.Release|ARM64.ActiveCfg = Release|ARM64 {ADF1CF02-8224-4167-A737-8CBE1A0D5208}.Release|ARM64.Build.0 = Release|ARM64 {ADF1CF02-8224-4167-A737-8CBE1A0D5208}.Release|ARM64.Deploy.0 = Release|ARM64 @@ -93,112 +85,84 @@ Global {ADF1CF02-8224-4167-A737-8CBE1A0D5208}.Release|x86.ActiveCfg = Release|Win32 {ADF1CF02-8224-4167-A737-8CBE1A0D5208}.Release|x86.Build.0 = Release|Win32 {ADF1CF02-8224-4167-A737-8CBE1A0D5208}.Release|x86.Deploy.0 = Release|Win32 - {A990658C-CE31-4BCC-976F-0FC6B1AF693D}.Debug|ARM.ActiveCfg = Debug|ARM - {A990658C-CE31-4BCC-976F-0FC6B1AF693D}.Debug|ARM.Build.0 = Debug|ARM {A990658C-CE31-4BCC-976F-0FC6B1AF693D}.Debug|ARM64.ActiveCfg = Debug|ARM64 {A990658C-CE31-4BCC-976F-0FC6B1AF693D}.Debug|ARM64.Build.0 = Debug|ARM64 {A990658C-CE31-4BCC-976F-0FC6B1AF693D}.Debug|x64.ActiveCfg = Debug|x64 {A990658C-CE31-4BCC-976F-0FC6B1AF693D}.Debug|x64.Build.0 = Debug|x64 {A990658C-CE31-4BCC-976F-0FC6B1AF693D}.Debug|x86.ActiveCfg = Debug|Win32 {A990658C-CE31-4BCC-976F-0FC6B1AF693D}.Debug|x86.Build.0 = Debug|Win32 - {A990658C-CE31-4BCC-976F-0FC6B1AF693D}.Release|ARM.ActiveCfg = Release|ARM - {A990658C-CE31-4BCC-976F-0FC6B1AF693D}.Release|ARM.Build.0 = Release|ARM {A990658C-CE31-4BCC-976F-0FC6B1AF693D}.Release|ARM64.ActiveCfg = Release|ARM64 {A990658C-CE31-4BCC-976F-0FC6B1AF693D}.Release|ARM64.Build.0 = Release|ARM64 {A990658C-CE31-4BCC-976F-0FC6B1AF693D}.Release|x64.ActiveCfg = Release|x64 {A990658C-CE31-4BCC-976F-0FC6B1AF693D}.Release|x64.Build.0 = Release|x64 {A990658C-CE31-4BCC-976F-0FC6B1AF693D}.Release|x86.ActiveCfg = Release|Win32 {A990658C-CE31-4BCC-976F-0FC6B1AF693D}.Release|x86.Build.0 = Release|Win32 - {A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}.Debug|ARM.ActiveCfg = Debug|ARM - {A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}.Debug|ARM.Build.0 = Debug|ARM {A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}.Debug|ARM64.ActiveCfg = Debug|ARM64 {A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}.Debug|ARM64.Build.0 = Debug|ARM64 {A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}.Debug|x64.ActiveCfg = Debug|x64 {A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}.Debug|x64.Build.0 = Debug|x64 {A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}.Debug|x86.ActiveCfg = Debug|Win32 {A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}.Debug|x86.Build.0 = Debug|Win32 - {A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}.Release|ARM.ActiveCfg = Release|ARM - {A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}.Release|ARM.Build.0 = Release|ARM {A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}.Release|ARM64.ActiveCfg = Release|ARM64 {A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}.Release|ARM64.Build.0 = Release|ARM64 {A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}.Release|x64.ActiveCfg = Release|x64 {A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}.Release|x64.Build.0 = Release|x64 {A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}.Release|x86.ActiveCfg = Release|Win32 {A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}.Release|x86.Build.0 = Release|Win32 - {11C084A3-A57C-4296-A679-CAC17B603144}.Debug|ARM.ActiveCfg = Debug|ARM - {11C084A3-A57C-4296-A679-CAC17B603144}.Debug|ARM.Build.0 = Debug|ARM {11C084A3-A57C-4296-A679-CAC17B603144}.Debug|ARM64.ActiveCfg = Debug|ARM64 {11C084A3-A57C-4296-A679-CAC17B603144}.Debug|ARM64.Build.0 = Debug|ARM64 {11C084A3-A57C-4296-A679-CAC17B603144}.Debug|x64.ActiveCfg = Debug|x64 {11C084A3-A57C-4296-A679-CAC17B603144}.Debug|x64.Build.0 = Debug|x64 {11C084A3-A57C-4296-A679-CAC17B603144}.Debug|x86.ActiveCfg = Debug|Win32 {11C084A3-A57C-4296-A679-CAC17B603144}.Debug|x86.Build.0 = Debug|Win32 - {11C084A3-A57C-4296-A679-CAC17B603144}.Release|ARM.ActiveCfg = Release|ARM - {11C084A3-A57C-4296-A679-CAC17B603144}.Release|ARM.Build.0 = Release|ARM {11C084A3-A57C-4296-A679-CAC17B603144}.Release|ARM64.ActiveCfg = Release|ARM64 {11C084A3-A57C-4296-A679-CAC17B603144}.Release|ARM64.Build.0 = Release|ARM64 {11C084A3-A57C-4296-A679-CAC17B603144}.Release|x64.ActiveCfg = Release|x64 {11C084A3-A57C-4296-A679-CAC17B603144}.Release|x64.Build.0 = Release|x64 {11C084A3-A57C-4296-A679-CAC17B603144}.Release|x86.ActiveCfg = Release|Win32 {11C084A3-A57C-4296-A679-CAC17B603144}.Release|x86.Build.0 = Release|Win32 - {F7D32BD0-2749-483E-9A0D-1635EF7E3136}.Debug|ARM.ActiveCfg = Debug|ARM - {F7D32BD0-2749-483E-9A0D-1635EF7E3136}.Debug|ARM.Build.0 = Debug|ARM {F7D32BD0-2749-483E-9A0D-1635EF7E3136}.Debug|ARM64.ActiveCfg = Debug|ARM64 {F7D32BD0-2749-483E-9A0D-1635EF7E3136}.Debug|ARM64.Build.0 = Debug|ARM64 {F7D32BD0-2749-483E-9A0D-1635EF7E3136}.Debug|x64.ActiveCfg = Debug|x64 {F7D32BD0-2749-483E-9A0D-1635EF7E3136}.Debug|x64.Build.0 = Debug|x64 {F7D32BD0-2749-483E-9A0D-1635EF7E3136}.Debug|x86.ActiveCfg = Debug|Win32 {F7D32BD0-2749-483E-9A0D-1635EF7E3136}.Debug|x86.Build.0 = Debug|Win32 - {F7D32BD0-2749-483E-9A0D-1635EF7E3136}.Release|ARM.ActiveCfg = Release|ARM - {F7D32BD0-2749-483E-9A0D-1635EF7E3136}.Release|ARM.Build.0 = Release|ARM {F7D32BD0-2749-483E-9A0D-1635EF7E3136}.Release|ARM64.ActiveCfg = Release|ARM64 {F7D32BD0-2749-483E-9A0D-1635EF7E3136}.Release|ARM64.Build.0 = Release|ARM64 {F7D32BD0-2749-483E-9A0D-1635EF7E3136}.Release|x64.ActiveCfg = Release|x64 {F7D32BD0-2749-483E-9A0D-1635EF7E3136}.Release|x64.Build.0 = Release|x64 {F7D32BD0-2749-483E-9A0D-1635EF7E3136}.Release|x86.ActiveCfg = Release|Win32 {F7D32BD0-2749-483E-9A0D-1635EF7E3136}.Release|x86.Build.0 = Release|Win32 - {A62D504A-16B8-41D2-9F19-E2E86019E5E4}.Debug|ARM.ActiveCfg = Debug|ARM - {A62D504A-16B8-41D2-9F19-E2E86019E5E4}.Debug|ARM.Build.0 = Debug|ARM {A62D504A-16B8-41D2-9F19-E2E86019E5E4}.Debug|ARM64.ActiveCfg = Debug|ARM64 {A62D504A-16B8-41D2-9F19-E2E86019E5E4}.Debug|ARM64.Build.0 = Debug|ARM64 {A62D504A-16B8-41D2-9F19-E2E86019E5E4}.Debug|x64.ActiveCfg = Debug|x64 {A62D504A-16B8-41D2-9F19-E2E86019E5E4}.Debug|x64.Build.0 = Debug|x64 {A62D504A-16B8-41D2-9F19-E2E86019E5E4}.Debug|x86.ActiveCfg = Debug|Win32 {A62D504A-16B8-41D2-9F19-E2E86019E5E4}.Debug|x86.Build.0 = Debug|Win32 - {A62D504A-16B8-41D2-9F19-E2E86019E5E4}.Release|ARM.ActiveCfg = Release|ARM - {A62D504A-16B8-41D2-9F19-E2E86019E5E4}.Release|ARM.Build.0 = Release|ARM {A62D504A-16B8-41D2-9F19-E2E86019E5E4}.Release|ARM64.ActiveCfg = Release|ARM64 {A62D504A-16B8-41D2-9F19-E2E86019E5E4}.Release|ARM64.Build.0 = Release|ARM64 {A62D504A-16B8-41D2-9F19-E2E86019E5E4}.Release|x64.ActiveCfg = Release|x64 {A62D504A-16B8-41D2-9F19-E2E86019E5E4}.Release|x64.Build.0 = Release|x64 {A62D504A-16B8-41D2-9F19-E2E86019E5E4}.Release|x86.ActiveCfg = Release|Win32 {A62D504A-16B8-41D2-9F19-E2E86019E5E4}.Release|x86.Build.0 = Release|Win32 - {FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}.Debug|ARM.ActiveCfg = Debug|ARM - {FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}.Debug|ARM.Build.0 = Debug|ARM {FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}.Debug|ARM64.ActiveCfg = Debug|ARM64 {FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}.Debug|ARM64.Build.0 = Debug|ARM64 {FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}.Debug|x64.ActiveCfg = Debug|x64 {FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}.Debug|x64.Build.0 = Debug|x64 {FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}.Debug|x86.ActiveCfg = Debug|Win32 {FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}.Debug|x86.Build.0 = Debug|Win32 - {FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}.Release|ARM.ActiveCfg = Release|ARM - {FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}.Release|ARM.Build.0 = Release|ARM {FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}.Release|ARM64.ActiveCfg = Release|ARM64 {FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}.Release|ARM64.Build.0 = Release|ARM64 {FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}.Release|x64.ActiveCfg = Release|x64 {FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}.Release|x64.Build.0 = Release|x64 {FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}.Release|x86.ActiveCfg = Release|Win32 {FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}.Release|x86.Build.0 = Release|Win32 - {765365E4-9553-4900-9F69-E26D4309C8DA}.Debug|ARM.ActiveCfg = Debug|ARM - {765365E4-9553-4900-9F69-E26D4309C8DA}.Debug|ARM.Build.0 = Debug|ARM {765365E4-9553-4900-9F69-E26D4309C8DA}.Debug|ARM64.ActiveCfg = Debug|ARM64 {765365E4-9553-4900-9F69-E26D4309C8DA}.Debug|ARM64.Build.0 = Debug|ARM64 {765365E4-9553-4900-9F69-E26D4309C8DA}.Debug|x64.ActiveCfg = Debug|x64 {765365E4-9553-4900-9F69-E26D4309C8DA}.Debug|x64.Build.0 = Debug|x64 {765365E4-9553-4900-9F69-E26D4309C8DA}.Debug|x86.ActiveCfg = Debug|Win32 {765365E4-9553-4900-9F69-E26D4309C8DA}.Debug|x86.Build.0 = Debug|Win32 - {765365E4-9553-4900-9F69-E26D4309C8DA}.Release|ARM.ActiveCfg = Release|ARM - {765365E4-9553-4900-9F69-E26D4309C8DA}.Release|ARM.Build.0 = Release|ARM {765365E4-9553-4900-9F69-E26D4309C8DA}.Release|ARM64.ActiveCfg = Release|ARM64 {765365E4-9553-4900-9F69-E26D4309C8DA}.Release|ARM64.Build.0 = Release|ARM64 {765365E4-9553-4900-9F69-E26D4309C8DA}.Release|x64.ActiveCfg = Release|x64 diff --git a/examples/basic/windows/VideoPlayer/VideoPlayer.vcxproj b/examples/basic/windows/VideoPlayer/VideoPlayer.vcxproj index 94a0299d..6b91ab55 100644 --- a/examples/basic/windows/VideoPlayer/VideoPlayer.vcxproj +++ b/examples/basic/windows/VideoPlayer/VideoPlayer.vcxproj @@ -20,10 +20,6 @@ - - Debug - ARM - Debug ARM64 @@ -36,10 +32,6 @@ Debug x64 - - Release - ARM - Release ARM64 diff --git a/windows/ReactNativeVideoCPP.sln b/windows/ReactNativeVideoCPP.sln index 3c3f4dbc..940cdf44 100644 --- a/windows/ReactNativeVideoCPP.sln +++ b/windows/ReactNativeVideoCPP.sln @@ -45,158 +45,119 @@ Global ..\node_modules\react-native-windows\Shared\Shared.vcxitems*{f7d32bd0-2749-483e-9a0d-1635ef7e3136}*SharedItemsImports = 4 EndGlobalSection GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|ARM = Debug|ARM Debug|ARM64 = Debug|ARM64 Debug|x64 = Debug|x64 Debug|x86 = Debug|x86 - Release|ARM = Release|ARM Release|ARM64 = Release|ARM64 Release|x64 = Release|x64 Release|x86 = Release|x86 - WinUI3|ARM = WinUI3|ARM WinUI3|ARM64 = WinUI3|ARM64 WinUI3|x64 = WinUI3|x64 WinUI3|x86 = WinUI3|x86 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {0D1E54D3-4BE1-4DAF-98BF-124C28C85014}.Debug|ARM.ActiveCfg = Debug|ARM - {0D1E54D3-4BE1-4DAF-98BF-124C28C85014}.Debug|ARM.Build.0 = Debug|ARM {0D1E54D3-4BE1-4DAF-98BF-124C28C85014}.Debug|ARM64.ActiveCfg = Debug|ARM64 {0D1E54D3-4BE1-4DAF-98BF-124C28C85014}.Debug|ARM64.Build.0 = Debug|ARM64 {0D1E54D3-4BE1-4DAF-98BF-124C28C85014}.Debug|x64.ActiveCfg = Debug|x64 {0D1E54D3-4BE1-4DAF-98BF-124C28C85014}.Debug|x64.Build.0 = Debug|x64 {0D1E54D3-4BE1-4DAF-98BF-124C28C85014}.Debug|x86.ActiveCfg = Debug|Win32 {0D1E54D3-4BE1-4DAF-98BF-124C28C85014}.Debug|x86.Build.0 = Debug|Win32 - {0D1E54D3-4BE1-4DAF-98BF-124C28C85014}.Release|ARM.ActiveCfg = Release|ARM - {0D1E54D3-4BE1-4DAF-98BF-124C28C85014}.Release|ARM.Build.0 = Release|ARM {0D1E54D3-4BE1-4DAF-98BF-124C28C85014}.Release|ARM64.ActiveCfg = Release|ARM64 {0D1E54D3-4BE1-4DAF-98BF-124C28C85014}.Release|ARM64.Build.0 = Release|ARM64 {0D1E54D3-4BE1-4DAF-98BF-124C28C85014}.Release|x64.ActiveCfg = Release|x64 {0D1E54D3-4BE1-4DAF-98BF-124C28C85014}.Release|x64.Build.0 = Release|x64 {0D1E54D3-4BE1-4DAF-98BF-124C28C85014}.Release|x86.ActiveCfg = Release|Win32 {0D1E54D3-4BE1-4DAF-98BF-124C28C85014}.Release|x86.Build.0 = Release|Win32 - {0D1E54D3-4BE1-4DAF-98BF-124C28C85014}.WinUI3|ARM.ActiveCfg = Release|ARM - {0D1E54D3-4BE1-4DAF-98BF-124C28C85014}.WinUI3|ARM.Build.0 = Release|ARM {0D1E54D3-4BE1-4DAF-98BF-124C28C85014}.WinUI3|ARM64.ActiveCfg = Release|ARM64 {0D1E54D3-4BE1-4DAF-98BF-124C28C85014}.WinUI3|ARM64.Build.0 = Release|ARM64 {0D1E54D3-4BE1-4DAF-98BF-124C28C85014}.WinUI3|x64.ActiveCfg = Release|x64 {0D1E54D3-4BE1-4DAF-98BF-124C28C85014}.WinUI3|x64.Build.0 = Release|x64 {0D1E54D3-4BE1-4DAF-98BF-124C28C85014}.WinUI3|x86.ActiveCfg = Release|Win32 {0D1E54D3-4BE1-4DAF-98BF-124C28C85014}.WinUI3|x86.Build.0 = Release|Win32 - {FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}.Debug|ARM.ActiveCfg = Debug|ARM - {FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}.Debug|ARM.Build.0 = Debug|ARM {FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}.Debug|ARM64.ActiveCfg = Debug|ARM64 {FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}.Debug|ARM64.Build.0 = Debug|ARM64 {FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}.Debug|x64.ActiveCfg = Debug|x64 {FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}.Debug|x64.Build.0 = Debug|x64 {FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}.Debug|x86.ActiveCfg = Debug|Win32 {FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}.Debug|x86.Build.0 = Debug|Win32 - {FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}.Release|ARM.ActiveCfg = Release|ARM - {FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}.Release|ARM.Build.0 = Release|ARM {FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}.Release|ARM64.ActiveCfg = Release|ARM64 {FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}.Release|ARM64.Build.0 = Release|ARM64 {FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}.Release|x64.ActiveCfg = Release|x64 {FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}.Release|x64.Build.0 = Release|x64 {FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}.Release|x86.ActiveCfg = Release|Win32 {FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}.Release|x86.Build.0 = Release|Win32 - {FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}.WinUI3|ARM.ActiveCfg = Release|ARM - {FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}.WinUI3|ARM.Build.0 = Release|ARM {FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}.WinUI3|ARM64.ActiveCfg = Release|ARM64 {FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}.WinUI3|ARM64.Build.0 = Release|ARM64 {FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}.WinUI3|x64.ActiveCfg = Release|x64 {FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}.WinUI3|x64.Build.0 = Release|x64 {FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}.WinUI3|x86.ActiveCfg = Release|Win32 {FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}.WinUI3|x86.Build.0 = Release|Win32 - {A990658C-CE31-4BCC-976F-0FC6B1AF693D}.Debug|ARM.ActiveCfg = Debug|ARM - {A990658C-CE31-4BCC-976F-0FC6B1AF693D}.Debug|ARM.Build.0 = Debug|ARM {A990658C-CE31-4BCC-976F-0FC6B1AF693D}.Debug|ARM64.ActiveCfg = Debug|ARM64 {A990658C-CE31-4BCC-976F-0FC6B1AF693D}.Debug|ARM64.Build.0 = Debug|ARM64 {A990658C-CE31-4BCC-976F-0FC6B1AF693D}.Debug|x64.ActiveCfg = Debug|x64 {A990658C-CE31-4BCC-976F-0FC6B1AF693D}.Debug|x64.Build.0 = Debug|x64 {A990658C-CE31-4BCC-976F-0FC6B1AF693D}.Debug|x86.ActiveCfg = Debug|Win32 {A990658C-CE31-4BCC-976F-0FC6B1AF693D}.Debug|x86.Build.0 = Debug|Win32 - {A990658C-CE31-4BCC-976F-0FC6B1AF693D}.Release|ARM.ActiveCfg = Release|ARM - {A990658C-CE31-4BCC-976F-0FC6B1AF693D}.Release|ARM.Build.0 = Release|ARM {A990658C-CE31-4BCC-976F-0FC6B1AF693D}.Release|ARM64.ActiveCfg = Release|ARM64 {A990658C-CE31-4BCC-976F-0FC6B1AF693D}.Release|ARM64.Build.0 = Release|ARM64 {A990658C-CE31-4BCC-976F-0FC6B1AF693D}.Release|x64.ActiveCfg = Release|x64 {A990658C-CE31-4BCC-976F-0FC6B1AF693D}.Release|x64.Build.0 = Release|x64 {A990658C-CE31-4BCC-976F-0FC6B1AF693D}.Release|x86.ActiveCfg = Release|Win32 {A990658C-CE31-4BCC-976F-0FC6B1AF693D}.Release|x86.Build.0 = Release|Win32 - {A990658C-CE31-4BCC-976F-0FC6B1AF693D}.WinUI3|ARM.ActiveCfg = Release|ARM - {A990658C-CE31-4BCC-976F-0FC6B1AF693D}.WinUI3|ARM.Build.0 = Release|ARM {A990658C-CE31-4BCC-976F-0FC6B1AF693D}.WinUI3|ARM64.ActiveCfg = Release|ARM64 {A990658C-CE31-4BCC-976F-0FC6B1AF693D}.WinUI3|ARM64.Build.0 = Release|ARM64 {A990658C-CE31-4BCC-976F-0FC6B1AF693D}.WinUI3|x64.ActiveCfg = Release|x64 {A990658C-CE31-4BCC-976F-0FC6B1AF693D}.WinUI3|x64.Build.0 = Release|x64 {A990658C-CE31-4BCC-976F-0FC6B1AF693D}.WinUI3|x86.ActiveCfg = Release|Win32 {A990658C-CE31-4BCC-976F-0FC6B1AF693D}.WinUI3|x86.Build.0 = Release|Win32 - {A62D504A-16B8-41D2-9F19-E2E86019E5E4}.Debug|ARM.ActiveCfg = Debug|ARM - {A62D504A-16B8-41D2-9F19-E2E86019E5E4}.Debug|ARM.Build.0 = Debug|ARM {A62D504A-16B8-41D2-9F19-E2E86019E5E4}.Debug|ARM64.ActiveCfg = Debug|ARM64 {A62D504A-16B8-41D2-9F19-E2E86019E5E4}.Debug|ARM64.Build.0 = Debug|ARM64 {A62D504A-16B8-41D2-9F19-E2E86019E5E4}.Debug|x64.ActiveCfg = Debug|x64 {A62D504A-16B8-41D2-9F19-E2E86019E5E4}.Debug|x64.Build.0 = Debug|x64 {A62D504A-16B8-41D2-9F19-E2E86019E5E4}.Debug|x86.ActiveCfg = Debug|Win32 {A62D504A-16B8-41D2-9F19-E2E86019E5E4}.Debug|x86.Build.0 = Debug|Win32 - {A62D504A-16B8-41D2-9F19-E2E86019E5E4}.Release|ARM.ActiveCfg = Release|ARM - {A62D504A-16B8-41D2-9F19-E2E86019E5E4}.Release|ARM.Build.0 = Release|ARM {A62D504A-16B8-41D2-9F19-E2E86019E5E4}.Release|ARM64.ActiveCfg = Release|ARM64 {A62D504A-16B8-41D2-9F19-E2E86019E5E4}.Release|ARM64.Build.0 = Release|ARM64 {A62D504A-16B8-41D2-9F19-E2E86019E5E4}.Release|x64.ActiveCfg = Release|x64 {A62D504A-16B8-41D2-9F19-E2E86019E5E4}.Release|x64.Build.0 = Release|x64 {A62D504A-16B8-41D2-9F19-E2E86019E5E4}.Release|x86.ActiveCfg = Release|Win32 {A62D504A-16B8-41D2-9F19-E2E86019E5E4}.Release|x86.Build.0 = Release|Win32 - {A62D504A-16B8-41D2-9F19-E2E86019E5E4}.WinUI3|ARM.ActiveCfg = Release|ARM - {A62D504A-16B8-41D2-9F19-E2E86019E5E4}.WinUI3|ARM.Build.0 = Release|ARM {A62D504A-16B8-41D2-9F19-E2E86019E5E4}.WinUI3|ARM64.ActiveCfg = Release|ARM64 {A62D504A-16B8-41D2-9F19-E2E86019E5E4}.WinUI3|ARM64.Build.0 = Release|ARM64 {A62D504A-16B8-41D2-9F19-E2E86019E5E4}.WinUI3|x64.ActiveCfg = Release|x64 {A62D504A-16B8-41D2-9F19-E2E86019E5E4}.WinUI3|x64.Build.0 = Release|x64 {A62D504A-16B8-41D2-9F19-E2E86019E5E4}.WinUI3|x86.ActiveCfg = Release|Win32 {A62D504A-16B8-41D2-9F19-E2E86019E5E4}.WinUI3|x86.Build.0 = Release|Win32 - {F7D32BD0-2749-483E-9A0D-1635EF7E3136}.Debug|ARM.ActiveCfg = Debug|ARM - {F7D32BD0-2749-483E-9A0D-1635EF7E3136}.Debug|ARM.Build.0 = Debug|ARM {F7D32BD0-2749-483E-9A0D-1635EF7E3136}.Debug|ARM64.ActiveCfg = Debug|ARM64 {F7D32BD0-2749-483E-9A0D-1635EF7E3136}.Debug|ARM64.Build.0 = Debug|ARM64 {F7D32BD0-2749-483E-9A0D-1635EF7E3136}.Debug|x64.ActiveCfg = Debug|x64 {F7D32BD0-2749-483E-9A0D-1635EF7E3136}.Debug|x64.Build.0 = Debug|x64 {F7D32BD0-2749-483E-9A0D-1635EF7E3136}.Debug|x86.ActiveCfg = Debug|Win32 {F7D32BD0-2749-483E-9A0D-1635EF7E3136}.Debug|x86.Build.0 = Debug|Win32 - {F7D32BD0-2749-483E-9A0D-1635EF7E3136}.Release|ARM.ActiveCfg = Release|ARM - {F7D32BD0-2749-483E-9A0D-1635EF7E3136}.Release|ARM.Build.0 = Release|ARM {F7D32BD0-2749-483E-9A0D-1635EF7E3136}.Release|ARM64.ActiveCfg = Release|ARM64 {F7D32BD0-2749-483E-9A0D-1635EF7E3136}.Release|ARM64.Build.0 = Release|ARM64 {F7D32BD0-2749-483E-9A0D-1635EF7E3136}.Release|x64.ActiveCfg = Release|x64 {F7D32BD0-2749-483E-9A0D-1635EF7E3136}.Release|x64.Build.0 = Release|x64 {F7D32BD0-2749-483E-9A0D-1635EF7E3136}.Release|x86.ActiveCfg = Release|Win32 {F7D32BD0-2749-483E-9A0D-1635EF7E3136}.Release|x86.Build.0 = Release|Win32 - {F7D32BD0-2749-483E-9A0D-1635EF7E3136}.WinUI3|ARM.ActiveCfg = Release|ARM - {F7D32BD0-2749-483E-9A0D-1635EF7E3136}.WinUI3|ARM.Build.0 = Release|ARM {F7D32BD0-2749-483E-9A0D-1635EF7E3136}.WinUI3|ARM64.ActiveCfg = Release|ARM64 {F7D32BD0-2749-483E-9A0D-1635EF7E3136}.WinUI3|ARM64.Build.0 = Release|ARM64 {F7D32BD0-2749-483E-9A0D-1635EF7E3136}.WinUI3|x64.ActiveCfg = Release|x64 {F7D32BD0-2749-483E-9A0D-1635EF7E3136}.WinUI3|x64.Build.0 = Release|x64 {F7D32BD0-2749-483E-9A0D-1635EF7E3136}.WinUI3|x86.ActiveCfg = Release|Win32 {F7D32BD0-2749-483E-9A0D-1635EF7E3136}.WinUI3|x86.Build.0 = Release|Win32 - {A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}.Debug|ARM.ActiveCfg = Debug|ARM - {A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}.Debug|ARM.Build.0 = Debug|ARM {A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}.Debug|ARM64.ActiveCfg = Debug|ARM64 {A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}.Debug|ARM64.Build.0 = Debug|ARM64 {A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}.Debug|x64.ActiveCfg = Debug|x64 {A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}.Debug|x64.Build.0 = Debug|x64 {A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}.Debug|x86.ActiveCfg = Debug|Win32 {A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}.Debug|x86.Build.0 = Debug|Win32 - {A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}.Release|ARM.ActiveCfg = Release|ARM - {A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}.Release|ARM.Build.0 = Release|ARM {A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}.Release|ARM64.ActiveCfg = Release|ARM64 {A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}.Release|ARM64.Build.0 = Release|ARM64 {A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}.Release|x64.ActiveCfg = Release|x64 {A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}.Release|x64.Build.0 = Release|x64 {A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}.Release|x86.ActiveCfg = Release|Win32 {A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}.Release|x86.Build.0 = Release|Win32 - {A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}.WinUI3|ARM.ActiveCfg = Release|ARM - {A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}.WinUI3|ARM.Build.0 = Release|ARM {A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}.WinUI3|ARM64.ActiveCfg = Release|ARM64 {A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}.WinUI3|ARM64.Build.0 = Release|ARM64 {A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}.WinUI3|x64.ActiveCfg = Release|x64 diff --git a/windows/ReactNativeVideoCPP/ReactNativeVideoCPP.vcxproj b/windows/ReactNativeVideoCPP/ReactNativeVideoCPP.vcxproj index 83bddbf0..a24d1de2 100644 --- a/windows/ReactNativeVideoCPP/ReactNativeVideoCPP.vcxproj +++ b/windows/ReactNativeVideoCPP/ReactNativeVideoCPP.vcxproj @@ -21,10 +21,6 @@ $([MSBuild]::GetDirectoryNameOfFileAbove($(SolutionDir), 'node_modules\react-native-windows\package.json'))\node_modules\react-native-windows\ - - Debug - ARM - Debug ARM64 @@ -37,10 +33,6 @@ Debug x64 - - Release - ARM - Release ARM64 diff --git a/windows/ReactNativeVideoCPP61.sln b/windows/ReactNativeVideoCPP61.sln index 043183d2..b8cc040f 100644 --- a/windows/ReactNativeVideoCPP61.sln +++ b/windows/ReactNativeVideoCPP61.sln @@ -53,121 +53,91 @@ Global ..\node_modules\react-native-windows\Shared\Shared.vcxitems*{f7d32bd0-2749-483e-9a0d-1635ef7e3136}*SharedItemsImports = 4 EndGlobalSection GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|ARM = Debug|ARM Debug|ARM64 = Debug|ARM64 Debug|x64 = Debug|x64 Debug|x86 = Debug|x86 - Release|ARM = Release|ARM Release|ARM64 = Release|ARM64 Release|x64 = Release|x64 Release|x86 = Release|x86 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {A990658C-CE31-4BCC-976F-0FC6B1AF693D}.Debug|ARM.ActiveCfg = Debug|ARM - {A990658C-CE31-4BCC-976F-0FC6B1AF693D}.Debug|ARM.Build.0 = Debug|ARM {A990658C-CE31-4BCC-976F-0FC6B1AF693D}.Debug|ARM64.ActiveCfg = Debug|ARM64 {A990658C-CE31-4BCC-976F-0FC6B1AF693D}.Debug|ARM64.Build.0 = Debug|ARM64 {A990658C-CE31-4BCC-976F-0FC6B1AF693D}.Debug|x64.ActiveCfg = Debug|x64 {A990658C-CE31-4BCC-976F-0FC6B1AF693D}.Debug|x64.Build.0 = Debug|x64 {A990658C-CE31-4BCC-976F-0FC6B1AF693D}.Debug|x86.ActiveCfg = Debug|Win32 {A990658C-CE31-4BCC-976F-0FC6B1AF693D}.Debug|x86.Build.0 = Debug|Win32 - {A990658C-CE31-4BCC-976F-0FC6B1AF693D}.Release|ARM.ActiveCfg = Release|ARM - {A990658C-CE31-4BCC-976F-0FC6B1AF693D}.Release|ARM.Build.0 = Release|ARM {A990658C-CE31-4BCC-976F-0FC6B1AF693D}.Release|ARM64.ActiveCfg = Release|ARM64 {A990658C-CE31-4BCC-976F-0FC6B1AF693D}.Release|ARM64.Build.0 = Release|ARM64 {A990658C-CE31-4BCC-976F-0FC6B1AF693D}.Release|x64.ActiveCfg = Release|x64 {A990658C-CE31-4BCC-976F-0FC6B1AF693D}.Release|x64.Build.0 = Release|x64 {A990658C-CE31-4BCC-976F-0FC6B1AF693D}.Release|x86.ActiveCfg = Release|Win32 {A990658C-CE31-4BCC-976F-0FC6B1AF693D}.Release|x86.Build.0 = Release|Win32 - {A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}.Debug|ARM.ActiveCfg = Debug|ARM - {A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}.Debug|ARM.Build.0 = Debug|ARM {A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}.Debug|ARM64.ActiveCfg = Debug|ARM64 {A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}.Debug|ARM64.Build.0 = Debug|ARM64 {A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}.Debug|x64.ActiveCfg = Debug|x64 {A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}.Debug|x64.Build.0 = Debug|x64 {A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}.Debug|x86.ActiveCfg = Debug|Win32 {A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}.Debug|x86.Build.0 = Debug|Win32 - {A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}.Release|ARM.ActiveCfg = Release|ARM - {A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}.Release|ARM.Build.0 = Release|ARM {A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}.Release|ARM64.ActiveCfg = Release|ARM64 {A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}.Release|ARM64.Build.0 = Release|ARM64 {A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}.Release|x64.ActiveCfg = Release|x64 {A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}.Release|x64.Build.0 = Release|x64 {A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}.Release|x86.ActiveCfg = Release|Win32 {A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}.Release|x86.Build.0 = Release|Win32 - {11C084A3-A57C-4296-A679-CAC17B603144}.Debug|ARM.ActiveCfg = Debug|ARM - {11C084A3-A57C-4296-A679-CAC17B603144}.Debug|ARM.Build.0 = Debug|ARM {11C084A3-A57C-4296-A679-CAC17B603144}.Debug|ARM64.ActiveCfg = Debug|ARM64 {11C084A3-A57C-4296-A679-CAC17B603144}.Debug|ARM64.Build.0 = Debug|ARM64 {11C084A3-A57C-4296-A679-CAC17B603144}.Debug|x64.ActiveCfg = Debug|x64 {11C084A3-A57C-4296-A679-CAC17B603144}.Debug|x64.Build.0 = Debug|x64 {11C084A3-A57C-4296-A679-CAC17B603144}.Debug|x86.ActiveCfg = Debug|Win32 {11C084A3-A57C-4296-A679-CAC17B603144}.Debug|x86.Build.0 = Debug|Win32 - {11C084A3-A57C-4296-A679-CAC17B603144}.Release|ARM.ActiveCfg = Release|ARM - {11C084A3-A57C-4296-A679-CAC17B603144}.Release|ARM.Build.0 = Release|ARM {11C084A3-A57C-4296-A679-CAC17B603144}.Release|ARM64.ActiveCfg = Release|ARM64 {11C084A3-A57C-4296-A679-CAC17B603144}.Release|ARM64.Build.0 = Release|ARM64 {11C084A3-A57C-4296-A679-CAC17B603144}.Release|x64.ActiveCfg = Release|x64 {11C084A3-A57C-4296-A679-CAC17B603144}.Release|x64.Build.0 = Release|x64 {11C084A3-A57C-4296-A679-CAC17B603144}.Release|x86.ActiveCfg = Release|Win32 {11C084A3-A57C-4296-A679-CAC17B603144}.Release|x86.Build.0 = Release|Win32 - {F7D32BD0-2749-483E-9A0D-1635EF7E3136}.Debug|ARM.ActiveCfg = Debug|ARM - {F7D32BD0-2749-483E-9A0D-1635EF7E3136}.Debug|ARM.Build.0 = Debug|ARM {F7D32BD0-2749-483E-9A0D-1635EF7E3136}.Debug|ARM64.ActiveCfg = Debug|ARM64 {F7D32BD0-2749-483E-9A0D-1635EF7E3136}.Debug|ARM64.Build.0 = Debug|ARM64 {F7D32BD0-2749-483E-9A0D-1635EF7E3136}.Debug|x64.ActiveCfg = Debug|x64 {F7D32BD0-2749-483E-9A0D-1635EF7E3136}.Debug|x64.Build.0 = Debug|x64 {F7D32BD0-2749-483E-9A0D-1635EF7E3136}.Debug|x86.ActiveCfg = Debug|Win32 {F7D32BD0-2749-483E-9A0D-1635EF7E3136}.Debug|x86.Build.0 = Debug|Win32 - {F7D32BD0-2749-483E-9A0D-1635EF7E3136}.Release|ARM.ActiveCfg = Release|ARM - {F7D32BD0-2749-483E-9A0D-1635EF7E3136}.Release|ARM.Build.0 = Release|ARM {F7D32BD0-2749-483E-9A0D-1635EF7E3136}.Release|ARM64.ActiveCfg = Release|ARM64 {F7D32BD0-2749-483E-9A0D-1635EF7E3136}.Release|ARM64.Build.0 = Release|ARM64 {F7D32BD0-2749-483E-9A0D-1635EF7E3136}.Release|x64.ActiveCfg = Release|x64 {F7D32BD0-2749-483E-9A0D-1635EF7E3136}.Release|x64.Build.0 = Release|x64 {F7D32BD0-2749-483E-9A0D-1635EF7E3136}.Release|x86.ActiveCfg = Release|Win32 {F7D32BD0-2749-483E-9A0D-1635EF7E3136}.Release|x86.Build.0 = Release|Win32 - {A62D504A-16B8-41D2-9F19-E2E86019E5E4}.Debug|ARM.ActiveCfg = Debug|ARM - {A62D504A-16B8-41D2-9F19-E2E86019E5E4}.Debug|ARM.Build.0 = Debug|ARM {A62D504A-16B8-41D2-9F19-E2E86019E5E4}.Debug|ARM64.ActiveCfg = Debug|ARM64 {A62D504A-16B8-41D2-9F19-E2E86019E5E4}.Debug|ARM64.Build.0 = Debug|ARM64 {A62D504A-16B8-41D2-9F19-E2E86019E5E4}.Debug|x64.ActiveCfg = Debug|x64 {A62D504A-16B8-41D2-9F19-E2E86019E5E4}.Debug|x64.Build.0 = Debug|x64 {A62D504A-16B8-41D2-9F19-E2E86019E5E4}.Debug|x86.ActiveCfg = Debug|Win32 {A62D504A-16B8-41D2-9F19-E2E86019E5E4}.Debug|x86.Build.0 = Debug|Win32 - {A62D504A-16B8-41D2-9F19-E2E86019E5E4}.Release|ARM.ActiveCfg = Release|ARM - {A62D504A-16B8-41D2-9F19-E2E86019E5E4}.Release|ARM.Build.0 = Release|ARM {A62D504A-16B8-41D2-9F19-E2E86019E5E4}.Release|ARM64.ActiveCfg = Release|ARM64 {A62D504A-16B8-41D2-9F19-E2E86019E5E4}.Release|ARM64.Build.0 = Release|ARM64 {A62D504A-16B8-41D2-9F19-E2E86019E5E4}.Release|x64.ActiveCfg = Release|x64 {A62D504A-16B8-41D2-9F19-E2E86019E5E4}.Release|x64.Build.0 = Release|x64 {A62D504A-16B8-41D2-9F19-E2E86019E5E4}.Release|x86.ActiveCfg = Release|Win32 {A62D504A-16B8-41D2-9F19-E2E86019E5E4}.Release|x86.Build.0 = Release|Win32 - {FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}.Debug|ARM.ActiveCfg = Debug|ARM - {FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}.Debug|ARM.Build.0 = Debug|ARM {FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}.Debug|ARM64.ActiveCfg = Debug|ARM64 {FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}.Debug|ARM64.Build.0 = Debug|ARM64 {FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}.Debug|x64.ActiveCfg = Debug|x64 {FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}.Debug|x64.Build.0 = Debug|x64 {FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}.Debug|x86.ActiveCfg = Debug|Win32 {FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}.Debug|x86.Build.0 = Debug|Win32 - {FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}.Release|ARM.ActiveCfg = Release|ARM - {FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}.Release|ARM.Build.0 = Release|ARM {FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}.Release|ARM64.ActiveCfg = Release|ARM64 {FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}.Release|ARM64.Build.0 = Release|ARM64 {FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}.Release|x64.ActiveCfg = Release|x64 {FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}.Release|x64.Build.0 = Release|x64 {FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}.Release|x86.ActiveCfg = Release|Win32 {FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}.Release|x86.Build.0 = Release|Win32 - {765365E4-9553-4900-9F69-E26D4309C8DA}.Debug|ARM.ActiveCfg = Debug|ARM - {765365E4-9553-4900-9F69-E26D4309C8DA}.Debug|ARM.Build.0 = Debug|ARM {765365E4-9553-4900-9F69-E26D4309C8DA}.Debug|ARM64.ActiveCfg = Debug|Win32 {765365E4-9553-4900-9F69-E26D4309C8DA}.Debug|x64.ActiveCfg = Debug|x64 {765365E4-9553-4900-9F69-E26D4309C8DA}.Debug|x64.Build.0 = Debug|x64 {765365E4-9553-4900-9F69-E26D4309C8DA}.Debug|x86.ActiveCfg = Debug|Win32 {765365E4-9553-4900-9F69-E26D4309C8DA}.Debug|x86.Build.0 = Debug|Win32 - {765365E4-9553-4900-9F69-E26D4309C8DA}.Release|ARM.ActiveCfg = Release|ARM - {765365E4-9553-4900-9F69-E26D4309C8DA}.Release|ARM.Build.0 = Release|ARM {765365E4-9553-4900-9F69-E26D4309C8DA}.Release|ARM64.ActiveCfg = Release|Win32 {765365E4-9553-4900-9F69-E26D4309C8DA}.Release|x64.ActiveCfg = Release|x64 {765365E4-9553-4900-9F69-E26D4309C8DA}.Release|x64.Build.0 = Release|x64 diff --git a/windows/ReactNativeVideoCPP61/ReactNativeVideoCPP61.vcxproj b/windows/ReactNativeVideoCPP61/ReactNativeVideoCPP61.vcxproj index 90c7430b..588c0bc1 100644 --- a/windows/ReactNativeVideoCPP61/ReactNativeVideoCPP61.vcxproj +++ b/windows/ReactNativeVideoCPP61/ReactNativeVideoCPP61.vcxproj @@ -21,10 +21,6 @@ $([MSBuild]::GetDirectoryNameOfFileAbove($(SolutionDir), 'node_modules\react-native-windows\package.json'))\node_modules\react-native-windows\ - - Debug - ARM - Debug ARM64 @@ -37,10 +33,6 @@ Debug x64 - - Release - ARM - Release ARM64 diff --git a/windows/ReactNativeVideoCPP62.sln b/windows/ReactNativeVideoCPP62.sln index 4ab5516d..bac50f46 100644 --- a/windows/ReactNativeVideoCPP62.sln +++ b/windows/ReactNativeVideoCPP62.sln @@ -48,182 +48,137 @@ Global ..\node_modules\react-native-windows\Shared\Shared.vcxitems*{f7d32bd0-2749-483e-9a0d-1635ef7e3136}*SharedItemsImports = 4 EndGlobalSection GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|ARM = Debug|ARM Debug|ARM64 = Debug|ARM64 Debug|x64 = Debug|x64 Debug|x86 = Debug|x86 - Release|ARM = Release|ARM Release|ARM64 = Release|ARM64 Release|x64 = Release|x64 Release|x86 = Release|x86 - WinUI3|ARM = WinUI3|ARM WinUI3|ARM64 = WinUI3|ARM64 WinUI3|x64 = WinUI3|x64 WinUI3|x86 = WinUI3|x86 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {0D1E54D3-4BE1-4DAF-98BF-124C28C85014}.Debug|ARM.ActiveCfg = Debug|ARM - {0D1E54D3-4BE1-4DAF-98BF-124C28C85014}.Debug|ARM.Build.0 = Debug|ARM {0D1E54D3-4BE1-4DAF-98BF-124C28C85014}.Debug|ARM64.ActiveCfg = Debug|ARM64 {0D1E54D3-4BE1-4DAF-98BF-124C28C85014}.Debug|ARM64.Build.0 = Debug|ARM64 {0D1E54D3-4BE1-4DAF-98BF-124C28C85014}.Debug|x64.ActiveCfg = Debug|x64 {0D1E54D3-4BE1-4DAF-98BF-124C28C85014}.Debug|x64.Build.0 = Debug|x64 {0D1E54D3-4BE1-4DAF-98BF-124C28C85014}.Debug|x86.ActiveCfg = Debug|Win32 {0D1E54D3-4BE1-4DAF-98BF-124C28C85014}.Debug|x86.Build.0 = Debug|Win32 - {0D1E54D3-4BE1-4DAF-98BF-124C28C85014}.Release|ARM.ActiveCfg = Release|ARM - {0D1E54D3-4BE1-4DAF-98BF-124C28C85014}.Release|ARM.Build.0 = Release|ARM {0D1E54D3-4BE1-4DAF-98BF-124C28C85014}.Release|ARM64.ActiveCfg = Release|ARM64 {0D1E54D3-4BE1-4DAF-98BF-124C28C85014}.Release|ARM64.Build.0 = Release|ARM64 {0D1E54D3-4BE1-4DAF-98BF-124C28C85014}.Release|x64.ActiveCfg = Release|x64 {0D1E54D3-4BE1-4DAF-98BF-124C28C85014}.Release|x64.Build.0 = Release|x64 {0D1E54D3-4BE1-4DAF-98BF-124C28C85014}.Release|x86.ActiveCfg = Release|Win32 {0D1E54D3-4BE1-4DAF-98BF-124C28C85014}.Release|x86.Build.0 = Release|Win32 - {0D1E54D3-4BE1-4DAF-98BF-124C28C85014}.WinUI3|ARM.ActiveCfg = Release|ARM - {0D1E54D3-4BE1-4DAF-98BF-124C28C85014}.WinUI3|ARM.Build.0 = Release|ARM {0D1E54D3-4BE1-4DAF-98BF-124C28C85014}.WinUI3|ARM64.ActiveCfg = Release|ARM64 {0D1E54D3-4BE1-4DAF-98BF-124C28C85014}.WinUI3|ARM64.Build.0 = Release|ARM64 {0D1E54D3-4BE1-4DAF-98BF-124C28C85014}.WinUI3|x64.ActiveCfg = Release|x64 {0D1E54D3-4BE1-4DAF-98BF-124C28C85014}.WinUI3|x64.Build.0 = Release|x64 {0D1E54D3-4BE1-4DAF-98BF-124C28C85014}.WinUI3|x86.ActiveCfg = Release|Win32 {0D1E54D3-4BE1-4DAF-98BF-124C28C85014}.WinUI3|x86.Build.0 = Release|Win32 - {FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}.Debug|ARM.ActiveCfg = Debug|ARM - {FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}.Debug|ARM.Build.0 = Debug|ARM {FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}.Debug|ARM64.ActiveCfg = Debug|ARM64 {FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}.Debug|ARM64.Build.0 = Debug|ARM64 {FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}.Debug|x64.ActiveCfg = Debug|x64 {FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}.Debug|x64.Build.0 = Debug|x64 {FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}.Debug|x86.ActiveCfg = Debug|Win32 {FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}.Debug|x86.Build.0 = Debug|Win32 - {FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}.Release|ARM.ActiveCfg = Release|ARM - {FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}.Release|ARM.Build.0 = Release|ARM {FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}.Release|ARM64.ActiveCfg = Release|ARM64 {FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}.Release|ARM64.Build.0 = Release|ARM64 {FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}.Release|x64.ActiveCfg = Release|x64 {FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}.Release|x64.Build.0 = Release|x64 {FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}.Release|x86.ActiveCfg = Release|Win32 {FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}.Release|x86.Build.0 = Release|Win32 - {FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}.WinUI3|ARM.ActiveCfg = Release|ARM - {FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}.WinUI3|ARM.Build.0 = Release|ARM {FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}.WinUI3|ARM64.ActiveCfg = Release|ARM64 {FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}.WinUI3|ARM64.Build.0 = Release|ARM64 {FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}.WinUI3|x64.ActiveCfg = Release|x64 {FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}.WinUI3|x64.Build.0 = Release|x64 {FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}.WinUI3|x86.ActiveCfg = Release|Win32 {FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}.WinUI3|x86.Build.0 = Release|Win32 - {A990658C-CE31-4BCC-976F-0FC6B1AF693D}.Debug|ARM.ActiveCfg = Debug|ARM - {A990658C-CE31-4BCC-976F-0FC6B1AF693D}.Debug|ARM.Build.0 = Debug|ARM {A990658C-CE31-4BCC-976F-0FC6B1AF693D}.Debug|ARM64.ActiveCfg = Debug|ARM64 {A990658C-CE31-4BCC-976F-0FC6B1AF693D}.Debug|ARM64.Build.0 = Debug|ARM64 {A990658C-CE31-4BCC-976F-0FC6B1AF693D}.Debug|x64.ActiveCfg = Debug|x64 {A990658C-CE31-4BCC-976F-0FC6B1AF693D}.Debug|x64.Build.0 = Debug|x64 {A990658C-CE31-4BCC-976F-0FC6B1AF693D}.Debug|x86.ActiveCfg = Debug|Win32 {A990658C-CE31-4BCC-976F-0FC6B1AF693D}.Debug|x86.Build.0 = Debug|Win32 - {A990658C-CE31-4BCC-976F-0FC6B1AF693D}.Release|ARM.ActiveCfg = Release|ARM - {A990658C-CE31-4BCC-976F-0FC6B1AF693D}.Release|ARM.Build.0 = Release|ARM {A990658C-CE31-4BCC-976F-0FC6B1AF693D}.Release|ARM64.ActiveCfg = Release|ARM64 {A990658C-CE31-4BCC-976F-0FC6B1AF693D}.Release|ARM64.Build.0 = Release|ARM64 {A990658C-CE31-4BCC-976F-0FC6B1AF693D}.Release|x64.ActiveCfg = Release|x64 {A990658C-CE31-4BCC-976F-0FC6B1AF693D}.Release|x64.Build.0 = Release|x64 {A990658C-CE31-4BCC-976F-0FC6B1AF693D}.Release|x86.ActiveCfg = Release|Win32 {A990658C-CE31-4BCC-976F-0FC6B1AF693D}.Release|x86.Build.0 = Release|Win32 - {A990658C-CE31-4BCC-976F-0FC6B1AF693D}.WinUI3|ARM.ActiveCfg = Release|ARM - {A990658C-CE31-4BCC-976F-0FC6B1AF693D}.WinUI3|ARM.Build.0 = Release|ARM {A990658C-CE31-4BCC-976F-0FC6B1AF693D}.WinUI3|ARM64.ActiveCfg = Release|ARM64 {A990658C-CE31-4BCC-976F-0FC6B1AF693D}.WinUI3|ARM64.Build.0 = Release|ARM64 {A990658C-CE31-4BCC-976F-0FC6B1AF693D}.WinUI3|x64.ActiveCfg = Release|x64 {A990658C-CE31-4BCC-976F-0FC6B1AF693D}.WinUI3|x64.Build.0 = Release|x64 {A990658C-CE31-4BCC-976F-0FC6B1AF693D}.WinUI3|x86.ActiveCfg = Release|Win32 {A990658C-CE31-4BCC-976F-0FC6B1AF693D}.WinUI3|x86.Build.0 = Release|Win32 - {A62D504A-16B8-41D2-9F19-E2E86019E5E4}.Debug|ARM.ActiveCfg = Debug|ARM - {A62D504A-16B8-41D2-9F19-E2E86019E5E4}.Debug|ARM.Build.0 = Debug|ARM {A62D504A-16B8-41D2-9F19-E2E86019E5E4}.Debug|ARM64.ActiveCfg = Debug|ARM64 {A62D504A-16B8-41D2-9F19-E2E86019E5E4}.Debug|ARM64.Build.0 = Debug|ARM64 {A62D504A-16B8-41D2-9F19-E2E86019E5E4}.Debug|x64.ActiveCfg = Debug|x64 {A62D504A-16B8-41D2-9F19-E2E86019E5E4}.Debug|x64.Build.0 = Debug|x64 {A62D504A-16B8-41D2-9F19-E2E86019E5E4}.Debug|x86.ActiveCfg = Debug|Win32 {A62D504A-16B8-41D2-9F19-E2E86019E5E4}.Debug|x86.Build.0 = Debug|Win32 - {A62D504A-16B8-41D2-9F19-E2E86019E5E4}.Release|ARM.ActiveCfg = Release|ARM - {A62D504A-16B8-41D2-9F19-E2E86019E5E4}.Release|ARM.Build.0 = Release|ARM {A62D504A-16B8-41D2-9F19-E2E86019E5E4}.Release|ARM64.ActiveCfg = Release|ARM64 {A62D504A-16B8-41D2-9F19-E2E86019E5E4}.Release|ARM64.Build.0 = Release|ARM64 {A62D504A-16B8-41D2-9F19-E2E86019E5E4}.Release|x64.ActiveCfg = Release|x64 {A62D504A-16B8-41D2-9F19-E2E86019E5E4}.Release|x64.Build.0 = Release|x64 {A62D504A-16B8-41D2-9F19-E2E86019E5E4}.Release|x86.ActiveCfg = Release|Win32 {A62D504A-16B8-41D2-9F19-E2E86019E5E4}.Release|x86.Build.0 = Release|Win32 - {A62D504A-16B8-41D2-9F19-E2E86019E5E4}.WinUI3|ARM.ActiveCfg = Release|ARM - {A62D504A-16B8-41D2-9F19-E2E86019E5E4}.WinUI3|ARM.Build.0 = Release|ARM {A62D504A-16B8-41D2-9F19-E2E86019E5E4}.WinUI3|ARM64.ActiveCfg = Release|ARM64 {A62D504A-16B8-41D2-9F19-E2E86019E5E4}.WinUI3|ARM64.Build.0 = Release|ARM64 {A62D504A-16B8-41D2-9F19-E2E86019E5E4}.WinUI3|x64.ActiveCfg = Release|x64 {A62D504A-16B8-41D2-9F19-E2E86019E5E4}.WinUI3|x64.Build.0 = Release|x64 {A62D504A-16B8-41D2-9F19-E2E86019E5E4}.WinUI3|x86.ActiveCfg = Release|Win32 {A62D504A-16B8-41D2-9F19-E2E86019E5E4}.WinUI3|x86.Build.0 = Release|Win32 - {F7D32BD0-2749-483E-9A0D-1635EF7E3136}.Debug|ARM.ActiveCfg = Debug|ARM - {F7D32BD0-2749-483E-9A0D-1635EF7E3136}.Debug|ARM.Build.0 = Debug|ARM {F7D32BD0-2749-483E-9A0D-1635EF7E3136}.Debug|ARM64.ActiveCfg = Debug|ARM64 {F7D32BD0-2749-483E-9A0D-1635EF7E3136}.Debug|ARM64.Build.0 = Debug|ARM64 {F7D32BD0-2749-483E-9A0D-1635EF7E3136}.Debug|x64.ActiveCfg = Debug|x64 {F7D32BD0-2749-483E-9A0D-1635EF7E3136}.Debug|x64.Build.0 = Debug|x64 {F7D32BD0-2749-483E-9A0D-1635EF7E3136}.Debug|x86.ActiveCfg = Debug|Win32 {F7D32BD0-2749-483E-9A0D-1635EF7E3136}.Debug|x86.Build.0 = Debug|Win32 - {F7D32BD0-2749-483E-9A0D-1635EF7E3136}.Release|ARM.ActiveCfg = Release|ARM - {F7D32BD0-2749-483E-9A0D-1635EF7E3136}.Release|ARM.Build.0 = Release|ARM {F7D32BD0-2749-483E-9A0D-1635EF7E3136}.Release|ARM64.ActiveCfg = Release|ARM64 {F7D32BD0-2749-483E-9A0D-1635EF7E3136}.Release|ARM64.Build.0 = Release|ARM64 {F7D32BD0-2749-483E-9A0D-1635EF7E3136}.Release|x64.ActiveCfg = Release|x64 {F7D32BD0-2749-483E-9A0D-1635EF7E3136}.Release|x64.Build.0 = Release|x64 {F7D32BD0-2749-483E-9A0D-1635EF7E3136}.Release|x86.ActiveCfg = Release|Win32 {F7D32BD0-2749-483E-9A0D-1635EF7E3136}.Release|x86.Build.0 = Release|Win32 - {F7D32BD0-2749-483E-9A0D-1635EF7E3136}.WinUI3|ARM.ActiveCfg = Release|ARM - {F7D32BD0-2749-483E-9A0D-1635EF7E3136}.WinUI3|ARM.Build.0 = Release|ARM {F7D32BD0-2749-483E-9A0D-1635EF7E3136}.WinUI3|ARM64.ActiveCfg = Release|ARM64 {F7D32BD0-2749-483E-9A0D-1635EF7E3136}.WinUI3|ARM64.Build.0 = Release|ARM64 {F7D32BD0-2749-483E-9A0D-1635EF7E3136}.WinUI3|x64.ActiveCfg = Release|x64 {F7D32BD0-2749-483E-9A0D-1635EF7E3136}.WinUI3|x64.Build.0 = Release|x64 {F7D32BD0-2749-483E-9A0D-1635EF7E3136}.WinUI3|x86.ActiveCfg = Release|Win32 {F7D32BD0-2749-483E-9A0D-1635EF7E3136}.WinUI3|x86.Build.0 = Release|Win32 - {A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}.Debug|ARM.ActiveCfg = Debug|ARM - {A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}.Debug|ARM.Build.0 = Debug|ARM {A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}.Debug|ARM64.ActiveCfg = Debug|ARM64 {A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}.Debug|ARM64.Build.0 = Debug|ARM64 {A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}.Debug|x64.ActiveCfg = Debug|x64 {A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}.Debug|x64.Build.0 = Debug|x64 {A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}.Debug|x86.ActiveCfg = Debug|Win32 {A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}.Debug|x86.Build.0 = Debug|Win32 - {A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}.Release|ARM.ActiveCfg = Release|ARM - {A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}.Release|ARM.Build.0 = Release|ARM {A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}.Release|ARM64.ActiveCfg = Release|ARM64 {A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}.Release|ARM64.Build.0 = Release|ARM64 {A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}.Release|x64.ActiveCfg = Release|x64 {A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}.Release|x64.Build.0 = Release|x64 {A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}.Release|x86.ActiveCfg = Release|Win32 {A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}.Release|x86.Build.0 = Release|Win32 - {A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}.WinUI3|ARM.ActiveCfg = Release|ARM - {A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}.WinUI3|ARM.Build.0 = Release|ARM {A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}.WinUI3|ARM64.ActiveCfg = Release|ARM64 {A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}.WinUI3|ARM64.Build.0 = Release|ARM64 {A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}.WinUI3|x64.ActiveCfg = Release|x64 {A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}.WinUI3|x64.Build.0 = Release|x64 {A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}.WinUI3|x86.ActiveCfg = Release|Win32 {A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}.WinUI3|x86.Build.0 = Release|Win32 - {11C084A3-A57C-4296-A679-CAC17B603144}.Debug|ARM.ActiveCfg = Debug|ARM - {11C084A3-A57C-4296-A679-CAC17B603144}.Debug|ARM.Build.0 = Debug|ARM {11C084A3-A57C-4296-A679-CAC17B603144}.Debug|ARM64.ActiveCfg = Debug|ARM64 {11C084A3-A57C-4296-A679-CAC17B603144}.Debug|ARM64.Build.0 = Debug|ARM64 {11C084A3-A57C-4296-A679-CAC17B603144}.Debug|x64.ActiveCfg = Debug|x64 {11C084A3-A57C-4296-A679-CAC17B603144}.Debug|x64.Build.0 = Debug|x64 {11C084A3-A57C-4296-A679-CAC17B603144}.Debug|x86.ActiveCfg = Debug|Win32 {11C084A3-A57C-4296-A679-CAC17B603144}.Debug|x86.Build.0 = Debug|Win32 - {11C084A3-A57C-4296-A679-CAC17B603144}.Release|ARM.ActiveCfg = Release|ARM - {11C084A3-A57C-4296-A679-CAC17B603144}.Release|ARM.Build.0 = Release|ARM {11C084A3-A57C-4296-A679-CAC17B603144}.Release|ARM64.ActiveCfg = Release|ARM64 {11C084A3-A57C-4296-A679-CAC17B603144}.Release|ARM64.Build.0 = Release|ARM64 {11C084A3-A57C-4296-A679-CAC17B603144}.Release|x64.ActiveCfg = Release|x64 {11C084A3-A57C-4296-A679-CAC17B603144}.Release|x64.Build.0 = Release|x64 {11C084A3-A57C-4296-A679-CAC17B603144}.Release|x86.ActiveCfg = Release|Win32 {11C084A3-A57C-4296-A679-CAC17B603144}.Release|x86.Build.0 = Release|Win32 - {11C084A3-A57C-4296-A679-CAC17B603144}.WinUI3|ARM.ActiveCfg = WinUI3|ARM - {11C084A3-A57C-4296-A679-CAC17B603144}.WinUI3|ARM.Build.0 = WinUI3|ARM {11C084A3-A57C-4296-A679-CAC17B603144}.WinUI3|ARM64.ActiveCfg = WinUI3|ARM64 {11C084A3-A57C-4296-A679-CAC17B603144}.WinUI3|ARM64.Build.0 = WinUI3|ARM64 {11C084A3-A57C-4296-A679-CAC17B603144}.WinUI3|x64.ActiveCfg = WinUI3|x64 From 7373761a4c9566650179e40bba52681ff9b8cec2 Mon Sep 17 00:00:00 2001 From: Tuan Luong Date: Sun, 12 Dec 2021 13:47:50 +0700 Subject: [PATCH 19/53] check null before trigger action --- .../ExoPlayerFullscreenVideoActivity.java | 46 ++++++++++++------- .../exoplayer/ReactExoplayerView.java | 18 ++------ 2 files changed, 35 insertions(+), 29 deletions(-) diff --git a/android-exoplayer/src/main/java/com/brentvatne/exoplayer/ExoPlayerFullscreenVideoActivity.java b/android-exoplayer/src/main/java/com/brentvatne/exoplayer/ExoPlayerFullscreenVideoActivity.java index 09b2cdfd..d2e6f2d3 100644 --- a/android-exoplayer/src/main/java/com/brentvatne/exoplayer/ExoPlayerFullscreenVideoActivity.java +++ b/android-exoplayer/src/main/java/com/brentvatne/exoplayer/ExoPlayerFullscreenVideoActivity.java @@ -15,19 +15,23 @@ import com.google.android.exoplayer2.SimpleExoPlayer; import com.google.android.exoplayer2.ui.PlayerControlView; public class ExoPlayerFullscreenVideoActivity extends AppCompatActivity implements ReactExoplayerView.FullScreenDelegate { - public static final String EXTRA_ID = "extra_id"; + public static final String EXTRA_EXO_PLAYER_VIEW_ID = "extra_id"; public static final String EXTRA_ORIENTATION = "extra_orientation"; - - private int id; + + private ReactExoplayerView exoplayerView; private PlayerControlView playerControlView; private SimpleExoPlayer player; @Override public void onCreate(Bundle savedInstanceState) { + int exoplayerViewId = getIntent().getIntExtra(EXTRA_EXO_PLAYER_VIEW_ID, -1); + exoplayerView = ReactExoplayerView.getViewInstance(exoplayerViewId); + if (exoplayerView == null) { + finish(); + return; + } super.onCreate(savedInstanceState); getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON); - - id = getIntent().getIntExtra(EXTRA_ID, -1); String orientation = getIntent().getStringExtra(EXTRA_ORIENTATION); if ("landscape".equals(orientation)) { setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_SENSOR_LANDSCAPE); @@ -35,7 +39,7 @@ public class ExoPlayerFullscreenVideoActivity extends AppCompatActivity implemen setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_SENSOR_PORTRAIT); } setContentView(R.layout.exo_player_fullscreen_video); - player = ReactExoplayerView.getViewInstance(id).getPlayer(); + player = exoplayerView.getPlayer(); ExoPlayerView playerView = findViewById(R.id.player_view); playerView.setPlayer(player); @@ -47,25 +51,35 @@ public class ExoPlayerFullscreenVideoActivity extends AppCompatActivity implemen ImageView fullscreenIcon = playerControlView.findViewById(R.id.exo_fullscreen_icon); fullscreenIcon.setImageResource(R.drawable.exo_controls_fullscreen_exit); playerControlView.findViewById(R.id.exo_fullscreen_button) - .setOnClickListener(v -> ReactExoplayerView.getViewInstance(id).setFullscreen(false)); + .setOnClickListener(v -> { + if (exoplayerView != null) { + exoplayerView.setFullscreen(false); + } + }); //Handling the playButton click event playerControlView.findViewById(R.id.exo_play).setOnClickListener(v -> { if (player != null && player.getPlaybackState() == Player.STATE_ENDED) { player.seekTo(0); } - ReactExoplayerView.getViewInstance(id).setPausedModifier(false); + if (exoplayerView != null) { + exoplayerView.setPausedModifier(false); + } }); //Handling the pauseButton click event - playerControlView.findViewById(R.id.exo_pause).setOnClickListener(v -> ReactExoplayerView.getViewInstance(id).setPausedModifier(true)); + playerControlView.findViewById(R.id.exo_pause).setOnClickListener(v -> { + if (exoplayerView != null) { + exoplayerView.setPausedModifier(true); + } + }); } @Override public void onResume() { super.onResume(); - if (ReactExoplayerView.getViewInstance(id) != null) { - ReactExoplayerView.getViewInstance(id).syncPlayerState(); - ReactExoplayerView.getViewInstance(id).registerFullScreenDelegate(this); + if (exoplayerView != null) { + exoplayerView.syncPlayerState(); + exoplayerView.registerFullScreenDelegate(this); } } @@ -73,8 +87,8 @@ public class ExoPlayerFullscreenVideoActivity extends AppCompatActivity implemen public void onPause() { super.onPause(); player.setPlayWhenReady(false); - if (ReactExoplayerView.getViewInstance(id) != null) { - ReactExoplayerView.getViewInstance(id).registerFullScreenDelegate(null); + if (exoplayerView != null) { + exoplayerView.registerFullScreenDelegate(null); } } @@ -89,8 +103,8 @@ public class ExoPlayerFullscreenVideoActivity extends AppCompatActivity implemen @Override public boolean onKeyDown(int keyCode, KeyEvent event) { if ((keyCode == KeyEvent.KEYCODE_BACK)) { - if (ReactExoplayerView.getViewInstance(id) != null) { - ReactExoplayerView.getViewInstance(id).setFullscreen(false); + if (exoplayerView != null) { + exoplayerView.setFullscreen(false); return false; } return true; diff --git a/android-exoplayer/src/main/java/com/brentvatne/exoplayer/ReactExoplayerView.java b/android-exoplayer/src/main/java/com/brentvatne/exoplayer/ReactExoplayerView.java index edd3c45b..482ff939 100644 --- a/android-exoplayer/src/main/java/com/brentvatne/exoplayer/ReactExoplayerView.java +++ b/android-exoplayer/src/main/java/com/brentvatne/exoplayer/ReactExoplayerView.java @@ -29,7 +29,6 @@ import com.google.android.exoplayer2.C; import com.google.android.exoplayer2.DefaultLoadControl; import com.google.android.exoplayer2.DefaultRenderersFactory; import com.google.android.exoplayer2.ExoPlaybackException; -import com.google.android.exoplayer2.ExoPlayerFactory; import com.google.android.exoplayer2.Format; import com.google.android.exoplayer2.PlaybackParameters; import com.google.android.exoplayer2.Player; @@ -38,7 +37,6 @@ import com.google.android.exoplayer2.Timeline; import com.google.android.exoplayer2.drm.DefaultDrmSessionManager; import com.google.android.exoplayer2.drm.DrmSessionEventListener; import com.google.android.exoplayer2.drm.DrmSessionManager; -import com.google.android.exoplayer2.drm.FrameworkMediaCrypto; import com.google.android.exoplayer2.drm.FrameworkMediaDrm; import com.google.android.exoplayer2.drm.HttpMediaDrmCallback; import com.google.android.exoplayer2.drm.UnsupportedDrmException; @@ -60,8 +58,8 @@ import com.google.android.exoplayer2.source.smoothstreaming.DefaultSsChunkSource import com.google.android.exoplayer2.source.smoothstreaming.SsMediaSource; import com.google.android.exoplayer2.trackselection.AdaptiveTrackSelection; import com.google.android.exoplayer2.trackselection.DefaultTrackSelector; -import com.google.android.exoplayer2.trackselection.MappingTrackSelector; import com.google.android.exoplayer2.trackselection.ExoTrackSelection; +import com.google.android.exoplayer2.trackselection.MappingTrackSelector; import com.google.android.exoplayer2.trackselection.TrackSelectionArray; import com.google.android.exoplayer2.ui.PlayerControlView; import com.google.android.exoplayer2.upstream.BandwidthMeter; @@ -77,8 +75,8 @@ import java.net.CookiePolicy; import java.util.ArrayList; import java.util.HashMap; import java.util.Locale; -import java.util.UUID; import java.util.Map; +import java.util.UUID; @SuppressLint("ViewConstructor") class ReactExoplayerView extends FrameLayout implements @@ -101,8 +99,6 @@ class ReactExoplayerView extends FrameLayout implements } private static Map instances = new HashMap<>(); - private static int UNIQUE_ID = 0; - private int uid = ++UNIQUE_ID; private FullScreenDelegate fullScreenDelegate; private final VideoEventEmitter eventEmitter; @@ -141,8 +137,6 @@ class ReactExoplayerView extends FrameLayout implements private int bufferForPlaybackMs = DefaultLoadControl.DEFAULT_BUFFER_FOR_PLAYBACK_MS; private int bufferForPlaybackAfterRebufferMs = DefaultLoadControl.DEFAULT_BUFFER_FOR_PLAYBACK_AFTER_REBUFFER_MS; - private Handler mainHandler; - // Props from React private Uri srcUri; private String extension; @@ -233,8 +227,6 @@ class ReactExoplayerView extends FrameLayout implements exoPlayerView.setLayoutParams(layoutParams); addView(exoPlayerView, 0, layoutParams); - - mainHandler = new Handler(); } @Override @@ -286,7 +278,7 @@ class ReactExoplayerView extends FrameLayout implements public void cleanUpResources() { stopPlayback(); - instances.remove(uid); + instances.remove(this.getId()); } //BandwidthMeter.EventListener implementation @@ -344,9 +336,9 @@ class ReactExoplayerView extends FrameLayout implements } private void showFullscreen() { - instances.put(uid, this); + instances.put(this.getId(), this); Intent intent = new Intent(getContext(), ExoPlayerFullscreenVideoActivity.class); - intent.putExtra(ExoPlayerFullscreenVideoActivity.EXTRA_ID, this.uid); + intent.putExtra(ExoPlayerFullscreenVideoActivity.EXTRA_EXO_PLAYER_VIEW_ID, this.getId()); intent.putExtra(ExoPlayerFullscreenVideoActivity.EXTRA_ORIENTATION, this.fullScreenOrientation); getContext().startActivity(intent); isInFullscreen = true; From 24434f44c2da6a9cfdf21315f56ceaf911b95c67 Mon Sep 17 00:00:00 2001 From: Preetam D'Souza Date: Fri, 14 Jan 2022 23:48:11 -0500 Subject: [PATCH 20/53] Fix NPE with null codecInfo --- .../main/java/com/brentvatne/exoplayer/ReactExoplayerView.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/android-exoplayer/src/main/java/com/brentvatne/exoplayer/ReactExoplayerView.java b/android-exoplayer/src/main/java/com/brentvatne/exoplayer/ReactExoplayerView.java index fe95fdf4..90ea2cc7 100644 --- a/android-exoplayer/src/main/java/com/brentvatne/exoplayer/ReactExoplayerView.java +++ b/android-exoplayer/src/main/java/com/brentvatne/exoplayer/ReactExoplayerView.java @@ -947,7 +947,8 @@ class ReactExoplayerView extends FrameLayout implements // Special case for decoder initialization failures. MediaCodecRenderer.DecoderInitializationException decoderInitializationException = (MediaCodecRenderer.DecoderInitializationException) cause; - if (decoderInitializationException.codecInfo.name == null) { + if (decoderInitializationException.codecInfo == null + || decoderInitializationException.codecInfo.name == null) { if (decoderInitializationException.getCause() instanceof MediaCodecUtil.DecoderQueryException) { errorString = getResources().getString(R.string.error_querying_decoders); } else if (decoderInitializationException.secureDecoderRequired) { From 5b41407d71c34145cf0110d44336a657738edb06 Mon Sep 17 00:00:00 2001 From: Owen Hart Date: Fri, 4 Feb 2022 12:32:34 -0800 Subject: [PATCH 21/53] Fix lint --- DRMType.js | 2 +- Video.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/DRMType.js b/DRMType.js index 473536b2..d873bd69 100644 --- a/DRMType.js +++ b/DRMType.js @@ -2,5 +2,5 @@ export default { WIDEVINE: 'widevine', PLAYREADY: 'playready', CLEARKEY: 'clearkey', - FAIRPLAY: 'fairplay' + FAIRPLAY: 'fairplay', }; diff --git a/Video.js b/Video.js index b492d48b..e1eb6b3b 100644 --- a/Video.js +++ b/Video.js @@ -249,7 +249,7 @@ export default class Video extends Component { NativeModules.VideoManager.setLicenseError && NativeModules.VideoManager.setLicenseError(error, findNodeHandle(this._root)); }); } else { - NativeModules.VideoManager.setLicenseError && NativeModules.VideoManager.setLicenseError("No spc received", findNodeHandle(this._root)); + NativeModules.VideoManager.setLicenseError && NativeModules.VideoManager.setLicenseError('No spc received', findNodeHandle(this._root)); } } } @@ -403,7 +403,7 @@ Video.propTypes = { ]), drm: PropTypes.shape({ type: PropTypes.oneOf([ - DRMType.CLEARKEY, DRMType.FAIRPLAY, DRMType.WIDEVINE, DRMType.PLAYREADY + DRMType.CLEARKEY, DRMType.FAIRPLAY, DRMType.WIDEVINE, DRMType.PLAYREADY, ]), licenseServer: PropTypes.string, headers: PropTypes.shape({}), From 9398a15fc6976803b8664dead13e74f333d027da Mon Sep 17 00:00:00 2001 From: Owen Hart Date: Fri, 4 Feb 2022 16:29:58 -0800 Subject: [PATCH 22/53] Update shaka-player --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index cb8d146e..b7652584 100644 --- a/package.json +++ b/package.json @@ -40,7 +40,7 @@ "dependencies": { "keymirror": "^0.1.1", "prop-types": "^15.7.2", - "shaka-player": "^2.5.9" + "shaka-player": "^3.3.1" }, "scripts": { "lint": "yarn eslint *.js" From ccd9894910e01ccd59d4bad8384843f27db0e057 Mon Sep 17 00:00:00 2001 From: Eran Hammer Date: Tue, 5 Apr 2022 12:34:41 -0700 Subject: [PATCH 23/53] Fix iOS 15.4 race condition --- ios/Video/RCTVideo.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ios/Video/RCTVideo.m b/ios/Video/RCTVideo.m index a757c08a..cecc5fb3 100644 --- a/ios/Video/RCTVideo.m +++ b/ios/Video/RCTVideo.m @@ -1064,8 +1064,8 @@ static int const RCTVideoUnset = -1; [self setSelectedTextTrack:_selectedTextTrack]; [self setResizeMode:_resizeMode]; [self setRepeat:_repeat]; - [self setPaused:_paused]; [self setControls:_controls]; + [self setPaused:_paused]; [self setAllowsExternalPlayback:_allowsExternalPlayback]; } From 0e3de8497278b03c0d1581fc1e433e82f939cc0c Mon Sep 17 00:00:00 2001 From: Eran Hammer Date: Tue, 5 Apr 2022 12:45:53 -0700 Subject: [PATCH 24/53] Update CHANGELOG.md --- CHANGELOG.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bc7f5943..2b500675 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,8 @@ ### Version 5.2.1 -- Add Google's maven repository to avoid build error [#2552] (https://github.com/react-native-video/react-native-video/pull/2552) +- Add Google's maven repository to avoid build error [#2552] (https://github.com/react-native-video/react-native-video/pull/2552) +- Fix iOS 15.4 HLS playback race condition [#2633](#https://github.com/react-native-video/react-native-video/pull/2633) ### Version 5.2.0 From 6da215ccadbbdf5e3c4df9855c9ed0d012c34804 Mon Sep 17 00:00:00 2001 From: Eran Hammer Date: Tue, 19 Apr 2022 00:40:15 -0700 Subject: [PATCH 25/53] Create stale.yml --- .github/stale.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 .github/stale.yml diff --git a/.github/stale.yml b/.github/stale.yml new file mode 100644 index 00000000..17e71884 --- /dev/null +++ b/.github/stale.yml @@ -0,0 +1,19 @@ +# Number of days of inactivity before an issue becomes stale +daysUntilStale: 60 +# Number of days of inactivity before a stale issue is closed +daysUntilClose: 7 +# Issues with these labels will never be considered stale +exemptLabels: + - pinned + - security +# Label to use when marking an issue as stale +staleLabel: wontfix +# Comment to post when marking an issue as stale. Set to `false` to disable +markComment: > + This issue has been automatically marked as stale because it has not had + recent activity. It will be closed if no further activity occurs. Thank you + for your contributions. If you are having a similar problem, please open a + new issue and reference this one instead of commenting on a stale or closed + issue. +# Comment to post when closing a stale issue. Set to `false` to disable +closeComment: false From 9ba249507b4196a971231c60b90b930868aeda08 Mon Sep 17 00:00:00 2001 From: Eran Hammer Date: Tue, 19 Apr 2022 10:00:41 -0700 Subject: [PATCH 26/53] Update CHANGELOG.md --- CHANGELOG.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2b500675..db0b4f9f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,9 +1,10 @@ ## Changelog -### Version 5.2.1 +### Version 6.0.0 - Add Google's maven repository to avoid build error [#2552] (https://github.com/react-native-video/react-native-video/pull/2552) -- Fix iOS 15.4 HLS playback race condition [#2633](#https://github.com/react-native-video/react-native-video/pull/2633) +- Fix iOS 15.4 HLS playback race condition [#2633](https://github.com/react-native-video/react-native-video/pull/2633) +- Add fullscreen support on Android [#2073](https://github.com/react-native-video/react-native-video/pull/2073) ### Version 5.2.0 From ba53bb743de6ce5d9b77d8782282aed173e09bd0 Mon Sep 17 00:00:00 2001 From: Eran Hammer Date: Tue, 19 Apr 2022 10:01:44 -0700 Subject: [PATCH 27/53] Update CHANGELOG.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index db0b4f9f..636d4870 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ ## Changelog -### Version 6.0.0 +### Version 6.0.0-alpha1 - Add Google's maven repository to avoid build error [#2552] (https://github.com/react-native-video/react-native-video/pull/2552) - Fix iOS 15.4 HLS playback race condition [#2633](https://github.com/react-native-video/react-native-video/pull/2633) From 90810fdbf58460963ece70e82db6429b98a9f1e4 Mon Sep 17 00:00:00 2001 From: Eran Hammer Date: Tue, 19 Apr 2022 15:36:02 -0700 Subject: [PATCH 28/53] Update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index b2c01bf0..dd544c55 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ - Add Google's maven repository to avoid build error [#2552] (https://github.com/react-native-video/react-native-video/pull/2552) - Fix iOS 15.4 HLS playback race condition [#2633](https://github.com/react-native-video/react-native-video/pull/2633) - Add fullscreen support on Android [#2073](https://github.com/react-native-video/react-native-video/pull/2073) +- Fix app crash from NPE in Exoplayer error handler [#2575](https://github.com/react-native-video/react-native-video/pull/2575) ### Version 5.2.0 From 54ca713bde505288ae662532402a67cf362bb9ec Mon Sep 17 00:00:00 2001 From: Eran Hammer Date: Tue, 19 Apr 2022 15:40:10 -0700 Subject: [PATCH 29/53] Update CHANGELOG.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index dd544c55..1b445790 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ - Fix iOS 15.4 HLS playback race condition [#2633](https://github.com/react-native-video/react-native-video/pull/2633) - Add fullscreen support on Android [#2073](https://github.com/react-native-video/react-native-video/pull/2073) - Fix app crash from NPE in Exoplayer error handler [#2575](https://github.com/react-native-video/react-native-video/pull/2575) +- Fix default closed captioning behavior for Android ExoPlayer [#2181](https://github.com/react-native-video/react-native-video/pull/2181) ### Version 5.2.0 @@ -18,7 +19,6 @@ ### Version 5.1.0-alpha9 - Add ARM64 support for windows [#2137](https://github.com/react-native-community/react-native-video/pull/2137) -- Fix default closed captioning behavior for Android ExoPlayer [#2181](https://github.com/react-native-video/react-native-video/pull/2181) - Fix deprecated API bug for windows [#2119](https://github.com/react-native-video/react-native-video/pull/2119) - Added `rate` property and autolinking support for windows [#2206](https://github.com/react-native-video/react-native-video/pull/2206) From 1000788764ad403ebe5382a029bf3ff993b1a9c7 Mon Sep 17 00:00:00 2001 From: Eran Hammer Date: Tue, 19 Apr 2022 16:01:44 -0700 Subject: [PATCH 30/53] Update stale.yml --- .github/stale.yml | 53 +++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 47 insertions(+), 6 deletions(-) diff --git a/.github/stale.yml b/.github/stale.yml index 17e71884..0262e33a 100644 --- a/.github/stale.yml +++ b/.github/stale.yml @@ -1,19 +1,60 @@ -# Number of days of inactivity before an issue becomes stale +# Configuration for probot-stale - https://github.com/probot/stale + +# Number of days of inactivity before an Issue or Pull Request becomes stale daysUntilStale: 60 -# Number of days of inactivity before a stale issue is closed + +# Number of days of inactivity before an Issue or Pull Request with the stale label is closed. +# Set to false to disable. If disabled, issues still need to be closed manually, but will remain marked as stale. daysUntilClose: 7 -# Issues with these labels will never be considered stale + +# Only issues or pull requests with all of these labels are check if stale. Defaults to `[]` (disabled) +onlyLabels: [] + +# Issues or Pull Requests with these labels will never be considered stale. Set to `[]` to disable exemptLabels: - pinned - security -# Label to use when marking an issue as stale + +# Set to true to ignore issues in a project (defaults to false) +exemptProjects: true + +# Set to true to ignore issues in a milestone (defaults to false) +exemptMilestones: true + +# Set to true to ignore issues with an assignee (defaults to false) +exemptAssignees: true + +# Label to use when marking as stale staleLabel: wontfix -# Comment to post when marking an issue as stale. Set to `false` to disable + +# Comment to post when marking as stale. Set to `false` to disable markComment: > This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. If you are having a similar problem, please open a new issue and reference this one instead of commenting on a stale or closed issue. -# Comment to post when closing a stale issue. Set to `false` to disable + +# Comment to post when removing the stale label. +unmarkComment: false + +# Comment to post when closing a stale Issue or Pull Request. closeComment: false + +# Limit the number of actions per hour, from 1-30. Default is 30 +limitPerRun: 50 + +# Limit to only `issues` or `pulls` +only: issues + +# Optionally, specify configuration settings that are specific to just 'issues' or 'pulls': +# pulls: +# daysUntilStale: 30 +# markComment: > +# This pull request has been automatically marked as stale because it has not had +# recent activity. It will be closed if no further activity occurs. Thank you +# for your contributions. + +# issues: +# exemptLabels: +# - confirmed From 1aa4e36b854765074666c66dcd034bfb53c374cd Mon Sep 17 00:00:00 2001 From: Eran Hammer Date: Wed, 20 Apr 2022 00:54:39 -0700 Subject: [PATCH 31/53] Update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1b445790..01e65fdb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ - Add fullscreen support on Android [#2073](https://github.com/react-native-video/react-native-video/pull/2073) - Fix app crash from NPE in Exoplayer error handler [#2575](https://github.com/react-native-video/react-native-video/pull/2575) - Fix default closed captioning behavior for Android ExoPlayer [#2181](https://github.com/react-native-video/react-native-video/pull/2181) +- Disable pipController init if pictureInPicture is false [#2645](https://github.com/react-native-video/react-native-video/pull/2645) ### Version 5.2.0 From 0883f0a9be7f3e42d730b0c82fc5371006d2aa6a Mon Sep 17 00:00:00 2001 From: Eran Hammer Date: Wed, 20 Apr 2022 01:16:40 -0700 Subject: [PATCH 32/53] Update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 01e65fdb..ec4fec45 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ - Fix app crash from NPE in Exoplayer error handler [#2575](https://github.com/react-native-video/react-native-video/pull/2575) - Fix default closed captioning behavior for Android ExoPlayer [#2181](https://github.com/react-native-video/react-native-video/pull/2181) - Disable pipController init if pictureInPicture is false [#2645](https://github.com/react-native-video/react-native-video/pull/2645) +- Make sure modifiers are applied before playing [#2395](https://github.com/react-native-video/react-native-video/pull/2395) ### Version 5.2.0 From c027879bd7714f5f9a22481e1f0044319ac89698 Mon Sep 17 00:00:00 2001 From: Frieder Bluemle Date: Thu, 9 Jul 2020 19:52:24 -0700 Subject: [PATCH 33/53] Remove duplicate LICENSE --- dom/LICENSE.md | 9 --------- 1 file changed, 9 deletions(-) delete mode 100644 dom/LICENSE.md diff --git a/dom/LICENSE.md b/dom/LICENSE.md deleted file mode 100644 index aa185c82..00000000 --- a/dom/LICENSE.md +++ /dev/null @@ -1,9 +0,0 @@ -MIT License - -Copyright (c) 2018 Vincent Riemer - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. From 6c86713aff1b4686f1a7418c6cda33324775ea9d Mon Sep 17 00:00:00 2001 From: Frieder Bluemle Date: Thu, 9 Jul 2020 19:57:34 -0700 Subject: [PATCH 34/53] Fix react-native peer deps --- package.json | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index cb8d146e..e145a3b0 100644 --- a/package.json +++ b/package.json @@ -28,13 +28,12 @@ "url": "git@github.com:react-native-community/react-native-video.git" }, "devDependencies": { - "@react-native-community/eslint-config": "0.0.7", - "babel-eslint": "10.0.3", - "eslint": "6.8.0", - "react": "^16.12.0", - "react-dom": "^16.12.0", + "@react-native-community/eslint-config": "^0.0.5", + "eslint": "^6.5.1", + "react": "16.9.0", + "react-dom": "16.9.0", "react-hot-loader": "^4.12.19", - "react-native": "^0.61.5", + "react-native": "0.61.5", "react-native-windows": "^0.61.0-0" }, "dependencies": { From ad98bfa8784411861ed28514acdf44f408233b15 Mon Sep 17 00:00:00 2001 From: Frieder Bluemle Date: Thu, 9 Jul 2020 19:53:34 -0700 Subject: [PATCH 35/53] Fix ESLint setup and errors --- .eslintignore | 1 + dom/RCTVideo.js | 96 +++++++++++++++++++++--------------------- dom/RCTVideoEvent.js | 8 ++-- dom/RCTVideoManager.js | 42 +++++++++--------- dom/index.js | 2 +- package.json | 3 +- 6 files changed, 78 insertions(+), 74 deletions(-) create mode 100644 .eslintignore diff --git a/.eslintignore b/.eslintignore new file mode 100644 index 00000000..d838da98 --- /dev/null +++ b/.eslintignore @@ -0,0 +1 @@ +examples/ diff --git a/dom/RCTVideo.js b/dom/RCTVideo.js index 32128973..77e9dc88 100644 --- a/dom/RCTVideo.js +++ b/dom/RCTVideo.js @@ -1,11 +1,13 @@ // @flow -import { RCTEvent, RCTView, type RCTBridge } from "react-native-dom"; -import shaka from "shaka-player"; +/* eslint-env browser */ -import resizeModes from "./resizeModes"; -import type { VideoSource } from "./types"; -import RCTVideoEvent from "./RCTVideoEvent"; +import { RCTView, type RCTBridge } from 'react-native-dom'; +import shaka from 'shaka-player'; + +import resizeModes from './resizeModes'; +import type { VideoSource } from './types'; +import RCTVideoEvent from './RCTVideoEvent'; class RCTVideo extends RCTView { playPromise: Promise = Promise.resolve(); @@ -24,7 +26,7 @@ class RCTVideo extends RCTView { constructor(bridge: RCTBridge) { super(bridge); - this.eventDispatcher = bridge.getModuleByName("EventDispatcher"); + this.eventDispatcher = bridge.getModuleByName('EventDispatcher'); shaka.polyfill.installAll(); @@ -35,12 +37,12 @@ class RCTVideo extends RCTView { this.onProgress = this.onProgress.bind(this); this.videoElement = this.initializeVideoElement(); - this.videoElement.addEventListener("ended", this.onEnd); - this.videoElement.addEventListener("loadeddata", this.onLoad); - this.videoElement.addEventListener("canplay", this.onReadyForDisplay); - this.videoElement.addEventListener("loadstart", this.onLoadStart); - this.videoElement.addEventListener("pause", this.onPause); - this.videoElement.addEventListener("play", this.onPlay); + this.videoElement.addEventListener('ended', this.onEnd); + this.videoElement.addEventListener('loadeddata', this.onLoad); + this.videoElement.addEventListener('canplay', this.onReadyForDisplay); + this.videoElement.addEventListener('loadstart', this.onLoadStart); + this.videoElement.addEventListener('pause', this.onPause); + this.videoElement.addEventListener('play', this.onPlay); this.player = new shaka.Player(this.videoElement); this.muted = false; @@ -50,26 +52,26 @@ class RCTVideo extends RCTView { } detachFromView(view: UIView) { - this.videoElement.removeEventListener("ended", this.onEnd); - this.videoElement.removeEventListener("loadeddata", this.onLoad); - this.videoElement.removeEventListener("canplay", this.onReadyForDisplay); - this.videoElement.removeEventListener("loadstart", this.onLoadStart); - this.videoElement.removeEventListener("pause", this.onPause); - this.videoElement.removeEventListener("play", this.onPlay); + this.videoElement.removeEventListener('ended', this.onEnd); + this.videoElement.removeEventListener('loadeddata', this.onLoad); + this.videoElement.removeEventListener('canplay', this.onReadyForDisplay); + this.videoElement.removeEventListener('loadstart', this.onLoadStart); + this.videoElement.removeEventListener('pause', this.onPause); + this.videoElement.removeEventListener('play', this.onPlay); this.stopProgressTimer(); } initializeVideoElement() { - const elem = document.createElement("video"); + const elem = document.createElement('video'); Object.assign(elem.style, { - display: "block", - position: "absolute", - top: "0", - left: "0", - width: "100%", - height: "100%" + display: 'block', + position: 'absolute', + top: '0', + left: '0', + width: '100%', + height: '100%', }); return elem; @@ -81,7 +83,7 @@ class RCTVideo extends RCTView { set controls(value: boolean) { this.videoElement.controls = value; - this.videoElement.style.pointerEvents = value ? "auto" : ""; + this.videoElement.style.pointerEvents = value ? 'auto' : ''; } set id(value: string) { @@ -121,19 +123,19 @@ class RCTVideo extends RCTView { set resizeMode(value: number) { switch (value) { case resizeModes.ScaleNone: { - this.videoElement.style.objectFit = "none"; + this.videoElement.style.objectFit = 'none'; break; } case resizeModes.ScaleToFill: { - this.videoElement.style.objectFit = "fill"; + this.videoElement.style.objectFit = 'fill'; break; } case resizeModes.ScaleAspectFit: { - this.videoElement.style.objectFit = "contain"; + this.videoElement.style.objectFit = 'contain'; break; } case resizeModes.ScaleAspectFill: { - this.videoElement.style.objectFit = "cover"; + this.videoElement.style.objectFit = 'cover'; break; } } @@ -146,16 +148,16 @@ class RCTVideo extends RCTView { set source(value: VideoSource) { let uri = value.uri; - if (uri.startsWith("blob:")) { + if (uri.startsWith('blob:')) { let blob = this.bridge.blobManager.resolveURL(uri); - if (blob.type === "text/xml") { - blob = new Blob([blob], { type: "video/mp4" }); + if (blob.type === 'text/xml') { + blob = new Blob([blob], { type: 'video/mp4' }); } uri = URL.createObjectURL(blob); } if (!shaka.Player.isBrowserSupported()) { // primarily iOS WebKit - this.videoElement.setAttribute("src", uri); + this.videoElement.setAttribute('src', uri); if (!this._paused) { this.requestPlay(); } @@ -181,12 +183,12 @@ class RCTVideo extends RCTView { onEnd = () => { this.onProgress(); - this.sendEvent("topVideoEnd", null); - this.stopProgressTimer(); + this.sendEvent('topVideoEnd', null); + this.stopProgressTimer(); } onError = error => { - console.warn("topVideoError", error); + console.warn('topVideoError', error); } onLoad = () => { @@ -199,23 +201,23 @@ class RCTVideo extends RCTView { naturalSize: { width, height, - orientation: width >= height ? "landscape" : "portrait" - } + orientation: width >= height ? 'landscape' : 'portrait', + }, }; - this.sendEvent("topVideoLoad", payload); + this.sendEvent('topVideoLoad', payload); } onReadyForDisplay = () => { - this.sendEvent("onReadyForDisplay"); + this.sendEvent('onReadyForDisplay'); } onLoadStart = () => { const src = this.videoElement.currentSrc; const payload = { isNetwork: !src.match(/^https?:\/\/localhost/), // require is served from localhost - uri: this.videoElement.currentSrc + uri: this.videoElement.currentSrc, }; - this.sendEvent("topVideoLoadStart", payload); + this.sendEvent('topVideoLoadStart', payload); } onPause = () => { @@ -229,13 +231,13 @@ class RCTVideo extends RCTView { onProgress = () => { const payload = { currentTime: this.videoElement.currentTime, - seekableDuration: this.videoElement.duration + seekableDuration: this.videoElement.duration, }; - this.sendEvent("topVideoProgress", payload); + this.sendEvent('topVideoProgress', payload); } onRejectedAutoplay = () => { - this.sendEvent("topVideoRejectedAutoplay", null); + this.sendEvent('topVideoRejectedAutoplay', null); } requestPlay() { @@ -273,6 +275,6 @@ class RCTVideo extends RCTView { } } -customElements.define("rct-video", RCTVideo); +customElements.define('rct-video', RCTVideo); export default RCTVideo; diff --git a/dom/RCTVideoEvent.js b/dom/RCTVideoEvent.js index 699a88c4..4a772cf5 100644 --- a/dom/RCTVideoEvent.js +++ b/dom/RCTVideoEvent.js @@ -4,10 +4,10 @@ interface RCTEvent { viewTag: number; eventName: string; coalescingKey: number; - + canCoalesce(): boolean; coalesceWithEvent(event: RCTEvent): RCTEvent; - + moduleDotMethod(): string; arguments(): Array; } @@ -38,14 +38,14 @@ export default class RCTVideoEvent implements RCTEvent { } moduleDotMethod(): string { - return "RCTEventEmitter.receiveEvent"; + return 'RCTEventEmitter.receiveEvent'; } arguments(): Array { const args = [ this.viewTag, this.eventName, - this.data + this.data, ]; return args; } diff --git a/dom/RCTVideoManager.js b/dom/RCTVideoManager.js index 2eb5309b..efeb4ae0 100644 --- a/dom/RCTVideoManager.js +++ b/dom/RCTVideoManager.js @@ -1,14 +1,14 @@ // @flow -import { RCTViewManager } from "react-native-dom"; +import { RCTViewManager } from 'react-native-dom'; -import RCTVideo from "./RCTVideo"; -import resizeModes from "./resizeModes"; +import RCTVideo from './RCTVideo'; +import resizeModes from './resizeModes'; -import type { VideoSource } from "./types"; +import type { VideoSource } from './types'; class RCTVideoManager extends RCTViewManager { - static moduleName = "RCTVideoManager"; + static moduleName = 'RCTVideoManager'; view() { return new RCTVideo(this.bridge); @@ -17,22 +17,22 @@ class RCTVideoManager extends RCTViewManager { describeProps() { return super .describeProps() - .addBooleanProp("controls", this.setControls) - .addStringProp("id", this.setId) - .addBooleanProp("muted", this.setMuted) - .addBooleanProp("paused", this.setPaused) - .addNumberProp("progressUpdateInterval", this.setProgressUpdateInterval) - .addBooleanProp("rate", this.setRate) - .addBooleanProp("repeat", this.setRepeat) - .addNumberProp("resizeMode", this.setResizeMode) - .addNumberProp("seek", this.setSeek) - .addObjectProp("src", this.setSource) - .addNumberProp("volume", this.setVolume) - .addDirectEvent("onVideoEnd") - .addDirectEvent("onVideoError") - .addDirectEvent("onVideoLoad") - .addDirectEvent("onVideoLoadStart") - .addDirectEvent("onVideoProgress"); + .addBooleanProp('controls', this.setControls) + .addStringProp('id', this.setId) + .addBooleanProp('muted', this.setMuted) + .addBooleanProp('paused', this.setPaused) + .addNumberProp('progressUpdateInterval', this.setProgressUpdateInterval) + .addBooleanProp('rate', this.setRate) + .addBooleanProp('repeat', this.setRepeat) + .addNumberProp('resizeMode', this.setResizeMode) + .addNumberProp('seek', this.setSeek) + .addObjectProp('src', this.setSource) + .addNumberProp('volume', this.setVolume) + .addDirectEvent('onVideoEnd') + .addDirectEvent('onVideoError') + .addDirectEvent('onVideoLoad') + .addDirectEvent('onVideoLoadStart') + .addDirectEvent('onVideoProgress'); } dismissFullscreenPlayer() { diff --git a/dom/index.js b/dom/index.js index d68d5bba..e097d5fb 100644 --- a/dom/index.js +++ b/dom/index.js @@ -1,3 +1,3 @@ // @flow -module.exports = require("./RCTVideoManager"); +module.exports = require('./RCTVideoManager'); diff --git a/package.json b/package.json index e145a3b0..29507d8b 100644 --- a/package.json +++ b/package.json @@ -34,6 +34,7 @@ "react-dom": "16.9.0", "react-hot-loader": "^4.12.19", "react-native": "0.61.5", + "react-native-dom": "^0.5.0", "react-native-windows": "^0.61.0-0" }, "dependencies": { @@ -42,7 +43,7 @@ "shaka-player": "^2.5.9" }, "scripts": { - "lint": "yarn eslint *.js" + "lint": "eslint ." }, "files": [ "android-exoplayer", From 18f1c0d7605dac5d944e207119c2ee38e2c8018e Mon Sep 17 00:00:00 2001 From: Frieder Bluemle Date: Thu, 9 Jul 2020 20:38:54 -0700 Subject: [PATCH 36/53] Enable basic GitHub Actions CI --- .github/workflows/ci.yml | 10 ++++++++++ README.md | 4 ++++ 2 files changed, 14 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 00000000..efe65552 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,10 @@ +name: ci +on: [push, pull_request] +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v1 + - run: yarn --no-lockfile + - run: yarn lint diff --git a/README.md b/README.md index 9c396a2f..04f56375 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ ## react-native-video +[![ci][4]][5] + A `