diff --git a/boot.php b/boot.php index cf4a7abfb..adcb7534a 100644 --- a/boot.php +++ b/boot.php @@ -1956,6 +1956,13 @@ if(! function_exists('profile_tabs')){ 'title' => t('Photo Albums'), 'id' => 'photo-tab', ), + array( + 'label' => t('Videos'), + 'url' => $a->get_baseurl() . '/videos/' . $nickname, + 'sel' => ((!isset($tab)&&$a->argv[0]=='videos')?'active':''), + 'title' => t('Videos'), + 'id' => 'video-tab', + ), ); if ($is_owner){ diff --git a/include/text.php b/include/text.php index 72a2e1c37..9374e624b 100644 --- a/include/text.php +++ b/include/text.php @@ -1285,18 +1285,45 @@ function prepare_body($item,$attach = false) { return $s; } + $as = ''; + $vhead = false; $arr = explode('[/attach],',$item['attach']); if(count($arr)) { - $s .= '
'; + $as .= '
'; foreach($arr as $r) { $matches = false; $icon = ''; $cnt = preg_match_all('|\[attach\]href=\"(.*?)\" length=\"(.*?)\" type=\"(.*?)\" title=\"(.*?)\"|',$r,$matches, PREG_SET_ORDER); if($cnt) { foreach($matches as $mtch) { - $filetype = strtolower(substr( $mtch[3], 0, strpos($mtch[3],'/') )); + $mime = $mtch[3]; + + if((local_user() == $item['uid']) && ($item['contact-id'] != $a->contact['id']) && ($item['network'] == NETWORK_DFRN)) + $the_url = $a->get_baseurl() . '/redir/' . $item['contact-id'] . '?f=1&url=' . $mtch[1]; + else + $the_url = $mtch[1]; + + if(strpos($mime, 'video') !== false) { + if(!$vhead) { + $vhead = true; + $a->page['htmlhead'] .= replace_macros(get_markup_template('videos_head.tpl'), array()); + $a->page['end'] .= replace_macros(get_markup_template('videos_end.tpl'), array()); + } + + $id = end(explode('/', $the_url)); + $as .= replace_macros(get_markup_template('video_top.tpl'), array( + '$video' => array( + 'id' => $id, + 'title' => t('View Video'), + 'src' => $the_url, + 'mime' => $mime, + ), + )); + } + + $filetype = strtolower(substr( $mime, 0, strpos($mime,'/') )); if($filetype) { - $filesubtype = strtolower(substr( $mtch[3], strpos($mtch[3],'/') + 1 )); + $filesubtype = strtolower(substr( $mime, strpos($mime,'/') + 1 )); $filesubtype = str_replace('.', '-', $filesubtype); } else { @@ -1320,17 +1347,14 @@ function prepare_body($item,$attach = false) { $title = ((strlen(trim($mtch[4]))) ? escape_tags(trim($mtch[4])) : escape_tags($mtch[1])); $title .= ' ' . $mtch[2] . ' ' . t('bytes'); - if((local_user() == $item['uid']) && ($item['contact-id'] != $a->contact['id']) && ($item['network'] == NETWORK_DFRN)) - $the_url = $a->get_baseurl() . '/redir/' . $item['contact-id'] . '?f=1&url=' . $mtch[1]; - else - $the_url = $mtch[1]; - $s .= '' . $icon . ''; + $as .= '' . $icon . ''; } } } - $s .= '
'; + $as .= '
'; } + $s = $s . $as; // Look for spoiler diff --git a/js/main.js b/js/main.js index 488d5d4c7..badad4edf 100644 --- a/js/main.js +++ b/js/main.js @@ -381,6 +381,9 @@ } /* autocomplete @nicknames */ $(".comment-edit-form textarea").contact_autocomplete(baseurl+"/acl"); + + // setup videos, since VideoJS won't take care of any loaded via AJAX + _V_.autoSetup(); }); } diff --git a/js/main.min.js b/js/main.min.js index cd127f979..698190ebb 100644 --- a/js/main.min.js +++ b/js/main.min.js @@ -1 +1 @@ -function openClose(theID){if(document.getElementById(theID).style.display=="block"){document.getElementById(theID).style.display="none"}else{document.getElementById(theID).style.display="block"}}function openMenu(theID){document.getElementById(theID).style.display="block"}function closeMenu(theID){document.getElementById(theID).style.display="none"}var src=null;var prev=null;var livetime=null;var msie=false;var stopped=false;var totStopped=false;var timer=null;var pr=0;var liking=0;var in_progress=false;var langSelect=false;var commentBusy=false;var last_popup_menu=null;var last_popup_button=null;$(function(){$.ajaxSetup({cache:false});msie=$.browser.msie;$(".onoff input").each(function(){val=$(this).val();id=$(this).attr("id");$("#"+id+"_onoff ."+(val==0?"on":"off")).addClass("hidden")});$(".onoff > a").click(function(event){event.preventDefault();var input=$(this).siblings("input");var val=1-input.val();var id=input.attr("id");$("#"+id+"_onoff ."+(val==0?"on":"off")).addClass("hidden");$("#"+id+"_onoff ."+(val==1?"on":"off")).removeClass("hidden");input.val(val)});setupFieldRichtext();function close_last_popup_menu(){if(last_popup_menu){last_popup_menu.hide();last_popup_button.removeClass("selected");last_popup_menu=null;last_popup_button=null}}$("a[rel^=#]").click(function(e){close_last_popup_menu();menu=$($(this).attr("rel"));e.preventDefault();e.stopPropagation();if(menu.attr("popup")=="false")return false;$(this).parent().toggleClass("selected");menu.toggle();if(menu.css("display")=="none"){last_popup_menu=null;last_popup_button=null}else{last_popup_menu=menu;last_popup_button=$(this).parent()}return false});$("html").click(function(){close_last_popup_menu()});$("a.popupbox").colorbox({inline:true,transition:"elastic"});var notifications_tpl=unescape($("#nav-notifications-template[rel=template]").html());var notifications_all=unescape($("
").append($("#nav-notifications-see-all").clone()).html());var notifications_mark=unescape($("
").append($("#nav-notifications-mark-all").clone()).html());var notifications_empty=unescape($("#nav-notifications-menu").html());$("nav").bind("nav-update",function(e,data){var invalid=$(data).find("invalid").text();if(invalid==1){window.location.href=window.location.href}var net=$(data).find("net").text();if(net==0){net="";$("#net-update").removeClass("show")}else{$("#net-update").addClass("show")}$("#net-update").html(net);var home=$(data).find("home").text();if(home==0){home="";$("#home-update").removeClass("show")}else{$("#home-update").addClass("show")}$("#home-update").html(home);var intro=$(data).find("intro").text();if(intro==0){intro="";$("#intro-update").removeClass("show")}else{$("#intro-update").addClass("show")}$("#intro-update").html(intro);var mail=$(data).find("mail").text();if(mail==0){mail="";$("#mail-update").removeClass("show")}else{$("#mail-update").addClass("show")}$("#mail-update").html(mail);var intro=$(data).find("intro").text();if(intro==0){intro="";$("#intro-update-li").removeClass("show")}else{$("#intro-update-li").addClass("show")}$("#intro-update-li").html(intro);var mail=$(data).find("mail").text();if(mail==0){mail="";$("#mail-update-li").removeClass("show")}else{$("#mail-update-li").addClass("show")}$("#mail-update-li").html(mail);var allevents=$(data).find("all-events").text();if(allevents==0){allevents="";$("#allevents-update").removeClass("show")}else{$("#allevents-update").addClass("show")}$("#allevents-update").html(allevents);var alleventstoday=$(data).find("all-events-today").text();if(alleventstoday==0){$("#allevents-update").removeClass("notif-allevents-today")}else{$("#allevents-update").addClass("notif-allevents-today")}var events=$(data).find("events").text();if(events==0){events="";$("#events-update").removeClass("show")}else{$("#events-update").addClass("show")}$("#events-update").html(events);var eventstoday=$(data).find("events-today").text();if(eventstoday==0){$("#events-update").removeClass("notif-events-today")}else{$("#events-update").addClass("notif-events-today")}var birthdays=$(data).find("birthdays").text();if(birthdays==0){birthdays="";$("#birthdays-update").removeClass("show")}else{$("#birthdays-update").addClass("show")}$("#birthdays-update").html(birthdays);var birthdaystoday=$(data).find("birthdays-today").text();if(birthdaystoday==0){$("#birthdays-update").removeClass("notif-birthdays-today")}else{$("#birthdays-update").addClass("notif-birthdays-today")}var eNotif=$(data).find("notif");if(eNotif.children("note").length==0){$("#nav-notifications-menu").html(notifications_empty)}else{nnm=$("#nav-notifications-menu");nnm.html(notifications_all+notifications_mark);eNotif.children("note").each(function(){e=$(this);text=e.text().format(""+e.attr("name")+"");html=notifications_tpl.format(e.attr("href"),e.attr("photo"),text,e.attr("date"),e.attr("seen"));nnm.append(html)});$("img[data-src]",nnm).each(function(i,el){$(el).attr("src",$(el).data("src"))})}notif=eNotif.attr("count");if(notif>0){$("#nav-notifications-linkmenu").addClass("on")}else{$("#nav-notifications-linkmenu").removeClass("on")}if(notif==0){notif="";$("#notify-update").removeClass("show")}else{$("#notify-update").addClass("show")}$("#notify-update").html(notif);var eSysmsg=$(data).find("sysmsgs");eSysmsg.children("notice").each(function(){text=$(this).text();$.jGrowl(text,{sticky:true,theme:"notice"})});eSysmsg.children("info").each(function(){text=$(this).text();$.jGrowl(text,{sticky:false,theme:"info",life:1e4})})});NavUpdate();$(document).keydown(function(event){if(event.keyCode=="8"){var target=event.target||event.srcElement;if(!/input|textarea/i.test(target.nodeName)){return false}}if(event.keyCode=="19"||event.ctrlKey&&event.which=="32"){event.preventDefault();if(stopped==false){stopped=true;if(event.ctrlKey){totStopped=true}$("#pause").html('pause')}else{unpause()}}else{if(!totStopped){unpause()}}})});function NavUpdate(){if(!stopped){var pingCmd="ping"+(localUser!=0?"?f=&uid="+localUser:"");$.get(pingCmd,function(data){$(data).find("result").each(function(){$("nav").trigger("nav-update",this);if($("#live-network").length){src="network";liveUpdate()}if($("#live-profile").length){src="profile";liveUpdate()}if($("#live-community").length){src="community";liveUpdate()}if($("#live-notes").length){src="notes";liveUpdate()}if($("#live-display").length){src="display";liveUpdate()}if($("#live-photos").length){if(liking){liking=0;window.location.href=window.location.href}}})})}timer=setTimeout(NavUpdate,updateInterval)}function liveUpdate(){if(src==null||stopped||!profile_uid){$(".like-rotator").hide();return}if($(".comment-edit-text-full").length||in_progress){if(livetime){clearTimeout(livetime)}livetime=setTimeout(liveUpdate,1e4);return}if(livetime!=null)livetime=null;prev="live-"+src;in_progress=true;var udargs=netargs.length?"/"+netargs:"";var update_url="update_"+src+udargs+"&p="+profile_uid+"&page="+profile_page+"&msie="+(msie?1:0);$.get(update_url,function(data){in_progress=false;$(".toplevel_item",data).each(function(){var ident=$(this).attr("id");if($("#"+ident).length==0&&profile_page==1){$("img",this).each(function(){$(this).attr("src",$(this).attr("dst"))});$("#"+prev).after($(this))}else{var id=$(".hide-comments-total",this).attr("id");if(typeof id!="undefined"){id=id.split("-")[3];var commentsOpen=$("#collapsed-comments-"+id).is(":visible")}$("img",this).each(function(){$(this).attr("src",$(this).attr("dst"))});$("html").height($("html").height());$("#"+ident).replaceWith($(this));if(typeof id!="undefined"){if(commentsOpen)showHideComments(id)}$("html").height("auto")}prev=ident});$(".like-rotator").hide();if(commentBusy){commentBusy=false;$("body").css("cursor","auto")}$(".comment-edit-form textarea").contact_autocomplete(baseurl+"/acl")})}function imgbright(node){$(node).removeClass("drophide").addClass("drop")}function imgdull(node){$(node).removeClass("drop").addClass("drophide")}function dolike(ident,verb){unpause();$("#like-rotator-"+ident.toString()).show();$.get("like/"+ident.toString()+"?verb="+verb,NavUpdate);liking=1}function dosubthread(ident){unpause();$("#like-rotator-"+ident.toString()).show();$.get("subthread/"+ident.toString(),NavUpdate);liking=1}function dostar(ident){ident=ident.toString();$("#like-rotator-"+ident).show();$.get("starred/"+ident,function(data){if(data.match(/1/)){$("#starred-"+ident).addClass("starred");$("#starred-"+ident).removeClass("unstarred");$("#star-"+ident).addClass("hidden");$("#unstar-"+ident).removeClass("hidden")}else{$("#starred-"+ident).addClass("unstarred");$("#starred-"+ident).removeClass("starred");$("#star-"+ident).removeClass("hidden");$("#unstar-"+ident).addClass("hidden")}$("#like-rotator-"+ident).hide()})}function getPosition(e){var cursor={x:0,y:0};if(e.pageX||e.pageY){cursor.x=e.pageX;cursor.y=e.pageY}else{if(e.clientX||e.clientY){cursor.x=e.clientX+(document.documentElement.scrollLeft||document.body.scrollLeft)-document.documentElement.clientLeft;cursor.y=e.clientY+(document.documentElement.scrollTop||document.body.scrollTop)-document.documentElement.clientTop}else{if(e.x||e.y){cursor.x=e.x;cursor.y=e.y}}}return cursor}var lockvisible=false;function lockview(event,id){event=event||window.event;cursor=getPosition(event);if(lockvisible){lockviewhide()}else{lockvisible=true;$.get("lockview/"+id,function(data){$("#panel").html(data);$("#panel").css({left:cursor.x+5,top:cursor.y+5});$("#panel").show()})}}function lockviewhide(){lockvisible=false;$("#panel").hide()}function post_comment(id){unpause();commentBusy=true;$("body").css("cursor","wait");$("#comment-preview-inp-"+id).val("0");$.post("item",$("#comment-edit-form-"+id).serialize(),function(data){if(data.success){$("#comment-edit-wrapper-"+id).hide();$("#comment-edit-text-"+id).val("");var tarea=document.getElementById("comment-edit-text-"+id);if(tarea)commentClose(tarea,id);if(timer)clearTimeout(timer);timer=setTimeout(NavUpdate,10)}if(data.reload){window.location.href=data.reload}},"json");return false}function preview_comment(id){$("#comment-preview-inp-"+id).val("1");$("#comment-edit-preview-"+id).show();$.post("item",$("#comment-edit-form-"+id).serialize(),function(data){if(data.preview){$("#comment-edit-preview-"+id).html(data.preview);$("#comment-edit-preview-"+id+" a").click(function(){return false})}},"json");return true}function showHideComments(id){if($("#collapsed-comments-"+id).is(":visible")){$("#collapsed-comments-"+id).hide();$("#hide-comments-"+id).html(window.showMore)}else{$("#collapsed-comments-"+id).show();$("#hide-comments-"+id).html(window.showFewer)}}function preview_post(){$("#jot-preview").val("1");$("#jot-preview-content").show();tinyMCE.triggerSave();$.post("item",$("#profile-jot-form").serialize(),function(data){if(data.preview){$("#jot-preview-content").html(data.preview);$("#jot-preview-content"+" a").click(function(){return false})}},"json");$("#jot-preview").val("0");return true}function unpause(){totStopped=false;stopped=false;$("#pause").html("")}function bin2hex(s){var v,i,f=0,a=[];s+="";f=s.length;for(i=0;i'+data.desc+'
'+data.version+'
'+data.credits+'
'+theme+'')})} \ No newline at end of file +function openClose(theID){if(document.getElementById(theID).style.display=="block"){document.getElementById(theID).style.display="none"}else{document.getElementById(theID).style.display="block"}}function openMenu(theID){document.getElementById(theID).style.display="block"}function closeMenu(theID){document.getElementById(theID).style.display="none"}var src=null;var prev=null;var livetime=null;var msie=false;var stopped=false;var totStopped=false;var timer=null;var pr=0;var liking=0;var in_progress=false;var langSelect=false;var commentBusy=false;var last_popup_menu=null;var last_popup_button=null;$(function(){$.ajaxSetup({cache:false});msie=$.browser.msie;$(".onoff input").each(function(){val=$(this).val();id=$(this).attr("id");$("#"+id+"_onoff ."+(val==0?"on":"off")).addClass("hidden")});$(".onoff > a").click(function(event){event.preventDefault();var input=$(this).siblings("input");var val=1-input.val();var id=input.attr("id");$("#"+id+"_onoff ."+(val==0?"on":"off")).addClass("hidden");$("#"+id+"_onoff ."+(val==1?"on":"off")).removeClass("hidden");input.val(val)});setupFieldRichtext();function close_last_popup_menu(){if(last_popup_menu){last_popup_menu.hide();last_popup_button.removeClass("selected");last_popup_menu=null;last_popup_button=null}}$("a[rel^=#]").click(function(e){close_last_popup_menu();menu=$($(this).attr("rel"));e.preventDefault();e.stopPropagation();if(menu.attr("popup")=="false")return false;$(this).parent().toggleClass("selected");menu.toggle();if(menu.css("display")=="none"){last_popup_menu=null;last_popup_button=null}else{last_popup_menu=menu;last_popup_button=$(this).parent()}return false});$("html").click(function(){close_last_popup_menu()});$("a.popupbox").colorbox({inline:true,transition:"elastic"});var notifications_tpl=unescape($("#nav-notifications-template[rel=template]").html());var notifications_all=unescape($("
").append($("#nav-notifications-see-all").clone()).html());var notifications_mark=unescape($("
").append($("#nav-notifications-mark-all").clone()).html());var notifications_empty=unescape($("#nav-notifications-menu").html());$("nav").bind("nav-update",function(e,data){var invalid=$(data).find("invalid").text();if(invalid==1){window.location.href=window.location.href}var net=$(data).find("net").text();if(net==0){net="";$("#net-update").removeClass("show")}else{$("#net-update").addClass("show")}$("#net-update").html(net);var home=$(data).find("home").text();if(home==0){home="";$("#home-update").removeClass("show")}else{$("#home-update").addClass("show")}$("#home-update").html(home);var intro=$(data).find("intro").text();if(intro==0){intro="";$("#intro-update").removeClass("show")}else{$("#intro-update").addClass("show")}$("#intro-update").html(intro);var mail=$(data).find("mail").text();if(mail==0){mail="";$("#mail-update").removeClass("show")}else{$("#mail-update").addClass("show")}$("#mail-update").html(mail);var intro=$(data).find("intro").text();if(intro==0){intro="";$("#intro-update-li").removeClass("show")}else{$("#intro-update-li").addClass("show")}$("#intro-update-li").html(intro);var mail=$(data).find("mail").text();if(mail==0){mail="";$("#mail-update-li").removeClass("show")}else{$("#mail-update-li").addClass("show")}$("#mail-update-li").html(mail);var allevents=$(data).find("all-events").text();if(allevents==0){allevents="";$("#allevents-update").removeClass("show")}else{$("#allevents-update").addClass("show")}$("#allevents-update").html(allevents);var alleventstoday=$(data).find("all-events-today").text();if(alleventstoday==0){$("#allevents-update").removeClass("notif-allevents-today")}else{$("#allevents-update").addClass("notif-allevents-today")}var events=$(data).find("events").text();if(events==0){events="";$("#events-update").removeClass("show")}else{$("#events-update").addClass("show")}$("#events-update").html(events);var eventstoday=$(data).find("events-today").text();if(eventstoday==0){$("#events-update").removeClass("notif-events-today")}else{$("#events-update").addClass("notif-events-today")}var birthdays=$(data).find("birthdays").text();if(birthdays==0){birthdays="";$("#birthdays-update").removeClass("show")}else{$("#birthdays-update").addClass("show")}$("#birthdays-update").html(birthdays);var birthdaystoday=$(data).find("birthdays-today").text();if(birthdaystoday==0){$("#birthdays-update").removeClass("notif-birthdays-today")}else{$("#birthdays-update").addClass("notif-birthdays-today")}var eNotif=$(data).find("notif");if(eNotif.children("note").length==0){$("#nav-notifications-menu").html(notifications_empty)}else{nnm=$("#nav-notifications-menu");nnm.html(notifications_all+notifications_mark);eNotif.children("note").each(function(){e=$(this);text=e.text().format(""+e.attr("name")+"");html=notifications_tpl.format(e.attr("href"),e.attr("photo"),text,e.attr("date"),e.attr("seen"));nnm.append(html)});$("img[data-src]",nnm).each(function(i,el){$(el).attr("src",$(el).data("src"))})}notif=eNotif.attr("count");if(notif>0){$("#nav-notifications-linkmenu").addClass("on")}else{$("#nav-notifications-linkmenu").removeClass("on")}if(notif==0){notif="";$("#notify-update").removeClass("show")}else{$("#notify-update").addClass("show")}$("#notify-update").html(notif);var eSysmsg=$(data).find("sysmsgs");eSysmsg.children("notice").each(function(){text=$(this).text();$.jGrowl(text,{sticky:true,theme:"notice"})});eSysmsg.children("info").each(function(){text=$(this).text();$.jGrowl(text,{sticky:false,theme:"info",life:1e4})})});NavUpdate();$(document).keydown(function(event){if(event.keyCode=="8"){var target=event.target||event.srcElement;if(!/input|textarea/i.test(target.nodeName)){return false}}if(event.keyCode=="19"||event.ctrlKey&&event.which=="32"){event.preventDefault();if(stopped==false){stopped=true;if(event.ctrlKey){totStopped=true}$("#pause").html('pause')}else{unpause()}}else{if(!totStopped){unpause()}}})});function NavUpdate(){if(!stopped){var pingCmd="ping"+(localUser!=0?"?f=&uid="+localUser:"");$.get(pingCmd,function(data){$(data).find("result").each(function(){$("nav").trigger("nav-update",this);if($("#live-network").length){src="network";liveUpdate()}if($("#live-profile").length){src="profile";liveUpdate()}if($("#live-community").length){src="community";liveUpdate()}if($("#live-notes").length){src="notes";liveUpdate()}if($("#live-display").length){src="display";liveUpdate()}if($("#live-photos").length){if(liking){liking=0;window.location.href=window.location.href}}})})}timer=setTimeout(NavUpdate,updateInterval)}function liveUpdate(){if(src==null||stopped||!profile_uid){$(".like-rotator").hide();return}if($(".comment-edit-text-full").length||in_progress){if(livetime){clearTimeout(livetime)}livetime=setTimeout(liveUpdate,1e4);return}if(livetime!=null)livetime=null;prev="live-"+src;in_progress=true;var udargs=netargs.length?"/"+netargs:"";var update_url="update_"+src+udargs+"&p="+profile_uid+"&page="+profile_page+"&msie="+(msie?1:0);$.get(update_url,function(data){in_progress=false;$(".toplevel_item",data).each(function(){var ident=$(this).attr("id");if($("#"+ident).length==0&&profile_page==1){$("img",this).each(function(){$(this).attr("src",$(this).attr("dst"))});$("#"+prev).after($(this))}else{var id=$(".hide-comments-total",this).attr("id");if(typeof id!="undefined"){id=id.split("-")[3];var commentsOpen=$("#collapsed-comments-"+id).is(":visible")}$("img",this).each(function(){$(this).attr("src",$(this).attr("dst"))});$("html").height($("html").height());$("#"+ident).replaceWith($(this));if(typeof id!="undefined"){if(commentsOpen)showHideComments(id)}$("html").height("auto")}prev=ident});$(".like-rotator").hide();if(commentBusy){commentBusy=false;$("body").css("cursor","auto")}$(".comment-edit-form textarea").contact_autocomplete(baseurl+"/acl");_V_.autoSetup()})}function imgbright(node){$(node).removeClass("drophide").addClass("drop")}function imgdull(node){$(node).removeClass("drop").addClass("drophide")}function dolike(ident,verb){unpause();$("#like-rotator-"+ident.toString()).show();$.get("like/"+ident.toString()+"?verb="+verb,NavUpdate);liking=1}function dosubthread(ident){unpause();$("#like-rotator-"+ident.toString()).show();$.get("subthread/"+ident.toString(),NavUpdate);liking=1}function dostar(ident){ident=ident.toString();$("#like-rotator-"+ident).show();$.get("starred/"+ident,function(data){if(data.match(/1/)){$("#starred-"+ident).addClass("starred");$("#starred-"+ident).removeClass("unstarred");$("#star-"+ident).addClass("hidden");$("#unstar-"+ident).removeClass("hidden")}else{$("#starred-"+ident).addClass("unstarred");$("#starred-"+ident).removeClass("starred");$("#star-"+ident).removeClass("hidden");$("#unstar-"+ident).addClass("hidden")}$("#like-rotator-"+ident).hide()})}function getPosition(e){var cursor={x:0,y:0};if(e.pageX||e.pageY){cursor.x=e.pageX;cursor.y=e.pageY}else{if(e.clientX||e.clientY){cursor.x=e.clientX+(document.documentElement.scrollLeft||document.body.scrollLeft)-document.documentElement.clientLeft;cursor.y=e.clientY+(document.documentElement.scrollTop||document.body.scrollTop)-document.documentElement.clientTop}else{if(e.x||e.y){cursor.x=e.x;cursor.y=e.y}}}return cursor}var lockvisible=false;function lockview(event,id){event=event||window.event;cursor=getPosition(event);if(lockvisible){lockviewhide()}else{lockvisible=true;$.get("lockview/"+id,function(data){$("#panel").html(data);$("#panel").css({left:cursor.x+5,top:cursor.y+5});$("#panel").show()})}}function lockviewhide(){lockvisible=false;$("#panel").hide()}function post_comment(id){unpause();commentBusy=true;$("body").css("cursor","wait");$("#comment-preview-inp-"+id).val("0");$.post("item",$("#comment-edit-form-"+id).serialize(),function(data){if(data.success){$("#comment-edit-wrapper-"+id).hide();$("#comment-edit-text-"+id).val("");var tarea=document.getElementById("comment-edit-text-"+id);if(tarea)commentClose(tarea,id);if(timer)clearTimeout(timer);timer=setTimeout(NavUpdate,10)}if(data.reload){window.location.href=data.reload}},"json");return false}function preview_comment(id){$("#comment-preview-inp-"+id).val("1");$("#comment-edit-preview-"+id).show();$.post("item",$("#comment-edit-form-"+id).serialize(),function(data){if(data.preview){$("#comment-edit-preview-"+id).html(data.preview);$("#comment-edit-preview-"+id+" a").click(function(){return false})}},"json");return true}function showHideComments(id){if($("#collapsed-comments-"+id).is(":visible")){$("#collapsed-comments-"+id).hide();$("#hide-comments-"+id).html(window.showMore)}else{$("#collapsed-comments-"+id).show();$("#hide-comments-"+id).html(window.showFewer)}}function preview_post(){$("#jot-preview").val("1");$("#jot-preview-content").show();tinyMCE.triggerSave();$.post("item",$("#profile-jot-form").serialize(),function(data){if(data.preview){$("#jot-preview-content").html(data.preview);$("#jot-preview-content"+" a").click(function(){return false})}},"json");$("#jot-preview").val("0");return true}function unpause(){totStopped=false;stopped=false;$("#pause").html("")}function bin2hex(s){var v,i,f=0,a=[];s+="";f=s.length;for(i=0;i'+data.desc+'
'+data.version+'
'+data.credits+'
'+theme+'')})} \ No newline at end of file diff --git a/library/video-js/captions.vtt b/library/video-js/captions.vtt new file mode 100644 index 000000000..e598be198 --- /dev/null +++ b/library/video-js/captions.vtt @@ -0,0 +1,41 @@ +WEBVTT + +00:00.700 --> 00:04.110 +Captions describe all relevant audio for the hearing impaired. +[ Heroic music playing for a seagull ] + +00:04.500 --> 00:05.000 +[ Splash!!! ] + +00:05.100 --> 00:06.000 +[ Sploosh!!! ] + +00:08.000 --> 00:09.225 +[ Splash...splash...splash splash splash ] + +00:10.525 --> 00:11.255 +[ Splash, Sploosh again ] + +00:13.500 --> 00:14.984 +Dolphin: eeeEEEEEeeee! + +00:14.984 --> 00:16.984 +Dolphin: Squawk! eeeEEE? + +00:25.000 --> 00:28.284 +[ A whole ton of splashes ] + +00:29.500 --> 00:31.000 +Mine. Mine. Mine. + +00:34.300 --> 00:36.000 +Shark: Chomp + +00:36.800 --> 00:37.900 +Shark: CHOMP!!! + +00:37.861 --> 00:41.193 +EEEEEEOOOOOOOOOOWHALENOISE + +00:42.593 --> 00:45.611 +[ BIG SPLASH ] \ No newline at end of file diff --git a/library/video-js/demo.html b/library/video-js/demo.html new file mode 100644 index 000000000..b35cdc283 --- /dev/null +++ b/library/video-js/demo.html @@ -0,0 +1,30 @@ + + + + Video.js | HTML5 Video Player + + + + + + + + + + + + + + + + + diff --git a/library/video-js/video-js.css b/library/video-js/video-js.css new file mode 100644 index 000000000..7956aeee2 --- /dev/null +++ b/library/video-js/video-js.css @@ -0,0 +1,499 @@ +/* +VideoJS Default Styles (http://videojs.com) +Version 3.2.0 +*/ + +/* +REQUIRED STYLES (be careful overriding) +================================================================================ */ +/* When loading the player, the video tag is replaced with a DIV, + that will hold the video tag or object tag for other playback methods. + The div contains the video playback element (Flash or HTML5) and controls, and sets the width and height of the video. + + ** If you want to add some kind of border/padding (e.g. a frame), or special positioning, use another containing element. + Otherwise you risk messing up control positioning and full window mode. ** +*/ +.video-js { + background-color: #000; position: relative; padding: 0; + + /* Start with 10px for base font size so other dimensions can be em based and easily calculable. */ + font-size: 10px; + + /* Allow poster to be vertially aligned. */ + vertical-align: middle; + /* display: table-cell; */ /*This works in Safari but not Firefox.*/ +} + +/* Playback technology elements expand to the width/height of the containing div.