frontyard / cordova-plugin-exoplayer

Media player plugin for Cordova that uses Google's ExoPlayer
MIT License
54 stars 69 forks source link

throwing an error i've tried all the method for the exoplayer #100

Closed rednek2784 closed 1 year ago

rednek2784 commented 2 years ago

HomePage.html:17 ERROR TypeError: Object(...) is not a function at AndroidExoplayer.show (index.js:10:77) at HomePage.webpackJsonp.248.HomePage.play1 (home.ts:48:12) at Object.eval [as handleEvent] (HomePage.html:17:22) at handleEvent (core.js:13589:109) at callWithDebugContext (core.js:15098:26) at Object.debugHandleEvent [as handleEvent] (core.js:14685:1) at dispatchEvent (core.js:10004:1) at core.js:10629:30 at HTMLButtonElement. (platform-browser.js:2628:26) at t.invokeTask (polyfills.js:3:15660)

here is my code import { Component } from '@angular/core'; import { NavController } from 'ionic-angular'; import { Platform } from 'ionic-angular'; import { AndroidExoplayer } from "@ionic-native/android-exoplayer/ngx"; declare var ExoPlayer;

@Component({ selector: 'page-home', templateUrl: 'home.html', providers:[AndroidExoplayer] }) export class HomePage { url="https://dash.akamaized.net/akamai/bbb_30fps/bbb_30fps.mpd"; constructor(public navCtrl: NavController,public plt: Platform,private exo:AndroidExoplayer) {

} openLiveRadio() { var params = { url: 'https://playerservices.streamtheworld.com/api/livestream-redirect/WYEPFMAAC.aac', userAgent: 'ExoPlayerPlugin', // default is 'ExoPlayerPlugin' aspectRatio: 'FILL_SCREEN', // default is FIT_SCREEN hideTimeout: 5000, // Hide controls after this many milliseconds, default is 5 sec seekTo: 0, // Start playback 10 minutes into video specified in milliseconds, default is 0 skipTime: 0, // Amount of time to use when going forward/backward, default is 1 min controller: { // If this object is not present controller will not be visible hideProgress: false, controlIcons: { 'exo_rew': 'http://url.to/rew.png', 'exo_play': 'http://url.to/play.png', 'exo_pause': 'http://url.to/pause.png', 'exo_ffwd': 'http://url.to/ffwd.png' } } } this.plt.ready().then(() => { ExoPlayer.show(params); }); }