I have a number of entries containing videos with the language options contained in an ee2.7 grid field (ie. English / Irish). I am using the following code to output each video link in a fancybox lightbox. However the code I have at present does not work for ie8 and ipads etc.
{parents field="related_story"}
<div class="{switch='three columns alpha|three columns omega'}">
<ul>
<li><strong>{parents:title}</strong><br>
{parents:video}<a class="fancybox-media" href="{parents:video:video_url}"
title="{parents:title}" >{parents:video:video_title}</a> {/parents:video}</li>
</ul>
<div class="clear"> </div>
</div>
{/parents}
Ideally I need to have a separate piece of js for each video similar to the following which I am using elsewhere on the site to pull in specific videos:
$(window).load(function(){
$("a.fancybox-myths").fancybox({
content:'<div id="videospace">Loading the Video...</div>',
maxWidth:"100%",
maxHeight:"100%",
fitToView:false,
maxwidth:"100%",
autoSize:false,
closeBtn:true,
openEffect:"fade",
closeEffect:"fade",
scrolling:"no",
autoDimensions:!0,
helpers:{closeClick:!0,
title:{type:"inside"},
overlay:{
locked:!1,
css:{
background:"rgba(40, 33, 33, 0.80)"
}
}
},
afterShow:function(){
jwplayer("videospace").setup({
playlist: [{file: "http://webaddress.com/assets/video/title.mp4"}],
primary:"flash",
autostart:true,
rtmp:{bufferlength:5},
width: "100%",
aspectratio: "16:9"})
}
})
});
Essentially, what I need to do is automatically output the following line of the script dynamically with each link:
[{file: "http://webaddress.com/assets/video/title.mp4"}],
Apologies, this probably sounds very complicated!