Я хочу дать рекомендацию к видео, которое находится в плейлисте .. Итак, я хочу дать массиву json рекомендации ... но он не работает .. ( JWPLAYER ) Вот мой код..
var r = [{
"file": "http://content.jwplatform.com/videos/yp34SRmf-8yQ1cYbs.mp4",
"image": "http://content.jwplatform.com/thumbs/yp34SRmf-720.jpg",
"title": "first video",
"mediaid": "2222"
},
{
"file": "http://content.jwplatform.com/videos/tkM1zvBq-8yQ1cYbs.mp4",
"image": "http://content.jwplatform.com/thumbs/tkM1zvBq-720.jpg",
"title": "second video",
"mediaid": "3333"
}];
var playlist = { file:"https://vodtimesnow.akamaized.net/2018/11/DZM151118_Video_of_Top_Destination_Weddings_in_Bollywood_Ranveer_&_Deepika_Virat_&_Anushka_&_More.mp4",
image: "v/Layer19.jpg",
title: "A",
mediaid: "8080",
recommendations:r
}
jwplayer("myVideo").setup({
playlist: playlist,
key:"xxxxxxxxxxxxxxxxxx",
autostartMuted:false,
autostart:'viewable',
volume: 75,
related: {
displayMode: "shelf", //shelf | overlay | shelfWidget(want to show
playlist on particular location)
onclick: "play", //play | link (Redirects the page to the url specified in
the related item's link field.)
oncomplete: "show", //show (default,true) | hide(false) | autoplay
autoplaytimer: 5 // no of sec to wait before playing the next video;
if oncomplete:autoplay,
}
});
jwplayer('myVideo').on('playlistComplete',function(){
jwplayer('myVideo').getPlugin('related').open();
});