Skip to content
This repository has been archived by the owner on Dec 28, 2022. It is now read-only.

plyrOptions is not working for youtube video #69

Open
powerboom opened this issue Dec 11, 2020 · 1 comment
Open

plyrOptions is not working for youtube video #69

powerboom opened this issue Dec 11, 2020 · 1 comment

Comments

@powerboom
Copy link

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)">

`

@f22hd
Copy link

f22hd commented Jan 27, 2021

With more investigation, the speed option only working as expected among other options.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants