Wildhoney / ngVideo

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

How can I listen to player data from $sope? #41

Open diegoaguilar opened 8 years ago

diegoaguilar commented 8 years ago

Let's say I have:

var source = video.multiSource();
source.addSource('mp4', 'videos/flux@flux.mp4');
source.addSource('mp4', 'videos/oscar@inception.mp4');
source.addSource('mp4', 'videos/react@iugh.mp4');
source.save();
$interval(()=>{
    console.log($scope.currentTime);
}, 750);

That would log undefined, how can I access complete player data and listen to events?

Wildhoney commented 8 years ago

You'd have to use the feedback directive. Probably this will get a re-write with Angular 2 soon, and then we'd have an accessible API for such information.