@capgo/capacitor-video-player 8.0.4 → 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.
- package/android/src/main/java/com/capgo/videoplayer/FullscreenExoPlayerFragment.java +15 -23
- package/android/src/main/java/com/capgo/videoplayer/VideoPlayerPlugin.java +1 -1
- package/ios/Sources/VideoPlayerPlugin/FullscreenVideoPlayer.swift +1 -3
- package/ios/Sources/VideoPlayerPlugin/VideoPlayerPlugin.swift +1 -1
- package/package.json +1 -1
|
@@ -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 (
|
|
642
|
-
|
|
643
|
-
|
|
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
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
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 (
|
|
694
|
-
if (player != null)
|
|
695
|
-
|
|
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 (
|
|
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.
|
|
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";
|
|
@@ -51,9 +51,7 @@ class FullscreenVideoPlayer: NSObject {
|
|
|
51
51
|
playerViewController?.showsPlaybackControls = showControls
|
|
52
52
|
|
|
53
53
|
// Picture in Picture support
|
|
54
|
-
|
|
55
|
-
playerViewController?.allowsPictureInPicturePlayback = pipEnabled
|
|
56
|
-
}
|
|
54
|
+
playerViewController?.allowsPictureInPicturePlayback = pipEnabled
|
|
57
55
|
|
|
58
56
|
// Setup observers
|
|
59
57
|
setupObservers()
|
|
@@ -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.
|
|
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] = [
|