videojs / videojs-youtube

YouTube playback technology for Video.js
1.13k stars 547 forks source link

Angular 10 - YouTube parameters doesn't work #579

Open vatsal2210 opened 3 years ago

vatsal2210 commented 3 years ago

YouTube API Parameters Link

Goal: I want to remove all related videos suggestions, share button and controls:

  1. Video.js library versions:
"@angular/cdk": "10.2.7",
"video.js": "7.10.2",
"videojs-youtube": "2.6.1",
  1. This is my default config file in the angular component
config: any;

this.config = {     
    responsive: true,
    controls: true,
    playbackRates: [0.5, 0.75, 1, 1.25, 1.5, 2],
    plugins: {},
    html5: { nativeTextTracks: false },
}
  1. This is where I set up the Youtube plugin after ngAfterViewInit()
this.config.techOrder = ['youtube'];
this.config.sources = [{ type: 'video/youtube', src: this.youtubeUrl }];
this.config.youtube = { modestbranding: 1, wmode: 'transparent', controls: 0, iv_load_policy: 3, rel: 0 };

Here's a player view:

image

Let me know if you need any other info to resolve this issue as early as possible!

samueleastdev commented 3 years ago

I have recently been reading up on this apparently it is not possible anymore YouTube has removed this functionality.

You cannot remove the related videos adding the rel=0 will only show you related videos from your channel but they will still show.