@picsa/capacitor-video-player 7.1.0
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 -0
- package/LICENSE +21 -0
- package/android/build.gradle +71 -0
- package/android/src/main/AndroidManifest.xml +3 -0
- package/android/src/main/java/com/jeep/plugin/capacitor/capacitorvideoplayer/CapacitorVideoPlayer.java +71 -0
- package/android/src/main/java/com/jeep/plugin/capacitor/capacitorvideoplayer/CapacitorVideoPlayerPlugin.java +1256 -0
- package/android/src/main/java/com/jeep/plugin/capacitor/capacitorvideoplayer/FullscreenExoPlayerFragment.java +1595 -0
- package/android/src/main/java/com/jeep/plugin/capacitor/capacitorvideoplayer/Notifications/MyRunnable.java +21 -0
- package/android/src/main/java/com/jeep/plugin/capacitor/capacitorvideoplayer/Notifications/NotificationCenter.java +61 -0
- package/android/src/main/java/com/jeep/plugin/capacitor/capacitorvideoplayer/PickerVideo/AdapterVideoList.java +47 -0
- package/android/src/main/java/com/jeep/plugin/capacitor/capacitorvideoplayer/PickerVideo/ModelVideo.java +49 -0
- package/android/src/main/java/com/jeep/plugin/capacitor/capacitorvideoplayer/PickerVideo/PickerVideoFragment.java +119 -0
- package/android/src/main/java/com/jeep/plugin/capacitor/capacitorvideoplayer/PickerVideo/VideoRecyclerViewHolder.java +65 -0
- package/android/src/main/java/com/jeep/plugin/capacitor/capacitorvideoplayer/Utilities/FilesUtils.java +101 -0
- package/android/src/main/java/com/jeep/plugin/capacitor/capacitorvideoplayer/Utilities/FragmentUtils.java +32 -0
- package/android/src/main/res/.gitkeep +0 -0
- package/android/src/main/res/drawable/bg_round_rect_white_50.xml +9 -0
- package/android/src/main/res/drawable/bg_rounded_rectangle_white_corner_rounded.xml +10 -0
- package/android/src/main/res/drawable/exo_close_btn.xml +12 -0
- package/android/src/main/res/drawable/gradient_transparent_middle.xml +12 -0
- package/android/src/main/res/drawable/ic_arrow_left.xml +5 -0
- package/android/src/main/res/drawable/ic_baseline_lq.xml +7 -0
- package/android/src/main/res/drawable/ic_exo_icon_fastforward.xml +35 -0
- package/android/src/main/res/drawable/ic_exo_icon_pause.xml +26 -0
- package/android/src/main/res/drawable/ic_exo_icon_play.xml +36 -0
- package/android/src/main/res/drawable/ic_exo_icon_rewind.xml +35 -0
- package/android/src/main/res/drawable/ic_expand.xml +5 -0
- package/android/src/main/res/drawable/ic_fit.xml +5 -0
- package/android/src/main/res/drawable/ic_image_background.xml +12 -0
- package/android/src/main/res/drawable/ic_img_16_9_background.xml +10 -0
- package/android/src/main/res/drawable/ic_img_9_16_background.xml +10 -0
- package/android/src/main/res/drawable/ic_outline_lock.xml +5 -0
- package/android/src/main/res/drawable/ic_outline_lock_open.xml +5 -0
- package/android/src/main/res/drawable/ic_pip_white.xml +5 -0
- package/android/src/main/res/drawable/ic_views.xml +18 -0
- package/android/src/main/res/drawable/ic_zoom.xml +5 -0
- package/android/src/main/res/layout/bridge_layout_main.xml +15 -0
- package/android/src/main/res/layout/exo_playback_control_view.xml +289 -0
- package/android/src/main/res/layout/exoplayer_layout_youtube.xml +361 -0
- package/android/src/main/res/layout/fragment_fs_exoplayer.xml +50 -0
- package/android/src/main/res/layout/fragment_picker_video.xml +21 -0
- package/android/src/main/res/layout/row_video.xml +76 -0
- package/android/src/main/res/values/colors.xml +14 -0
- package/android/src/main/res/values/strings.xml +3 -0
- package/android/src/main/res/values/styles.xml +3 -0
- package/dist/docs.json +831 -0
- package/dist/esm/definitions.d.ts +322 -0
- package/dist/esm/definitions.js +2 -0
- package/dist/esm/definitions.js.map +1 -0
- package/dist/esm/index.d.ts +4 -0
- package/dist/esm/index.js +7 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/web-utils/video-types.d.ts +16 -0
- package/dist/esm/web-utils/video-types.js +15 -0
- package/dist/esm/web-utils/video-types.js.map +1 -0
- package/dist/esm/web-utils/videoplayer.d.ts +30 -0
- package/dist/esm/web-utils/videoplayer.js +315 -0
- package/dist/esm/web-utils/videoplayer.js.map +1 -0
- package/dist/esm/web.d.ts +123 -0
- package/dist/esm/web.js +675 -0
- package/dist/esm/web.js.map +1 -0
- package/dist/plugin.cjs.js +1017 -0
- package/dist/plugin.cjs.js.map +1 -0
- package/dist/plugin.js +1019 -0
- package/dist/plugin.js.map +1 -0
- package/ios/Plugin/CapacitorVideoPlayer.swift +64 -0
- package/ios/Plugin/CapacitorVideoPlayerPlugin.h +10 -0
- package/ios/Plugin/CapacitorVideoPlayerPlugin.m +22 -0
- package/ios/Plugin/CapacitorVideoPlayerPlugin.swift +632 -0
- package/ios/Plugin/Extensions/CapacitorVideoPlayerPlugin.AVPlayerViewController.swift +59 -0
- package/ios/Plugin/Extensions/CapacitorVideoPlayerPlugin.File.swift +126 -0
- package/ios/Plugin/Extensions/CapacitorVideoPlayerPlugin.Fullscreen.swift +94 -0
- package/ios/Plugin/Extensions/CapacitorVideoPlayerPlugin.Notifications.swift +140 -0
- package/ios/Plugin/Extensions/CapacitorVideoPlayerPlugin.Observers.swift +180 -0
- package/ios/Plugin/Info.plist +24 -0
- package/ios/Plugin/VideoPicker/VideoHelper.swift +127 -0
- package/ios/Plugin/VideoPicker/VideoPickerViewController.swift +144 -0
- package/ios/Plugin/VideoPlayer/Extensions/AVURLAsset.swift +18 -0
- package/ios/Plugin/VideoPlayer/Extensions/AllOrientationAVPlayerController.swift +12 -0
- package/ios/Plugin/VideoPlayer/Extensions/CMTime.swift +23 -0
- package/ios/Plugin/VideoPlayer/Extensions/LandscapeAVPlayerController.swift +12 -0
- package/ios/Plugin/VideoPlayer/Extensions/Notification.Name.swift +18 -0
- package/ios/Plugin/VideoPlayer/Extensions/PortraitAVPlayerController.swift +12 -0
- package/ios/Plugin/VideoPlayer/Extensions/View.swift +54 -0
- package/ios/Plugin/VideoPlayer/FullScreenVideoPlayerView.swift +601 -0
- package/ios/Plugin/VideoPlayer/Models/Video.swift +28 -0
- package/ios/Plugin/VideoPlayer/Models/VideoModel.swift +42 -0
- package/package.json +92 -0
- package/readme.md +190 -0
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
require 'json'
|
|
2
|
+
|
|
3
|
+
package = JSON.parse(File.read(File.join(__dir__, 'package.json')))
|
|
4
|
+
|
|
5
|
+
Pod::Spec.new do |s|
|
|
6
|
+
s.name = 'CapacitorVideoPlayer'
|
|
7
|
+
s.version = package['version']
|
|
8
|
+
s.summary = package['description']
|
|
9
|
+
s.license = package['license']
|
|
10
|
+
s.homepage = package['repository']['url']
|
|
11
|
+
s.author = package['author']
|
|
12
|
+
s.source = { :git => package['repository']['url'], :tag => s.version.to_s }
|
|
13
|
+
s.source_files = 'ios/Plugin/**/*.{swift,h,m,c,cc,mm,cpp}'
|
|
14
|
+
s.ios.deployment_target = '13.0'
|
|
15
|
+
s.dependency 'Capacitor'
|
|
16
|
+
s.swift_version = '5.1'
|
|
17
|
+
end
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2020 - 2023 Capacitor Data Storage Sqlite
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
ext {
|
|
2
|
+
junitVersion = project.hasProperty('junitVersion') ? rootProject.ext.junitVersion : '4.13.2'
|
|
3
|
+
androidxAppCompatVersion = project.hasProperty('androidxAppCompatVersion') ? rootProject.ext.androidxAppCompatVersion : '1.7.0'
|
|
4
|
+
androidxJunitVersion = project.hasProperty('androidxJunitVersion') ? rootProject.ext.androidxJunitVersion : '1.2.1'
|
|
5
|
+
androidxEspressoCoreVersion = project.hasProperty('androidxEspressoCoreVersion') ? rootProject.ext.androidxEspressoCoreVersion : '3.6.1'
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
buildscript {
|
|
9
|
+
repositories {
|
|
10
|
+
google()
|
|
11
|
+
mavenCentral()
|
|
12
|
+
}
|
|
13
|
+
dependencies {
|
|
14
|
+
classpath 'com.android.tools.build:gradle:8.7.2'
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
apply plugin: 'com.android.library'
|
|
19
|
+
|
|
20
|
+
android {
|
|
21
|
+
namespace "com.jeep.plugin.capacitor.capacitorvideoplayer"
|
|
22
|
+
compileSdk project.hasProperty('compileSdkVersion') ? rootProject.ext.compileSdkVersion : 35
|
|
23
|
+
defaultConfig {
|
|
24
|
+
minSdkVersion project.hasProperty('minSdkVersion') ? rootProject.ext.minSdkVersion : 23
|
|
25
|
+
targetSdkVersion project.hasProperty('targetSdkVersion') ? rootProject.ext.targetSdkVersion : 35
|
|
26
|
+
versionCode 1
|
|
27
|
+
versionName "1.0"
|
|
28
|
+
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
|
29
|
+
}
|
|
30
|
+
buildTypes {
|
|
31
|
+
release {
|
|
32
|
+
minifyEnabled false
|
|
33
|
+
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
lintOptions {
|
|
37
|
+
abortOnError false
|
|
38
|
+
}
|
|
39
|
+
compileOptions {
|
|
40
|
+
sourceCompatibility JavaVersion.VERSION_21
|
|
41
|
+
targetCompatibility JavaVersion.VERSION_21
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
repositories {
|
|
46
|
+
google()
|
|
47
|
+
mavenCentral()
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
dependencies {
|
|
52
|
+
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
|
53
|
+
implementation project(':capacitor-android')
|
|
54
|
+
implementation "androidx.appcompat:appcompat:$androidxAppCompatVersion"
|
|
55
|
+
implementation 'androidx.coordinatorlayout:coordinatorlayout:1.1.0'
|
|
56
|
+
implementation 'androidx.recyclerview:recyclerview:1.2.0'
|
|
57
|
+
implementation 'androidx.cardview:cardview:1.0.0'
|
|
58
|
+
implementation 'androidx.gridlayout:gridlayout:1.0.0'
|
|
59
|
+
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
|
|
60
|
+
implementation 'androidx.media3:media3-exoplayer:1.9.1'
|
|
61
|
+
implementation 'androidx.media3:media3-ui:1.9.1'
|
|
62
|
+
implementation 'androidx.media3:media3-exoplayer-hls:1.9.1'
|
|
63
|
+
implementation 'androidx.media3:media3-exoplayer-dash:1.9.1'
|
|
64
|
+
implementation 'androidx.media3:media3-exoplayer-smoothstreaming:1.9.1'
|
|
65
|
+
implementation 'androidx.media3:media3-session:1.9.1'
|
|
66
|
+
implementation 'androidx.media3:media3-cast:1.9.1'
|
|
67
|
+
implementation 'com.squareup.picasso:picasso:2.71828'
|
|
68
|
+
testImplementation "junit:junit:$junitVersion"
|
|
69
|
+
androidTestImplementation "androidx.test.ext:junit:$androidxJunitVersion"
|
|
70
|
+
androidTestImplementation "androidx.test.espresso:espresso-core:$androidxEspressoCoreVersion"
|
|
71
|
+
}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
package com.jeep.plugin.capacitor.capacitorvideoplayer;
|
|
2
|
+
|
|
3
|
+
import android.content.Context;
|
|
4
|
+
import com.getcapacitor.JSObject;
|
|
5
|
+
import com.jeep.plugin.capacitor.capacitorvideoplayer.PickerVideo.PickerVideoFragment;
|
|
6
|
+
|
|
7
|
+
public class CapacitorVideoPlayer {
|
|
8
|
+
|
|
9
|
+
private final Context context;
|
|
10
|
+
|
|
11
|
+
CapacitorVideoPlayer(Context context) {
|
|
12
|
+
this.context = context;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
public String echo(String value) {
|
|
16
|
+
return value;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
public FullscreenExoPlayerFragment createFullScreenFragment(
|
|
20
|
+
String videoPath,
|
|
21
|
+
Float videoRate,
|
|
22
|
+
Boolean exitOnEnd,
|
|
23
|
+
Boolean loopOnEnd,
|
|
24
|
+
Boolean pipEnabled,
|
|
25
|
+
Boolean bkModeEnabled,
|
|
26
|
+
Boolean showControls,
|
|
27
|
+
String displayMode,
|
|
28
|
+
String subTitle,
|
|
29
|
+
String language,
|
|
30
|
+
JSObject subTitleOptions,
|
|
31
|
+
JSObject headers,
|
|
32
|
+
String title,
|
|
33
|
+
String smallTitle,
|
|
34
|
+
String accentColor,
|
|
35
|
+
Boolean chromecast,
|
|
36
|
+
String artwork,
|
|
37
|
+
Boolean isTV,
|
|
38
|
+
String playerId,
|
|
39
|
+
Boolean isInternal,
|
|
40
|
+
Long videoId
|
|
41
|
+
) {
|
|
42
|
+
FullscreenExoPlayerFragment fsFragment = new FullscreenExoPlayerFragment();
|
|
43
|
+
|
|
44
|
+
fsFragment.videoPath = videoPath;
|
|
45
|
+
fsFragment.videoRate = videoRate;
|
|
46
|
+
fsFragment.exitOnEnd = exitOnEnd;
|
|
47
|
+
fsFragment.loopOnEnd = loopOnEnd;
|
|
48
|
+
fsFragment.pipEnabled = pipEnabled;
|
|
49
|
+
fsFragment.bkModeEnabled = bkModeEnabled;
|
|
50
|
+
fsFragment.showControls = showControls;
|
|
51
|
+
fsFragment.displayMode = displayMode;
|
|
52
|
+
fsFragment.subTitle = subTitle;
|
|
53
|
+
fsFragment.language = language;
|
|
54
|
+
fsFragment.subTitleOptions = subTitleOptions;
|
|
55
|
+
fsFragment.headers = headers;
|
|
56
|
+
fsFragment.title = title;
|
|
57
|
+
fsFragment.smallTitle = smallTitle;
|
|
58
|
+
fsFragment.accentColor = accentColor;
|
|
59
|
+
fsFragment.chromecast = chromecast;
|
|
60
|
+
fsFragment.artwork = artwork;
|
|
61
|
+
fsFragment.isTV = isTV;
|
|
62
|
+
fsFragment.playerId = playerId;
|
|
63
|
+
fsFragment.isInternal = isInternal;
|
|
64
|
+
fsFragment.videoId = videoId;
|
|
65
|
+
return fsFragment;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
public PickerVideoFragment createPickerVideoFragment() {
|
|
69
|
+
return new PickerVideoFragment();
|
|
70
|
+
}
|
|
71
|
+
}
|