Skip to content
This repository was archived by the owner on Feb 6, 2024. It is now read-only.

Commit

Permalink
feat(#335): add a method to access the elemement video
Browse files Browse the repository at this point in the history
  • Loading branch information
peterpeterparker committed Sep 14, 2019
1 parent 1c3d4e2 commit c832bf4
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,11 @@ export class DeckdeckgoSlideVideo implements DeckdeckgoSlidePlay {
await this.playPauseVideo(!this.isPlaying);
}

@Method()
async getVideo(): Promise<HTMLMediaElement> {
return this.el.shadowRoot.querySelector('video');
}

private playPauseVideo(play: boolean): Promise<void> {
return new Promise<void>(async (resolve) => {
const element: any = this.el.shadowRoot.querySelector('video');
Expand Down

0 comments on commit c832bf4

Please sign in to comment.