@capgo/capacitor-video-player 8.0.5 → 8.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -79,7 +79,6 @@ import com.google.android.exoplayer2.upstream.DefaultBandwidthMeter;
79
79
  import com.google.android.exoplayer2.upstream.DefaultDataSourceFactory;
80
80
  import com.google.android.exoplayer2.upstream.DefaultHttpDataSource;
81
81
  import com.google.android.exoplayer2.util.MimeTypes;
82
- import com.google.android.exoplayer2.util.Util;
83
82
  import com.google.android.gms.cast.framework.CastButtonFactory;
84
83
  import com.google.android.gms.cast.framework.CastContext;
85
84
  import com.google.android.gms.cast.framework.CastState;
@@ -638,19 +637,17 @@ public class FullscreenExoPlayerFragment extends Fragment {
638
637
  super.onStart();
639
638
  //if (chromecast && castContext != null) mRouter.addCallback(mSelector, mCallback, MediaRouter.CALLBACK_FLAG_REQUEST_DISCOVERY);
640
639
 
641
- if (Util.SDK_INT >= 24) {
642
- if (styledPlayerView != null) {
643
- // If cast is playing then it doesn't start the local player once get backs from background
644
- if (castContext != null && chromecast && castPlayer.isCastSessionAvailable()) return;
640
+ if (styledPlayerView != null) {
641
+ // If cast is playing then it doesn't start the local player once get backs from background
642
+ if (castContext != null && chromecast && castPlayer.isCastSessionAvailable()) return;
645
643
 
646
- initializePlayer();
647
- if (player.getCurrentPosition() != 0) {
648
- firstReadyToPlay = false;
649
- play();
650
- }
651
- } else {
652
- getActivity().finishAndRemoveTask();
644
+ initializePlayer();
645
+ if (player.getCurrentPosition() != 0) {
646
+ firstReadyToPlay = false;
647
+ play();
653
648
  }
649
+ } else {
650
+ getActivity().finishAndRemoveTask();
654
651
  }
655
652
  }
656
653
 
@@ -690,17 +687,12 @@ public class FullscreenExoPlayerFragment extends Fragment {
690
687
  if (bkModeEnabled) isAppBackground = isApplicationSentToBackground(context);
691
688
 
692
689
  if (!isInPictureInPictureMode) {
693
- if (Util.SDK_INT < 24) {
694
- if (player != null) player.setPlayWhenReady(false);
695
- releasePlayer();
696
- } else {
697
- if (isAppBackground) {
698
- if (player != null) {
699
- if (player.isPlaying()) play();
700
- }
701
- } else {
702
- pause();
690
+ if (isAppBackground) {
691
+ if (player != null) {
692
+ if (player.isPlaying()) play();
703
693
  }
694
+ } else {
695
+ pause();
704
696
  }
705
697
  } else {
706
698
  if (linearLayout.getVisibility() == View.VISIBLE) {
@@ -742,7 +734,7 @@ public class FullscreenExoPlayerFragment extends Fragment {
742
734
  //if (chromecast && castContext != null) castContext.addCastStateListener(castStateListener);
743
735
  if (!isInPictureInPictureMode) {
744
736
  hideSystemUi();
745
- if ((Util.SDK_INT < 24 || player == null)) {
737
+ if (player == null) {
746
738
  initializePlayer();
747
739
  }
748
740
  } else {
@@ -38,7 +38,7 @@ import java.util.Map;
38
38
  )
39
39
  public class VideoPlayerPlugin extends Plugin {
40
40
 
41
- private final String pluginVersion = "8.0.5";
41
+ private final String pluginVersion = "8.0.6";
42
42
 
43
43
  // Permission alias constants
44
44
  private static final String PERMISSION_DENIED_ERROR = "Unable to access media videos, user denied permission request";
@@ -8,7 +8,7 @@ import AVKit
8
8
  */
9
9
  @objc(VideoPlayerPlugin)
10
10
  public class VideoPlayerPlugin: CAPPlugin, CAPBridgedPlugin {
11
- private let pluginVersion: String = "8.0.5"
11
+ private let pluginVersion: String = "8.0.6"
12
12
  public let identifier = "VideoPlayerPlugin"
13
13
  public let jsName = "VideoPlayer"
14
14
  public let pluginMethods: [CAPPluginMethod] = [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@capgo/capacitor-video-player",
3
- "version": "8.0.5",
3
+ "version": "8.0.6",
4
4
  "description": "Capacitor plugin to play video in native player",
5
5
  "main": "dist/plugin.cjs.js",
6
6
  "module": "dist/esm/index.js",