nkoehler / mat-video

:tv: mat-video is an Angular 8/9+ video player using Material!
https://nkoehler.github.io/mat-video/
MIT License
91 stars 45 forks source link

seeking option in mat-video, how to use it ? #15

Closed rajatsehgal2010 closed 5 years ago

rajatsehgal2010 commented 5 years ago

i want to seek into a video at particular duration, how can i do it ?

nkoehler commented 5 years ago

In your HTML file:

<mat-video #video src="localOrRemoteVideo.mp4"></mat-video>

In your TS file:

export class SampleComponent implements OnInit {
  @ViewChild('video') matVideo: MatVideoComponent;
  video: HTMLVideoElement;

  constructor() { }

  ngOnInit(): void {
    this.video = this.matVideo.getVideoTag();

    this.video.currentTime = 10; // set video time position to 10 seconds
  }
}

The API feature is experimental and subject to change.

Closing.

rajatsehgal2010 commented 5 years ago

i am unable to import the MatVideoComponent ? can you please tell how to do it

On Fri, Feb 22, 2019 at 8:25 PM nkoehler notifications@github.com wrote:

In your HTML file:

<mat-video #video src="localOrRemoteVideo.mp4">

In your TS file:

export class SampleComponent implements OnInit { @ViewChild('video') matVideo: MatVideoComponent; video: HTMLVideoElement;

constructor() { }

ngOnInit(): void { this.video = this.matVideo.getVideoTag();

this.video.currentTime = 10; // set video time position to 10 seconds

} }

The API feature is experimental and subject to change.

Closing.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/nkoehler/mat-video/issues/15#issuecomment-466424184, or mute the thread https://github.com/notifications/unsubscribe-auth/AmhDwzb6L-zLhP2BX34zOnNY24m4P_Puks5vQAT5gaJpZM4a_lSz .

rajatsehgal2010 commented 5 years ago

can't import MatVideoComponent, showing this warning in ts file that cannot import MatVideoComponent. Please help me in this.

On Sun, Feb 24, 2019 at 8:35 PM Rajat Sehgal rajat.sehgal@lumiq.ai wrote:

i am unable to import the MatVideoComponent ? can you please tell how to do it

On Fri, Feb 22, 2019 at 8:25 PM nkoehler notifications@github.com wrote:

In your HTML file:

<mat-video #video src="localOrRemoteVideo.mp4">

In your TS file:

export class SampleComponent implements OnInit { @ViewChild('video') matVideo: MatVideoComponent; video: HTMLVideoElement;

constructor() { }

ngOnInit(): void { this.video = this.matVideo.getVideoTag();

this.video.currentTime = 10; // set video time position to 10 seconds

} }

The API feature is experimental and subject to change.

Closing.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/nkoehler/mat-video/issues/15#issuecomment-466424184, or mute the thread https://github.com/notifications/unsubscribe-auth/AmhDwzb6L-zLhP2BX34zOnNY24m4P_Puks5vQAT5gaJpZM4a_lSz .

nkoehler commented 5 years ago

Read the instructions.

rajatsehgal2010 commented 5 years ago

still i can't import the MatVideoComponent

On Mon, Feb 25, 2019 at 8:49 AM nkoehler notifications@github.com wrote:

Read the instructions. https://github.com/nkoehler/mat-video#installation

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/nkoehler/mat-video/issues/15#issuecomment-466858443, or mute the thread https://github.com/notifications/unsubscribe-auth/AmhDw_DYK7jYZYnckzjIBRDCb0zhhQkMks5vQ1YmgaJpZM4a_lSz .

rajatsehgal2010 commented 5 years ago

the mat-video package that we install using the

npm install --save mat-video

doesn't have the export functionality of the matvideocomponent and the src video component is different from what you have provided at your github repo. So which i have to install , if i am using npm then many functionalities aren't working.

On Mon, Feb 25, 2019 at 8:59 PM Rajat Sehgal rajat.sehgal@lumiq.ai wrote:

still i can't import the MatVideoComponent

On Mon, Feb 25, 2019 at 8:49 AM nkoehler notifications@github.com wrote:

Read the instructions. https://github.com/nkoehler/mat-video#installation

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/nkoehler/mat-video/issues/15#issuecomment-466858443, or mute the thread https://github.com/notifications/unsubscribe-auth/AmhDw_DYK7jYZYnckzjIBRDCb0zhhQkMks5vQ1YmgaJpZM4a_lSz .

rajatsehgal2010 commented 5 years ago

this is the difference between them

On Mon, Feb 25, 2019 at 9:13 PM Rajat Sehgal rajat.sehgal@lumiq.ai wrote:

the mat-video package that we install using the

npm install --save mat-video

doesn't have the export functionality of the matvideocomponent and the src video component is different from what you have provided at your github repo. So which i have to install , if i am using npm then many functionalities aren't working.

On Mon, Feb 25, 2019 at 8:59 PM Rajat Sehgal rajat.sehgal@lumiq.ai wrote:

still i can't import the MatVideoComponent

On Mon, Feb 25, 2019 at 8:49 AM nkoehler notifications@github.com wrote:

Read the instructions. https://github.com/nkoehler/mat-video#installation

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/nkoehler/mat-video/issues/15#issuecomment-466858443, or mute the thread https://github.com/notifications/unsubscribe-auth/AmhDw_DYK7jYZYnckzjIBRDCb0zhhQkMks5vQ1YmgaJpZM4a_lSz .

docaohuynh commented 5 years ago

@rajatsehgal2010 Add this line to mat-video.d.ts export * from './app/video/video.component'; And in your component import import { MatVideoComponent } from 'mat-video'; Still warning but It work