Open powerboom opened 3 years ago
I am trying all the settings but only speed option is coming
// Js code `import { Component, OnInit } from '@angular/core'; import { Plyr } from 'plyr'; import { ActivatedRoute } from '@angular/router'; import { LoadingService } from '../../../services/loading.service'; import { ScreenOrientation } from '@ionic-native/screen-orientation/ngx';
@Component({ selector: 'app-videoplayer', templateUrl: './videoplayer.page.html', styleUrls: ['./videoplayer.page.scss'], }) export class VideoplayerPage implements OnInit { videoSources: Plyr.Source[] = [{ src: '', provider: '' }]
options: Plyr.Options = { fullscreen: { enabled: false }, controls: ['play-large', 'play', 'progress', 'current-time', 'mute', 'volume', 'captions', 'settings', 'pip', 'airplay', 'fullscreen'], settings: ['captions', 'quality', 'speed', 'loop'], captions: {active: true, update: true, language: 'en'}, quality : { default: 576, options: [4320, 2880, 2160, 1440, 1080, 720, 576, 480, 360, 240] } }
constructor(private route: ActivatedRoute, private loading: LoadingService, private screenOrientation: ScreenOrientation ) { }
ngOnInit() { this.loading.present(); let data = this.route.snapshot.params; this.videoSources = [{ src: data['url'], provider: data["source"] == "y" ? "youtube" : "vimeo", }];
} loaded(event: Plyr.PlyrEvent) { this.loading.dismiss(); }
}
<plyr plyrTitle="Video 1" [plyrOptions]="options" [plyrSources]="videoSources" (plyrInit)="player = $event" (plyrReady)= "loaded($event)" (plyrEnterFullScreen)="fullScreenEnter($event)" (plyrExitFullScreen) ="fullScreenExit($event)">
`
With more investigation, the speed option only working as expected among other options.
I am trying all the settings but only speed option is coming
// Js code `import { Component, OnInit } from '@angular/core'; import { Plyr } from 'plyr'; import { ActivatedRoute } from '@angular/router'; import { LoadingService } from '../../../services/loading.service'; import { ScreenOrientation } from '@ionic-native/screen-orientation/ngx';
@Component({ selector: 'app-videoplayer', templateUrl: './videoplayer.page.html', styleUrls: ['./videoplayer.page.scss'], }) export class VideoplayerPage implements OnInit { videoSources: Plyr.Source[] = [{ src: '', provider: '' }]
options: Plyr.Options = { fullscreen: { enabled: false }, controls: ['play-large', 'play', 'progress', 'current-time', 'mute', 'volume', 'captions', 'settings', 'pip', 'airplay', 'fullscreen'], settings: ['captions', 'quality', 'speed', 'loop'], captions: {active: true, update: true, language: 'en'}, quality : { default: 576, options: [4320, 2880, 2160, 1440, 1080, 720, 576, 480, 360, 240] } }
constructor(private route: ActivatedRoute, private loading: LoadingService, private screenOrientation: ScreenOrientation ) { }
ngOnInit() { this.loading.present(); let data = this.route.snapshot.params; this.videoSources = [{ src: data['url'], provider: data["source"] == "y" ? "youtube" : "vimeo", }];
} loaded(event: Plyr.PlyrEvent) { this.loading.dismiss(); }
}
`