Skip to content
This repository has been archived by the owner on Jul 31, 2020. It is now read-only.

I need more control over the video API, this is not a bug. #4

Closed
corderogerardo opened this issue Jul 30, 2018 · 2 comments
Closed
Assignees
Labels
enhancement New feature or request

Comments

@corderogerardo
Copy link

I need more control over the video API, improve docs, or document how to? Thank you very much.

feature request, or proposal:

I'm developing a landing with a video player, where I have a Video with mat-video, the thing is that I need to know when the video has ended, that's why I think I need to access the video player API, to get the current time and total time and compare both, or simply listen to an ended event listener.

What is the current behavior?

No knowing how to gain more control over the video API.

What is the expected behavior?

Been able to play, stop, the video from the API.

What are the steps to reproduce?

Just install the component.

What is the use-case or motivation for changing an existing behavior?

Curiosity, learning, build something personal.

Which versions of Angular, Material, OS, TypeScript, browsers are affected?

Angular 5, TypeScript 5.

Is there anything else I should know?

Great component, pretty cool.

@nkoehler nkoehler added the enhancement New feature or request label Aug 1, 2018
@nkoehler nkoehler self-assigned this Aug 1, 2018
@nkoehler
Copy link
Owner

nkoehler commented Aug 1, 2018

I plan to add a feature allowing the use of the raw HTML video element, which will allow you to create your own event listeners, or wait for the ended flag.

The raw HTML video element API can be found here.

The update for mat-video should be available within a week.

@nkoehler
Copy link
Owner

nkoehler commented Aug 4, 2018

Release 2.3.0 is now available on npm, containing the ability to directly access the HTML5 video element and listen to events.

The README has been updated showing an example of this. In addition, the HTML5 video element has play()/pause() methods built into it which you can use for your personal projects.

As a note, this feature is experimental, and is subject to change in the future. But for your purposes, it should be more than enough to work with.

Closing this issue as it has been addressed and verified working for the provided examples

@nkoehler nkoehler closed this as completed Aug 4, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants