mkalyon / cordova-plugin-mkexoplayer Goto Github PK
View Code? Open in Web Editor NEWCordova ExoPlayer Plugin
License: Other
Cordova ExoPlayer Plugin
License: Other
hi,
Im using ionic and when install the plugin i got this error
Installing "cordova-plugin-mkExoplayer" for android
Failed to install 'cordova-plugin-mkExoplayer': Error: cordova-plugin-mkExoplayer cannot be added. <edit-config> changes in this plugin conflicts with <edit-config> changes in config.xml. Conflicts must be resolved before plugin can be added.
at PlatformMunger.add_plugin_changes (C:\Users\paula\io-exotest\node_modules\cordova-common\src\ConfigChanges\ConfigChanges.js:135:19)
at C:\Users\paula\io-exotest\node_modules\cordova-common\src\PluginManager.js:123:29
at _fulfilled (C:\Users\paula\io-exotest\node_modules\q\q.js:854:54)
at C:\Users\paula\io-exotest\node_modules\q\q.js:883:30
at Promise.promise.promiseDispatch (C:\Users\paula\io-exotest\node_modules\q\q.js:816:13)
at C:\Users\paula\io-exotest\node_modules\q\q.js:877:14
at runSingle (C:\Users\paula\io-exotest\node_modules\q\q.js:137:13)
at flush (C:\Users\paula\io-exotest\node_modules\q\q.js:125:13)
at processTicksAndRejections (internal/process/task_queues.js:79:11)
cordova-plugin-mkExoplayer cannot be added. <edit-config> changes in this plugin conflicts with <edit-config> changes in config.xml. Conflicts must be resolved before plugin can be added.
[ERROR] An error occurred while running subprocess cordova.
cordova.cmd platform add [email protected] exited with exit code 1.
Re-running this command with the --verbose flag may provide more information.
my ionic info is
Ionic:
Ionic CLI : 6.10.0 (C:\Users\paula\AppData\Roaming\npm\node_modules\@ionic\cli)
Ionic Framework : @ionic/angular 5.3.5
@angular-devkit/build-angular : 0.1000.8
@angular-devkit/schematics : 10.0.8
@angular/cli : 10.0.8
@ionic/angular-toolkit : 2.3.3
Cordova:
Cordova CLI : 9.0.0 ([email protected])
Cordova Platforms : android 8.1.0
Cordova Plugins : cordova-plugin-ionic-keyboard 2.2.0, cordova-plugin-ionic-webview 4.2.1, (and 4 other plugins)
Utility:
cordova-res : not installed
native-run : not installed
System:
Android SDK Tools : 26.1.1 (C:\sdk)
NodeJS : v12.18.0 (C:\Program Files\nodejs\node.exe)
npm : 6.14.4
my config.xml
<edit-config file="app/src/main/AndroidManifest.xml" mode="merge" target="/manifest/application" xmlns:android="http://schemas.android.com/apk/res/android"> <application android:networkSecurityConfig="@xml/network_security_config" /> </edit-config>
and im change build.gradle from 'com.android.tools.build:gradle:3.3.0' to 3.0.1
even got this error when installation and after change class path in gradle im trying to build for testing,and the app open without running exoplayer
this is my code:
import { Component, OnInit } from '@angular/core';
import { Platform } from '@ionic/angular';
declare var mkExoPlayer
@Component({
selector: 'app-home',
templateUrl: './home.page.html',
styleUrls: ['./home.page.scss'],
})
export class HomePage implements OnInit {
//catch: (error: any) => void;
catcho: any;
constructor( private platform: Platform,) { }
ngOnInit() {
this.platform.ready().then(() => {
mkExoPlayer.show(parameters, successCallback, errorCallback);
this.catcho = errorCallback
})
var successCallback = function(json) {
};
var errorCallback = function(error) {
};
var url="https://file-examples-com.github.io/uploads/2017/04/file_example_MP4_1920_18MG.mp4";
var logo="assets/icon/favicon.png";
var title="Superman Retrun to Home";
var epg="Epg1...............\nEpg2...............";
var desc="Description";
var parameters={
url: url, // First url
order:0, // Playlist order
aspectRatio: 'FIT_SCREEN', // default is FIT_SCREEN
hideTimeout: 5000, // Hide controls after this many milliseconds, default is 5 sec
forwardTime: 60 * 1000, // Amount of time to use when skipping forward, default is 1 min
rewindTime: 60 * 1000, // Amount of time to use when skipping backward, default is 1 min
//userAgent:"mkplayer",
keyEvent:false, // true return key events to cordova, false key event using player
//audioOnly: true, // Only play audio in the backgroud, default is false.
//subtitleUrl: "http://a.com/subtitle.srt", // Optional subtitle url
showBuffering: true, //buffer
showSpinner:true, // loading spinner
timeZone:3, // for clock
transParent:true, // alert dialog theme
autoStop:true, // when video is finished then auto stop video
controller: { // If this object is not present controller will not be visible
streamImage: logo,
streamTitle: title,
streamEpg: epg,
streamDescription: desc,
controlIcons: {
'exo_rew': null,
'exo_play': null,
'exo_pause': null,
'exo_ffwd': null,
},
textColor: '#FF00A6FF', //'#ffffffff', // These colors can be any valid Android color
buttonsColor: '#FF00A6FF', //'#ffffffff', // This example uses hex values including alpha (first byte)
bufferingColor: '#ff0000ff', // Alpha of 'ff' makes it 100% opaque
hideProgress: false, // Hide entire progress timebar
hidePosition: false, // If timebar is visible hide current position from it
hideDuration: false // If timebar is visible Hide stream duration from it
}
};
}
}
can you please take a look and what wrong @mkalyon
I am using cordova with transparent html, how can I put the player behind cordova webview?
It is possibile to send custom http headers to play the stream?
Some streams requires the "Referer" header to work. It is possibile to pass the header?
Thanks
Can you list the plugin in npm,
Can this plugin show the video setting like., Quality, Subtitles, and Audio ?
because the plugin Exoplayer 2.10.0 Up used dialogFragment to show it.,
and when i try.., always crash with cordova activity
Do you have plugin that works with the latest version ExoPlayer 2.11.7?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.