@pat123456 wrote:
Hi,
I've a component "player-video" like that (there are some other things in it, that why it's a component) :
video-player.hbs
<video src="{{src}}" ></video>
and I want some buttons in his parent's component to make the video play from one time to an other, for example one button : 1.05 to 1.32 minute, an other button : from 0.35 to 0.59 ... etc
in the player-video component there will certainly be a function something like that :
playExtract(from, to){
this.$('video').currentTime = from
setInterval(function(){
$this.$('video').currentTime > to && video.pause()
...playing an extract of a video is not exactly a "property" of the player-video component, and component in Ember doesn't have public functions.
what is the nice "Ember way" to achieve this sort of thing ? does it need to use a computed properties (ex : "isPlaying") inside the player-video component that fire the playExtract function when the property "isPlaying" value change... ? , something more Ember like ?
Posts: 1
Participants: 1