简体   繁体   中英

JWPlayer playing all video automatically when I'm playing only one

I'm using JWPlayer and its JS api. All other things works fine but when I'm playing single video it plays all videos in page. I've given unique id to all videos.

Code :

var player = jwplayer('v-'+video.MediaGUID).setup({
                //file: image_server_path+'uploads/'+video.MediaFolder+'/'+video.ImageName+'.mp4',
                file: 'http://localhost/jwplayer/video/home-banner.mp4',
                mute: true,
                autostart: false,
                primary: 'flash'
              })
              .addButton(site_url+'assets/img/popin.png','popout video',function(){
                $scope.popout_video('v-'+video.MediaGUID);
              },"popoutvideo")
              .addButton(site_url+'assets/img/popout.png','popout close',function(){
                $scope.popin_video('v-'+video.MediaGUID);
              },"popoutclose");

Can you detect which video is in visible state to user, set autostart property true to it; set autostart value to false by default;

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM