@picsa/capacitor-video-player 7.1.0 → 7.2.3
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/CapacitorVideoPlayer.podspec +17 -17
- package/LICENSE +21 -21
- package/android/build.gradle +71 -71
- package/android/src/main/AndroidManifest.xml +3 -3
- package/android/src/main/java/com/jeep/plugin/capacitor/capacitorvideoplayer/CapacitorVideoPlayer.java +71 -71
- package/android/src/main/java/com/jeep/plugin/capacitor/capacitorvideoplayer/CapacitorVideoPlayerPlugin.java +1256 -1256
- package/android/src/main/java/com/jeep/plugin/capacitor/capacitorvideoplayer/FullscreenExoPlayerFragment.java +1591 -1595
- package/android/src/main/java/com/jeep/plugin/capacitor/capacitorvideoplayer/Notifications/MyRunnable.java +21 -21
- package/android/src/main/java/com/jeep/plugin/capacitor/capacitorvideoplayer/Notifications/NotificationCenter.java +61 -61
- package/android/src/main/java/com/jeep/plugin/capacitor/capacitorvideoplayer/PickerVideo/AdapterVideoList.java +47 -47
- package/android/src/main/java/com/jeep/plugin/capacitor/capacitorvideoplayer/PickerVideo/ModelVideo.java +49 -49
- package/android/src/main/java/com/jeep/plugin/capacitor/capacitorvideoplayer/PickerVideo/PickerVideoFragment.java +119 -119
- package/android/src/main/java/com/jeep/plugin/capacitor/capacitorvideoplayer/PickerVideo/VideoRecyclerViewHolder.java +65 -65
- package/android/src/main/java/com/jeep/plugin/capacitor/capacitorvideoplayer/Utilities/FilesUtils.java +101 -101
- package/android/src/main/java/com/jeep/plugin/capacitor/capacitorvideoplayer/Utilities/FragmentUtils.java +32 -32
- package/android/src/main/res/drawable/bg_round_rect_white_50.xml +9 -9
- package/android/src/main/res/drawable/bg_rounded_rectangle_white_corner_rounded.xml +10 -10
- package/android/src/main/res/drawable/exo_close_btn.xml +11 -11
- package/android/src/main/res/drawable/gradient_transparent_middle.xml +12 -12
- package/android/src/main/res/drawable/ic_arrow_left.xml +5 -5
- package/android/src/main/res/drawable/ic_baseline_lq.xml +7 -7
- package/android/src/main/res/drawable/ic_exo_icon_fastforward.xml +35 -35
- package/android/src/main/res/drawable/ic_exo_icon_pause.xml +26 -26
- package/android/src/main/res/drawable/ic_exo_icon_play.xml +36 -36
- package/android/src/main/res/drawable/ic_exo_icon_rewind.xml +35 -35
- package/android/src/main/res/drawable/ic_expand.xml +5 -5
- package/android/src/main/res/drawable/ic_fit.xml +5 -5
- package/android/src/main/res/drawable/ic_image_background.xml +12 -12
- package/android/src/main/res/drawable/ic_img_16_9_background.xml +10 -10
- package/android/src/main/res/drawable/ic_img_9_16_background.xml +10 -10
- package/android/src/main/res/drawable/ic_outline_lock.xml +5 -5
- package/android/src/main/res/drawable/ic_outline_lock_open.xml +5 -5
- package/android/src/main/res/drawable/ic_pip_white.xml +5 -5
- package/android/src/main/res/drawable/ic_views.xml +18 -18
- package/android/src/main/res/drawable/ic_zoom.xml +5 -5
- package/android/src/main/res/layout/bridge_layout_main.xml +15 -15
- package/android/src/main/res/layout/exo_playback_control_view.xml +289 -289
- package/android/src/main/res/layout/exoplayer_layout_youtube.xml +361 -361
- package/android/src/main/res/layout/fragment_fs_exoplayer.xml +50 -50
- package/android/src/main/res/layout/fragment_picker_video.xml +21 -21
- package/android/src/main/res/layout/row_video.xml +76 -76
- package/android/src/main/res/values/colors.xml +14 -14
- package/android/src/main/res/values/strings.xml +3 -3
- package/android/src/main/res/values/styles.xml +3 -3
- package/dist/docs.json +14 -14
- package/ios/Plugin/CapacitorVideoPlayer.swift +63 -63
- package/ios/Plugin/CapacitorVideoPlayerPlugin.h +10 -10
- package/ios/Plugin/CapacitorVideoPlayerPlugin.m +22 -22
- package/ios/Plugin/CapacitorVideoPlayerPlugin.swift +631 -631
- package/ios/Plugin/Extensions/CapacitorVideoPlayerPlugin.AVPlayerViewController.swift +59 -59
- package/ios/Plugin/Extensions/CapacitorVideoPlayerPlugin.File.swift +126 -126
- package/ios/Plugin/Extensions/CapacitorVideoPlayerPlugin.Fullscreen.swift +94 -94
- package/ios/Plugin/Extensions/CapacitorVideoPlayerPlugin.Notifications.swift +140 -140
- package/ios/Plugin/Extensions/CapacitorVideoPlayerPlugin.Observers.swift +180 -180
- package/ios/Plugin/Info.plist +24 -24
- package/ios/Plugin/VideoPicker/VideoHelper.swift +127 -127
- package/ios/Plugin/VideoPicker/VideoPickerViewController.swift +144 -144
- package/ios/Plugin/VideoPlayer/Extensions/AVURLAsset.swift +18 -18
- package/ios/Plugin/VideoPlayer/Extensions/AllOrientationAVPlayerController.swift +12 -12
- package/ios/Plugin/VideoPlayer/Extensions/CMTime.swift +23 -23
- package/ios/Plugin/VideoPlayer/Extensions/LandscapeAVPlayerController.swift +12 -12
- package/ios/Plugin/VideoPlayer/Extensions/Notification.Name.swift +18 -18
- package/ios/Plugin/VideoPlayer/Extensions/PortraitAVPlayerController.swift +12 -12
- package/ios/Plugin/VideoPlayer/Extensions/View.swift +54 -54
- package/ios/Plugin/VideoPlayer/FullScreenVideoPlayerView.swift +601 -601
- package/ios/Plugin/VideoPlayer/Models/Video.swift +28 -28
- package/ios/Plugin/VideoPlayer/Models/VideoModel.swift +42 -42
- package/package.json +92 -92
- package/readme.md +227 -190
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
//
|
|
2
|
-
// CMTime.swift
|
|
3
|
-
// Plugin
|
|
4
|
-
//
|
|
5
|
-
// Created by Quéau Jean Pierre on 13/01/2020.
|
|
6
|
-
// Copyright © 2021 Max Lynch. All rights reserved.
|
|
7
|
-
//
|
|
8
|
-
|
|
9
|
-
import CoreMedia
|
|
10
|
-
|
|
11
|
-
extension CMTime {
|
|
12
|
-
public var stringValue: String {
|
|
13
|
-
let totalSeconds = Int(self.seconds)
|
|
14
|
-
let hours = totalSeconds / 3600
|
|
15
|
-
let minutes = totalSeconds % 3600 / 60
|
|
16
|
-
let seconds = totalSeconds % 3600 % 60
|
|
17
|
-
if hours > 0 {
|
|
18
|
-
return String(format: "%i:%02i:%02i", hours, minutes, seconds)
|
|
19
|
-
} else {
|
|
20
|
-
return String(format: "%02i:%02i", minutes, seconds)
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
}
|
|
1
|
+
//
|
|
2
|
+
// CMTime.swift
|
|
3
|
+
// Plugin
|
|
4
|
+
//
|
|
5
|
+
// Created by Quéau Jean Pierre on 13/01/2020.
|
|
6
|
+
// Copyright © 2021 Max Lynch. All rights reserved.
|
|
7
|
+
//
|
|
8
|
+
|
|
9
|
+
import CoreMedia
|
|
10
|
+
|
|
11
|
+
extension CMTime {
|
|
12
|
+
public var stringValue: String {
|
|
13
|
+
let totalSeconds = Int(self.seconds)
|
|
14
|
+
let hours = totalSeconds / 3600
|
|
15
|
+
let minutes = totalSeconds % 3600 / 60
|
|
16
|
+
let seconds = totalSeconds % 3600 % 60
|
|
17
|
+
if hours > 0 {
|
|
18
|
+
return String(format: "%i:%02i:%02i", hours, minutes, seconds)
|
|
19
|
+
} else {
|
|
20
|
+
return String(format: "%02i:%02i", minutes, seconds)
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
//
|
|
2
|
-
// LandscapeAVPlayerController.swift
|
|
3
|
-
// CapacitorVideoPlayer
|
|
4
|
-
//
|
|
5
|
-
// Created by Quéau Jean Pierre on 23/05/2023.
|
|
6
|
-
//
|
|
7
|
-
|
|
8
|
-
import AVKit
|
|
9
|
-
class LandscapeAVPlayerController: AVPlayerViewController {
|
|
10
|
-
override var supportedInterfaceOrientations: UIInterfaceOrientationMask {
|
|
11
|
-
return .landscapeRight }
|
|
12
|
-
}
|
|
1
|
+
//
|
|
2
|
+
// LandscapeAVPlayerController.swift
|
|
3
|
+
// CapacitorVideoPlayer
|
|
4
|
+
//
|
|
5
|
+
// Created by Quéau Jean Pierre on 23/05/2023.
|
|
6
|
+
//
|
|
7
|
+
|
|
8
|
+
import AVKit
|
|
9
|
+
class LandscapeAVPlayerController: AVPlayerViewController {
|
|
10
|
+
override var supportedInterfaceOrientations: UIInterfaceOrientationMask {
|
|
11
|
+
return .landscapeRight }
|
|
12
|
+
}
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Notification.Name.swift
|
|
3
|
-
// Plugin
|
|
4
|
-
//
|
|
5
|
-
// Created by Quéau Jean Pierre on 13/01/2020.
|
|
6
|
-
// Copyright © 2021 Max Lynch. All rights reserved.
|
|
7
|
-
//
|
|
8
|
-
|
|
9
|
-
import Foundation
|
|
10
|
-
extension NSNotification.Name {
|
|
11
|
-
static var playerItemPlay: Notification.Name {return .init(rawValue: "playerItemPlay")}
|
|
12
|
-
static var playerItemPause: Notification.Name {return .init(rawValue: "playerItemPause")}
|
|
13
|
-
static var playerItemEnd: Notification.Name {return .init(rawValue: "playerItemEnd")}
|
|
14
|
-
static var playerItemReady: Notification.Name {return .init(rawValue: "playerItemReady")}
|
|
15
|
-
static var playerInTableDismiss: Notification.Name {return .init(rawValue: "playerInTableDismiss")}
|
|
16
|
-
static var playerFullscreenDismiss: Notification.Name {return .init(rawValue: "playerFullscreenDismiss")}
|
|
17
|
-
static var videoPathInternalReady: Notification.Name {return .init(rawValue: "videoPathInternalReady")}
|
|
18
|
-
}
|
|
1
|
+
//
|
|
2
|
+
// Notification.Name.swift
|
|
3
|
+
// Plugin
|
|
4
|
+
//
|
|
5
|
+
// Created by Quéau Jean Pierre on 13/01/2020.
|
|
6
|
+
// Copyright © 2021 Max Lynch. All rights reserved.
|
|
7
|
+
//
|
|
8
|
+
|
|
9
|
+
import Foundation
|
|
10
|
+
extension NSNotification.Name {
|
|
11
|
+
static var playerItemPlay: Notification.Name {return .init(rawValue: "playerItemPlay")}
|
|
12
|
+
static var playerItemPause: Notification.Name {return .init(rawValue: "playerItemPause")}
|
|
13
|
+
static var playerItemEnd: Notification.Name {return .init(rawValue: "playerItemEnd")}
|
|
14
|
+
static var playerItemReady: Notification.Name {return .init(rawValue: "playerItemReady")}
|
|
15
|
+
static var playerInTableDismiss: Notification.Name {return .init(rawValue: "playerInTableDismiss")}
|
|
16
|
+
static var playerFullscreenDismiss: Notification.Name {return .init(rawValue: "playerFullscreenDismiss")}
|
|
17
|
+
static var videoPathInternalReady: Notification.Name {return .init(rawValue: "videoPathInternalReady")}
|
|
18
|
+
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
//
|
|
2
|
-
// PortraitAVPlayerController.swift
|
|
3
|
-
// CapacitorVideoPlayer
|
|
4
|
-
//
|
|
5
|
-
// Created by Quéau Jean Pierre on 23/05/2023.
|
|
6
|
-
//
|
|
7
|
-
|
|
8
|
-
import AVKit
|
|
9
|
-
class PortraitAVPlayerController: AVPlayerViewController {
|
|
10
|
-
override var supportedInterfaceOrientations: UIInterfaceOrientationMask {
|
|
11
|
-
return .portrait }
|
|
12
|
-
}
|
|
1
|
+
//
|
|
2
|
+
// PortraitAVPlayerController.swift
|
|
3
|
+
// CapacitorVideoPlayer
|
|
4
|
+
//
|
|
5
|
+
// Created by Quéau Jean Pierre on 23/05/2023.
|
|
6
|
+
//
|
|
7
|
+
|
|
8
|
+
import AVKit
|
|
9
|
+
class PortraitAVPlayerController: AVPlayerViewController {
|
|
10
|
+
override var supportedInterfaceOrientations: UIInterfaceOrientationMask {
|
|
11
|
+
return .portrait }
|
|
12
|
+
}
|
|
@@ -1,54 +1,54 @@
|
|
|
1
|
-
//
|
|
2
|
-
// View.swift
|
|
3
|
-
// Plugin
|
|
4
|
-
//
|
|
5
|
-
// Sample_TableView
|
|
6
|
-
//
|
|
7
|
-
// Created by Esat Kemal Ekren on 5.04.2018.
|
|
8
|
-
// Copyright © 2021 Esat Kemal Ekren. All rights reserved.
|
|
9
|
-
// Copyright © 2021 Max Lynch. All rights reserved.
|
|
10
|
-
//
|
|
11
|
-
|
|
12
|
-
import UIKit
|
|
13
|
-
|
|
14
|
-
extension UIView {
|
|
15
|
-
// swiftlint:disable function_parameter_count
|
|
16
|
-
func anchor (paddingTop: CGFloat, paddingLeft: CGFloat, paddingBottom: CGFloat,
|
|
17
|
-
paddingRight: CGFloat, width: CGFloat, height: CGFloat, enableInsets: Bool,
|
|
18
|
-
top: NSLayoutYAxisAnchor? = nil, left: NSLayoutXAxisAnchor? = nil,
|
|
19
|
-
bottom: NSLayoutYAxisAnchor? = nil, right: NSLayoutXAxisAnchor? = nil) {
|
|
20
|
-
|
|
21
|
-
var topInset = CGFloat(0)
|
|
22
|
-
var bottomInset = CGFloat(0)
|
|
23
|
-
|
|
24
|
-
if #available(iOS 11, *), enableInsets {
|
|
25
|
-
let insets = self.safeAreaInsets
|
|
26
|
-
topInset = insets.top
|
|
27
|
-
bottomInset = insets.bottom
|
|
28
|
-
print("Top: \(topInset)")
|
|
29
|
-
print("bottom: \(bottomInset)")
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
translatesAutoresizingMaskIntoConstraints = false
|
|
33
|
-
|
|
34
|
-
if let mTop = top {
|
|
35
|
-
self.topAnchor.constraint(equalTo: mTop, constant: paddingTop+topInset).isActive = true
|
|
36
|
-
}
|
|
37
|
-
if let mLeft = left {
|
|
38
|
-
self.leftAnchor.constraint(equalTo: mLeft, constant: paddingLeft).isActive = true
|
|
39
|
-
}
|
|
40
|
-
if let mRight = right {
|
|
41
|
-
self.rightAnchor.constraint(equalTo: mRight, constant: -paddingRight).isActive = true
|
|
42
|
-
}
|
|
43
|
-
if let mBottom = bottom {
|
|
44
|
-
self.bottomAnchor.constraint(equalTo: mBottom, constant: -paddingBottom-bottomInset).isActive = true
|
|
45
|
-
}
|
|
46
|
-
if height != 0 {
|
|
47
|
-
self.heightAnchor.constraint(equalToConstant: height).isActive = true
|
|
48
|
-
}
|
|
49
|
-
if width != 0 {
|
|
50
|
-
self.widthAnchor.constraint(equalToConstant: width).isActive = true
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
// swiftlint:enable function_parameter_count
|
|
54
|
-
}
|
|
1
|
+
//
|
|
2
|
+
// View.swift
|
|
3
|
+
// Plugin
|
|
4
|
+
//
|
|
5
|
+
// Sample_TableView
|
|
6
|
+
//
|
|
7
|
+
// Created by Esat Kemal Ekren on 5.04.2018.
|
|
8
|
+
// Copyright © 2021 Esat Kemal Ekren. All rights reserved.
|
|
9
|
+
// Copyright © 2021 Max Lynch. All rights reserved.
|
|
10
|
+
//
|
|
11
|
+
|
|
12
|
+
import UIKit
|
|
13
|
+
|
|
14
|
+
extension UIView {
|
|
15
|
+
// swiftlint:disable function_parameter_count
|
|
16
|
+
func anchor (paddingTop: CGFloat, paddingLeft: CGFloat, paddingBottom: CGFloat,
|
|
17
|
+
paddingRight: CGFloat, width: CGFloat, height: CGFloat, enableInsets: Bool,
|
|
18
|
+
top: NSLayoutYAxisAnchor? = nil, left: NSLayoutXAxisAnchor? = nil,
|
|
19
|
+
bottom: NSLayoutYAxisAnchor? = nil, right: NSLayoutXAxisAnchor? = nil) {
|
|
20
|
+
|
|
21
|
+
var topInset = CGFloat(0)
|
|
22
|
+
var bottomInset = CGFloat(0)
|
|
23
|
+
|
|
24
|
+
if #available(iOS 11, *), enableInsets {
|
|
25
|
+
let insets = self.safeAreaInsets
|
|
26
|
+
topInset = insets.top
|
|
27
|
+
bottomInset = insets.bottom
|
|
28
|
+
print("Top: \(topInset)")
|
|
29
|
+
print("bottom: \(bottomInset)")
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
translatesAutoresizingMaskIntoConstraints = false
|
|
33
|
+
|
|
34
|
+
if let mTop = top {
|
|
35
|
+
self.topAnchor.constraint(equalTo: mTop, constant: paddingTop+topInset).isActive = true
|
|
36
|
+
}
|
|
37
|
+
if let mLeft = left {
|
|
38
|
+
self.leftAnchor.constraint(equalTo: mLeft, constant: paddingLeft).isActive = true
|
|
39
|
+
}
|
|
40
|
+
if let mRight = right {
|
|
41
|
+
self.rightAnchor.constraint(equalTo: mRight, constant: -paddingRight).isActive = true
|
|
42
|
+
}
|
|
43
|
+
if let mBottom = bottom {
|
|
44
|
+
self.bottomAnchor.constraint(equalTo: mBottom, constant: -paddingBottom-bottomInset).isActive = true
|
|
45
|
+
}
|
|
46
|
+
if height != 0 {
|
|
47
|
+
self.heightAnchor.constraint(equalToConstant: height).isActive = true
|
|
48
|
+
}
|
|
49
|
+
if width != 0 {
|
|
50
|
+
self.widthAnchor.constraint(equalToConstant: width).isActive = true
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
// swiftlint:enable function_parameter_count
|
|
54
|
+
}
|