How to disable video player properties on iframe using angular8

851 Views Asked by At

I have video player in my angular8 application with help of ngx-embeded-video i need to disable default player opiton like pause, maxi window, volume, play option. Also that video need to play angular material modal popup on that pop all the player option need to enable. The video play is shown below enter image description here When the user click on this video that time angular material modal need to open and play same video i have tried model open but not working i need help on this. html:

ts:
  import { EmbedVideoService } from 'ngx-embed-video';
  import { CarPopupModalComponent } from '../car/car-popup-modal/car-popup-modal.component'

  export class CarComponent implements OnInit {
  videos: any;
  vimeoUrl = 'https://vimeo.com/197933516';
  constructor(private embedService: EmbedVideoService){
    this.videos = this.embedService.embed(this.vimeoUrl);
    }
    openCarDialog(): void {
    console.log('inside the modal');
    this.dialog.open(CarPopupModalComponent, {
      width: '250px',
      data: {}
    })
  }
  }
1

There are 1 best solutions below

0
On

I was achieved via following angular supporting package "https://www.npmjs.com/package/mat-video"

 npm install --save mat-video 

 import to module,

 import { MatVideoModule } from 'mat-video';

@NgModule({
  imports: [
    BrowserAnimationsModule,
    MatVideoModule
  ],
})
export class AppModule { }

html:
<mat-video title="{{'Advertisement Video' | translate}}" [autoplay]="false" [preload]="false" [fullscreen]="false" [download]="false"
      spinner="spin" (click)="openCarDialog()">
      <source matVideoSource src="../../../assets/videos/fourkvideo.mp4" type="video/mp4">

ts:
Vidoe can play angular madal pop by
openCarDialog(): void {
    console.log('inside the modal');
    this.dialog.open(CarPopupModalComponent, {
      width: '720px',
      height: '500px',
      data: {}
    })
  }