Wildhoney / ngVideo

Modularised ~13KB HTML5 audio/video implementation using Angular.js
http://ng-video.herokuapp.com/
MIT License
227 stars 57 forks source link

setVolume on initialization #42

Closed tachyon-ops closed 8 years ago

tachyon-ops commented 8 years ago

Hi there!

In my particular case I need to start the video muted. Haven't found anything on docs about it.

How can I setVolume(x) on initialization? I mean, I can use the controller to grab the apropriate scope where the interface is, but... shouldn't we be able to access directly the controls from the controller?

Thanks in advance

Wildhoney commented 8 years ago

shouldn't we be able to access directly the controls from the controller?

Agreed! This will definitely be in the next version — which will be written with Angular2.

For the moment you can add the muted attribute to the video element:

<video muted vi-screen></video>

Please let me know how you get on with that.

tachyon-ops commented 8 years ago

Great! Thanks @Wildhoney :+1: Tried 'mute' already, forgot about the past tense heh Then guess we could start muted untill Angular2 ngVideo :)