0

Could you please publish somewhere an example, how to control two siblings video on one page produced by ng-repeat from a parent controller: "play both", play left", "pause both", etc: [http://plnkr.co/edit/bvTvBNo3B4yydbzIOraX] . I know how to do it with jQuery, but not with videogular:

    <button onclick="$('video')[0].play();"> Play_rlx </button>
    <button onclick="$('video')[1].play();"> Play_tl </button>
    <button onclick="$('video').each(function(){$(this)[0].play() });"> Play both </button>
    <button onclick="$('video').each(function(){$(this)[0].pause()});"> Pause both </button>    

  <div  ng-app= "myApp" ng-controller="ctr" 
        ng-init= "cars= ['rlx', 'tl']; \
                  root='https://dl.dropboxusercontent.com/u/37458038/54_honda/'">

    <div ng-repeat="car in cars" class="videogular-container" style="width:400px; height:300px">
      <h3>car: {{ car }}</h3>

      <videogular>
        <vg-media vg-src="[{src: root+car+'/4youtubeSD.mp4', type: 'video/mp4'}]">
        </vg-media>
      </videogular>

    </div>    
  </div>
elecash
  • 925
  • 7
  • 11
  • Maybe this is what you're looking for: http://stackoverflow.com/questions/31827732/stop-other-video-that-is-playing-in-background-on-play-the-new-one – elecash Sep 29 '15 at 08:10
  • This is [http://plnkr.co/edit/bvTvBNo3B4yydbzIOraX](http://plnkr.co/edit/bvTvBNo3B4yydbzIOraX) an example. I'd like the same, but replace code of the 4 buttons from jQuery to Angular with the same functionality. In reality I need also manage (set, get) currentTime and playbackRate of the two video, but I probably could figure it out myself after I know how to start/pause. – Alex Zolotovitski Sep 30 '15 at 23:21

0 Answers0