smnbbrv / ngx-plyr

Angular 6+ binding for Plyr video & audio player
https://smnbbrv.github.io/ngx-plyr/
MIT License
100 stars 65 forks source link

PlyrOptions doesn't seem to accept the config #32

Closed TimThompson99 closed 4 years ago

TimThompson99 commented 4 years ago

Could be that I'm doing it incorrectly, but the options don't seem to affect the Plyr. Setting the sources working fine.

<plyr style="display: block; width: 100%;" plyrTitle="Video 1" [plyrSources]="videoSources" [plyrOptions]="videoOptions" (plyrInit)="player = $event" (plyrPlay)="play($event)" (plyrTimeUpdate)="timeUpdate($event)">

this.videoOptions = [
  {fullscreen: {enabled: false}},
  {controls: ['play-large', 'play', 'progress', 'current-time', 'mute', 'volume', 'captions', 'settings']}
];
smnbbrv commented 4 years ago

Hi @TimThompson99

plyrOptions is an object and you pass an array. See https://github.com/sampotts/plyr#options for more info

MagneticLlama commented 4 years ago

It would be nice to see an example of how it should be formatted.

this.videoOptions = {
    fullscreen: { enabled: false },
    controls: ['play-large', 'play', 'progress', 'current-time', 'mute', 'volume', 'captions', 'settings']
};