Open AnasProgrammer2 opened 3 years ago
hello
`import { NgModule } from '@angular/core'; import { BrowserModule } from '@angular/platform-browser'; import { RouteReuseStrategy } from '@angular/router'; import { IonicModule, IonicRouteStrategy } from '@ionic/angular'; import { TranslateLoader, TranslateModule, TranslatePipe } from '@ngx-translate/core'; import { TranslateHttpLoader } from '@ngx-translate/http-loader'; import { HttpClient, HttpClientModule ,HTTP_INTERCEPTORS } from '@angular/common/http'; import { AppRoutingModule } from './app-routing.module'; import { AppComponent } from './app.component'; import { APP_CONFIG, BaseAppConfig } from './app.config'; import { MatProgressSpinnerModule } from '@angular/material/progress-spinner'; import {LoaderInterceptor} from './services/loader.interceptor'; import { PlyrModule } from 'ngx-plyr';
export function HttpLoaderFactory(http: HttpClient) { return new TranslateHttpLoader(http); } @NgModule({ declarations: [AppComponent], entryComponents: [], imports: [ BrowserModule, MatProgressSpinnerModule, IonicModule.forRoot(), AppRoutingModule, HttpClientModule, TranslateModule, PlyrModule, TranslateModule.forRoot({ loader: { provide: TranslateLoader, useFactory: HttpLoaderFactory, deps: [HttpClient] } }) ], providers: [ { provide: HTTP_INTERCEPTORS, useClass: LoaderInterceptor, multi: true }, { provide: APP_CONFIG, useValue: BaseAppConfig }, { provide: RouteReuseStrategy, useClass: IonicRouteStrategy } ],
bootstrap: [AppComponent] }) export class AppModule {} `
`
<plyr style="display: block; width: 640px;" plyrTitle="Video 1" [plyrPlaysInline]="true" [plyrSources]="videoSources" (plyrInit)="player = $event" (plyrPlay)="played($event)">
<button (click)="play()">Play
hello , i have app with ionic 5 (anglur 10) i need how to import plyr to my project