@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,28 +1,28 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Video.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
|
-
class Video: NSObject {
|
|
11
|
-
var urlPath: String?
|
|
12
|
-
var imgPath: String?
|
|
13
|
-
var title: String?
|
|
14
|
-
var content: String?
|
|
15
|
-
var width: Int?
|
|
16
|
-
var height: Int?
|
|
17
|
-
override init() {
|
|
18
|
-
|
|
19
|
-
}
|
|
20
|
-
init(urlPath: String, imgPath: String?, title: String, content: String, width: Int, height: Int) {
|
|
21
|
-
self.urlPath = urlPath
|
|
22
|
-
self.imgPath = imgPath
|
|
23
|
-
self.title = title
|
|
24
|
-
self.content = content
|
|
25
|
-
self.width = width
|
|
26
|
-
self.height = height
|
|
27
|
-
}
|
|
28
|
-
}
|
|
1
|
+
//
|
|
2
|
+
// Video.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
|
+
class Video: NSObject {
|
|
11
|
+
var urlPath: String?
|
|
12
|
+
var imgPath: String?
|
|
13
|
+
var title: String?
|
|
14
|
+
var content: String?
|
|
15
|
+
var width: Int?
|
|
16
|
+
var height: Int?
|
|
17
|
+
override init() {
|
|
18
|
+
|
|
19
|
+
}
|
|
20
|
+
init(urlPath: String, imgPath: String?, title: String, content: String, width: Int, height: Int) {
|
|
21
|
+
self.urlPath = urlPath
|
|
22
|
+
self.imgPath = imgPath
|
|
23
|
+
self.title = title
|
|
24
|
+
self.content = content
|
|
25
|
+
self.width = width
|
|
26
|
+
self.height = height
|
|
27
|
+
}
|
|
28
|
+
}
|
|
@@ -1,42 +1,42 @@
|
|
|
1
|
-
//
|
|
2
|
-
// VideoModel.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 UIKit
|
|
10
|
-
|
|
11
|
-
class VideoModel: NSObject {
|
|
12
|
-
var videos: [Video] = []
|
|
13
|
-
|
|
14
|
-
func addVideo(video: Video) {
|
|
15
|
-
videos.append(video)
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
func getVideos() -> [Video] {
|
|
19
|
-
return videos
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
func printVideos() {
|
|
23
|
-
for video in self.videos {
|
|
24
|
-
guard let urlPath: String = video.urlPath else {
|
|
25
|
-
continue
|
|
26
|
-
}
|
|
27
|
-
guard let title: String = video.title else {
|
|
28
|
-
continue
|
|
29
|
-
}
|
|
30
|
-
guard let content: String = video.content else {
|
|
31
|
-
continue
|
|
32
|
-
}
|
|
33
|
-
guard let width: Int = video.width else {
|
|
34
|
-
continue
|
|
35
|
-
}
|
|
36
|
-
guard let height: Int = video.height else {
|
|
37
|
-
continue
|
|
38
|
-
}
|
|
39
|
-
print("Video \(urlPath) \n \(title) \n \(content) \n \(width) \(height)")
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
}
|
|
1
|
+
//
|
|
2
|
+
// VideoModel.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 UIKit
|
|
10
|
+
|
|
11
|
+
class VideoModel: NSObject {
|
|
12
|
+
var videos: [Video] = []
|
|
13
|
+
|
|
14
|
+
func addVideo(video: Video) {
|
|
15
|
+
videos.append(video)
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
func getVideos() -> [Video] {
|
|
19
|
+
return videos
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
func printVideos() {
|
|
23
|
+
for video in self.videos {
|
|
24
|
+
guard let urlPath: String = video.urlPath else {
|
|
25
|
+
continue
|
|
26
|
+
}
|
|
27
|
+
guard let title: String = video.title else {
|
|
28
|
+
continue
|
|
29
|
+
}
|
|
30
|
+
guard let content: String = video.content else {
|
|
31
|
+
continue
|
|
32
|
+
}
|
|
33
|
+
guard let width: Int = video.width else {
|
|
34
|
+
continue
|
|
35
|
+
}
|
|
36
|
+
guard let height: Int = video.height else {
|
|
37
|
+
continue
|
|
38
|
+
}
|
|
39
|
+
print("Video \(urlPath) \n \(title) \n \(content) \n \(width) \(height)")
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
package/package.json
CHANGED
|
@@ -1,92 +1,92 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@picsa/capacitor-video-player",
|
|
3
|
-
"version": "7.
|
|
4
|
-
"description": "custom Native Capacitor plugin to play a video",
|
|
5
|
-
"main": "dist/plugin.cjs.js",
|
|
6
|
-
"module": "dist/esm/index.js",
|
|
7
|
-
"type": "module",
|
|
8
|
-
"types": "dist/esm/index.d.ts",
|
|
9
|
-
"unpkg": "dist/plugin.js",
|
|
10
|
-
"files": [
|
|
11
|
-
"android/src/main/",
|
|
12
|
-
"android/build.gradle",
|
|
13
|
-
"dist/",
|
|
14
|
-
"ios/Plugin/",
|
|
15
|
-
"CapacitorVideoPlayer.podspec"
|
|
16
|
-
],
|
|
17
|
-
"author": "
|
|
18
|
-
"license": "MIT",
|
|
19
|
-
"engines": {
|
|
20
|
-
"node": ">=
|
|
21
|
-
},
|
|
22
|
-
"repository": {
|
|
23
|
-
"type": "git",
|
|
24
|
-
"url": "git+https://github.com/e-picsa/capacitor-video-player.git"
|
|
25
|
-
},
|
|
26
|
-
"bugs": {
|
|
27
|
-
"url": "https://github.com/e-picsa/capacitor-video-player/issues"
|
|
28
|
-
},
|
|
29
|
-
"homepage": "https://www.capacitorvideoplayer.com",
|
|
30
|
-
"keywords": [
|
|
31
|
-
"capacitor",
|
|
32
|
-
"plugin",
|
|
33
|
-
"native"
|
|
34
|
-
],
|
|
35
|
-
"scripts": {
|
|
36
|
-
"verify": "npm run verify:ios && npm run verify:android && npm run verify:web",
|
|
37
|
-
"verify:ios": "cd ios && pod install && xcodebuild -workspace Plugin.xcworkspace -scheme Plugin -destination generic/platform=iOS && cd ..",
|
|
38
|
-
"verify:android": "cd android && ./gradlew clean build test && cd ..",
|
|
39
|
-
"verify:web": "npm run build",
|
|
40
|
-
"lint": "npm run eslint && npm run prettier -- --check && npm run swiftlint -- lint",
|
|
41
|
-
"fmt": "npm run eslint -- --fix && npm run prettier -- --write && npm run swiftlint -- autocorrect --format",
|
|
42
|
-
"eslint": "eslint . --ext ts",
|
|
43
|
-
"prettier": "prettier \"**/*.{css,html,ts,js,java}\" --plugin=prettier-plugin-java",
|
|
44
|
-
"swiftlint": "node-swiftlint",
|
|
45
|
-
"docgen": "docgen --api CapacitorVideoPlayerPlugin --output-readme docs/API.md --output-json dist/docs.json",
|
|
46
|
-
"build": "npm run clean && npm run docgen && tsc && rollup -c rollup.config.mjs",
|
|
47
|
-
"clean": "rimraf ./dist",
|
|
48
|
-
"watch": "tsc --watch",
|
|
49
|
-
"test": "echo \"No test specified\"",
|
|
50
|
-
"
|
|
51
|
-
},
|
|
52
|
-
"devDependencies": {
|
|
53
|
-
"@capacitor/android": "^7.0.0",
|
|
54
|
-
"@capacitor/core": "^7.0.0",
|
|
55
|
-
"@capacitor/docgen": "^0.3.0",
|
|
56
|
-
"@capacitor/ios": "^7.0.0",
|
|
57
|
-
"@ionic/eslint-config": "^0.4.0",
|
|
58
|
-
"@ionic/prettier-config": "^4.0.0",
|
|
59
|
-
"@ionic/swiftlint-config": "^2.0.0",
|
|
60
|
-
"@rollup/plugin-commonjs": "^28.0.2",
|
|
61
|
-
"@rollup/plugin-node-resolve": "^16.0.0",
|
|
62
|
-
"
|
|
63
|
-
"
|
|
64
|
-
"
|
|
65
|
-
"prettier
|
|
66
|
-
"
|
|
67
|
-
"
|
|
68
|
-
"
|
|
69
|
-
"
|
|
70
|
-
"
|
|
71
|
-
},
|
|
72
|
-
"peerDependencies": {
|
|
73
|
-
"@capacitor/core": ">=7.0.0",
|
|
74
|
-
"hls.js": "^1.4.0"
|
|
75
|
-
},
|
|
76
|
-
"prettier": "@ionic/prettier-config",
|
|
77
|
-
"swiftlint": "@ionic/swiftlint-config",
|
|
78
|
-
"eslintConfig": {
|
|
79
|
-
"extends": "@ionic/eslint-config/recommended"
|
|
80
|
-
},
|
|
81
|
-
"publishConfig": {
|
|
82
|
-
"access": "public"
|
|
83
|
-
},
|
|
84
|
-
"capacitor": {
|
|
85
|
-
"ios": {
|
|
86
|
-
"src": "ios"
|
|
87
|
-
},
|
|
88
|
-
"android": {
|
|
89
|
-
"src": "android"
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@picsa/capacitor-video-player",
|
|
3
|
+
"version": "7.2.3",
|
|
4
|
+
"description": "custom Native Capacitor plugin to play a video",
|
|
5
|
+
"main": "dist/plugin.cjs.js",
|
|
6
|
+
"module": "dist/esm/index.js",
|
|
7
|
+
"type": "module",
|
|
8
|
+
"types": "dist/esm/index.d.ts",
|
|
9
|
+
"unpkg": "dist/plugin.js",
|
|
10
|
+
"files": [
|
|
11
|
+
"android/src/main/",
|
|
12
|
+
"android/build.gradle",
|
|
13
|
+
"dist/",
|
|
14
|
+
"ios/Plugin/",
|
|
15
|
+
"CapacitorVideoPlayer.podspec"
|
|
16
|
+
],
|
|
17
|
+
"author": "E-PICSA",
|
|
18
|
+
"license": "MIT",
|
|
19
|
+
"engines": {
|
|
20
|
+
"node": ">=22.0.0"
|
|
21
|
+
},
|
|
22
|
+
"repository": {
|
|
23
|
+
"type": "git",
|
|
24
|
+
"url": "git+https://github.com/e-picsa/capacitor-video-player.git"
|
|
25
|
+
},
|
|
26
|
+
"bugs": {
|
|
27
|
+
"url": "https://github.com/e-picsa/capacitor-video-player/issues"
|
|
28
|
+
},
|
|
29
|
+
"homepage": "https://www.capacitorvideoplayer.com",
|
|
30
|
+
"keywords": [
|
|
31
|
+
"capacitor",
|
|
32
|
+
"plugin",
|
|
33
|
+
"native"
|
|
34
|
+
],
|
|
35
|
+
"scripts": {
|
|
36
|
+
"verify": "npm run verify:ios && npm run verify:android && npm run verify:web",
|
|
37
|
+
"verify:ios": "cd ios && pod install && xcodebuild -workspace Plugin.xcworkspace -scheme Plugin -destination generic/platform=iOS && cd ..",
|
|
38
|
+
"verify:android": "cd android && ./gradlew clean build test && cd ..",
|
|
39
|
+
"verify:web": "npm run build",
|
|
40
|
+
"lint": "npm run eslint && npm run prettier -- --check && npm run swiftlint -- lint",
|
|
41
|
+
"fmt": "npm run eslint -- --fix && npm run prettier -- --write && npm run swiftlint -- autocorrect --format",
|
|
42
|
+
"eslint": "eslint . --ext ts",
|
|
43
|
+
"prettier": "prettier \"**/*.{css,html,ts,js,java}\" --plugin=prettier-plugin-java",
|
|
44
|
+
"swiftlint": "node-swiftlint",
|
|
45
|
+
"docgen": "docgen --api CapacitorVideoPlayerPlugin --output-readme docs/API.md --output-json dist/docs.json",
|
|
46
|
+
"build": "npm run clean && npm run docgen && tsc && rollup -c rollup.config.mjs",
|
|
47
|
+
"clean": "rimraf ./dist",
|
|
48
|
+
"watch": "tsc --watch",
|
|
49
|
+
"test": "echo \"No test specified\"",
|
|
50
|
+
"prepare": "npm run build"
|
|
51
|
+
},
|
|
52
|
+
"devDependencies": {
|
|
53
|
+
"@capacitor/android": "^7.0.0",
|
|
54
|
+
"@capacitor/core": "^7.0.0",
|
|
55
|
+
"@capacitor/docgen": "^0.3.0",
|
|
56
|
+
"@capacitor/ios": "^7.0.0",
|
|
57
|
+
"@ionic/eslint-config": "^0.4.0",
|
|
58
|
+
"@ionic/prettier-config": "^4.0.0",
|
|
59
|
+
"@ionic/swiftlint-config": "^2.0.0",
|
|
60
|
+
"@rollup/plugin-commonjs": "^28.0.2",
|
|
61
|
+
"@rollup/plugin-node-resolve": "^16.0.0",
|
|
62
|
+
"@types/node": "^22.10.2",
|
|
63
|
+
"eslint": "^8.57.0",
|
|
64
|
+
"hls.js": "^1.5.18",
|
|
65
|
+
"prettier": "^3.4.2",
|
|
66
|
+
"prettier-plugin-java": "^2.6.6",
|
|
67
|
+
"rimraf": "^6.0.1",
|
|
68
|
+
"rollup": "^4.30.1",
|
|
69
|
+
"swiftlint": "^2.0.0",
|
|
70
|
+
"typescript": "~5.7.2"
|
|
71
|
+
},
|
|
72
|
+
"peerDependencies": {
|
|
73
|
+
"@capacitor/core": ">=7.0.0",
|
|
74
|
+
"hls.js": "^1.4.0"
|
|
75
|
+
},
|
|
76
|
+
"prettier": "@ionic/prettier-config",
|
|
77
|
+
"swiftlint": "@ionic/swiftlint-config",
|
|
78
|
+
"eslintConfig": {
|
|
79
|
+
"extends": "@ionic/eslint-config/recommended"
|
|
80
|
+
},
|
|
81
|
+
"publishConfig": {
|
|
82
|
+
"access": "public"
|
|
83
|
+
},
|
|
84
|
+
"capacitor": {
|
|
85
|
+
"ios": {
|
|
86
|
+
"src": "ios"
|
|
87
|
+
},
|
|
88
|
+
"android": {
|
|
89
|
+
"src": "android"
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}
|