I'm try working with Angular 2, but freeze on working on HTML 5 video. In manual I found, that can use in template:
<video #videoplayer></video>
This should create local variable "videoplayer" that provides access to the video element. It is possible get it from component, for example:
@Component({
selector: '<some>',
template: '<video #videoplayer></video>'
})
export class SomeComponent {
public videoplayer; // How can I got element object here?
play() { // I need work with <video> in Component
this.videoplayer.play();
}
}
Thank you for help, I try @Host it or use it like @Input but still don't work as I need.