Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 71531

HLS player with exoplayer ionic

$
0
0

Hello i want to create a HLS video player app with ionic.
my code in home.page.html is:

<ion-header [translucent]=“true”>

<ion-title>

  Blank

</ion-title>

<ion-content [fullscreen]=“true”>

<ion-toolbar>

  <ion-title size="large">Blank</ion-title>

</ion-toolbar>
<strong>Ready to create an app?</strong>

<p>Start with Ionic <a target="_blank" rel="noopener noreferrer" href="https://ionicframework.com/docs/components">UI Components</a></p>

<ion-button secondary (click)=“show()”>Play

and my home.page.ts has this code:
import { Component } from ‘@angular/core’;

import { NavController } from ‘@ionic/angular’;

import { AndroidExoplayer } from ‘@ionic-native/android-exoplayer/ngx’;

@Component({

selector: ‘app-home’,

templateUrl: ‘home.page.html’,

styleUrls: [‘home.page.scss’],

})

export class HomePage {

constructor(private androidExoplayer: AndroidExoplayer) {

}

show() {

this.androidExoplayer.show({url:‘video.mp4’});

}

}

there are no errors in the console but the app is showing blank, can anyone help me please?

if anyone can help this in the google chrome console there is this error:

core.js:4197 ERROR Error: Uncaught (in promise): NullInjectorError: R3InjectorError(HomePageModule)[AndroidExoplayer -> AndroidExoplayer -> AndroidExoplayer -> AndroidExoplayer]:
NullInjectorError: No provider for AndroidExoplayer!
NullInjectorError: R3InjectorError(HomePageModule)[AndroidExoplayer -> AndroidExoplayer -> AndroidExoplayer -> AndroidExoplayer]:
NullInjectorError: No provider for AndroidExoplayer!
at NullInjector.get (core.js:915)
at R3Injector.get (core.js:11082)
at R3Injector.get (core.js:11082)
at R3Injector.get (core.js:11082)
at NgModuleRef$1.get (core.js:24199)
at R3Injector.get (core.js:11082)
at NgModuleRef$1.get (core.js:24199)
at Object.get (core.js:22102)
at getOrCreateInjectable (core.js:3921)
at ɵɵdirectiveInject (core.js:13753)
at resolvePromise (zone-evergreen.js:798)
at resolvePromise (zone-evergreen.js:750)
at zone-evergreen.js:860
at ZoneDelegate.invokeTask (zone-evergreen.js:399)
at Object.onInvokeTask (core.js:27425)
at ZoneDelegate.invokeTask (zone-evergreen.js:398)
at Zone.runTask (zone-evergreen.js:167)
at drainMicroTaskQueue (zone-evergreen.js:569)

What i’m doing wrong?
Thank you for the support!

2 posts - 2 participants

Read full topic


Viewing all articles
Browse latest Browse all 71531

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>