From: <die...@us...> - 2010-02-01 13:42:02
|
Revision: 1733 http://openutils.svn.sourceforge.net/openutils/?rev=1733&view=rev Author: diego_schivo Date: 2010-02-01 13:41:55 +0000 (Mon, 01 Feb 2010) Log Message: ----------- MEDIA-53 fix typo Modified Paths: -------------- trunk/openutils-mgnlmedia/src/main/resources/META-INF/tags/media/media.tag trunk/openutils-mgnlmedia/src/main/resources/META-INF/tags/media/player.tag Modified: trunk/openutils-mgnlmedia/src/main/resources/META-INF/tags/media/media.tag =================================================================== --- trunk/openutils-mgnlmedia/src/main/resources/META-INF/tags/media/media.tag 2010-02-01 13:34:35 UTC (rev 1732) +++ trunk/openutils-mgnlmedia/src/main/resources/META-INF/tags/media/media.tag 2010-02-01 13:41:55 UTC (rev 1733) @@ -110,7 +110,7 @@ </c:if> </c:when> <c:when test="${media.type eq 'video' or media.type eq 'audio' }"> - <media:player share="${share}" item="${item}" width="${width}" height="${height}" autoPlay="${autoPlay}" loop="${loop}" thumbnail="${thumbnail}" noPlayIcon="${noPlayIcon}" controlBa="${controlBar}" skin="${skin}"/> + <media:player share="${share}" item="${item}" width="${width}" height="${height}" autoPlay="${autoPlay}" loop="${loop}" thumbnail="${thumbnail}" noPlayIcon="${noPlayIcon}" controlBar="${controlBar}" skin="${skin}"/> </c:when> <c:when test="${media.type eq 'youtube'}"> <c:set var="url" value="${media:url(mediaNode)}" /> Modified: trunk/openutils-mgnlmedia/src/main/resources/META-INF/tags/media/player.tag =================================================================== --- trunk/openutils-mgnlmedia/src/main/resources/META-INF/tags/media/player.tag 2010-02-01 13:34:35 UTC (rev 1732) +++ trunk/openutils-mgnlmedia/src/main/resources/META-INF/tags/media/player.tag 2010-02-01 13:41:55 UTC (rev 1733) @@ -12,7 +12,7 @@ <jsp:directive.attribute name="noPlayIcon" required="false" rtexprvalue="true" type="java.lang.Boolean" description="hide player icons"/> <jsp:directive.attribute name="skin" required="false" rtexprvalue="true" description="set player skin"/> <jsp:directive.attribute name="thumbnail" required="false" rtexprvalue="true" type="java.lang.Boolean" description="if set to true the preview of the player shows the thumbnail image"/> - <jsp:directive.attribute name="controlBa" required="false" rtexprvalue="true" type="java.lang.String" description="defines controlbar position. Possible values are: 'none' (for hiding), 'over', 'bottom', 'top'. If not set, this value will be 'bottom' by default."/> + <jsp:directive.attribute name="controlBar" required="false" rtexprvalue="true" type="java.lang.String" description="defines controlbar position. Possible values are: 'none' (for hiding), 'over', 'bottom', 'top'. If not set, this value will be 'bottom' by default."/> <jsp:directive.attribute name="share" required="false" rtexprvalue="true" type="java.lang.Boolean" description="if set to true the pluging share-1 is showen"/> <c:set value="${media:node(item)}" var="mediaNode" /> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <die...@us...> - 2010-02-01 14:43:26
|
Revision: 1739 http://openutils.svn.sourceforge.net/openutils/?rev=1739&view=rev Author: diego_schivo Date: 2010-02-01 14:43:20 +0000 (Mon, 01 Feb 2010) Log Message: ----------- MEDIA-71 Remove dependency from mootools in the player tag Modified Paths: -------------- trunk/openutils-mgnlmedia/src/main/resources/META-INF/tags/media/media.tag trunk/openutils-mgnlmedia/src/main/resources/META-INF/tags/media/player.tag Modified: trunk/openutils-mgnlmedia/src/main/resources/META-INF/tags/media/media.tag =================================================================== --- trunk/openutils-mgnlmedia/src/main/resources/META-INF/tags/media/media.tag 2010-02-01 14:18:30 UTC (rev 1738) +++ trunk/openutils-mgnlmedia/src/main/resources/META-INF/tags/media/media.tag 2010-02-01 14:43:20 UTC (rev 1739) @@ -143,26 +143,19 @@ <c:set var="previewImage" value="${su:substringAfterLast(url, 'v=')}" /> <c:if test="${!empty(url)}"> <c:set var="previewId" value="preview-${su:randomAlphanumeric(6)}" /> - <div id="${previewId}" class="preview"> - <div id="no-player"> - <!-- <ma:message key="media.noFlashPlayerDetected" /> --> - </div> + <div id="${previewId}" class="preview"><!-- --> </div> <script type='text/javascript'> <![CDATA[ - window.addEvent('domready', function(){ - var swfobject = new SWFObject('${pageContext.request.contextPath}/.resources/media/players/player.swf','player','${width}','${height}','9','#ffffff'); - swfobject.addParam('allowfullscreen','true'); - swfobject.addParam('allowscriptaccess','always'); - swfobject.addParam('wmode','opaque'); - swfobject.addParam('flashvars','${flashvars}'); - var version = deconcept.SWFObjectUtil.getPlayerVersion(); - if (version["major"] == 0 || version["major"] < 9) { - $('no-player').setStyle('display','block'); - } else { - swfobject.write('${previewId}'); - } - }); + var swfobject = new SWFObject('${pageContext.request.contextPath}/.resources/media/players/player.swf','player','${width}','${height}','9','#ffffff'); + swfobject.addParam('allowfullscreen','true'); + swfobject.addParam('allowscriptaccess','always'); + swfobject.addParam('wmode','opaque'); + swfobject.addParam('flashvars','${flashvars}'); + var version = deconcept.SWFObjectUtil.getPlayerVersion(); + if (!(version["major"] == 0 || version["major"] < 9)) { + swfobject.write('${previewId}'); + } ]]></script> </c:if> </c:when> Modified: trunk/openutils-mgnlmedia/src/main/resources/META-INF/tags/media/player.tag =================================================================== --- trunk/openutils-mgnlmedia/src/main/resources/META-INF/tags/media/player.tag 2010-02-01 14:18:30 UTC (rev 1738) +++ trunk/openutils-mgnlmedia/src/main/resources/META-INF/tags/media/player.tag 2010-02-01 14:43:20 UTC (rev 1739) @@ -29,9 +29,7 @@ </c:if> <c:if test="${!empty(url)}"> <c:set var="previewId" value="preview-${su:randomAlphanumeric(6)}" /> - <div id="${previewId}" class="preview"> - <div id="no-player"><!-- --> - </div> + <div id="${previewId}" class="preview"><!-- --> </div> <c:if test="${su:endsWith(fn:toLowerCase(media:url(mediaNode)), '.flv') or su:endsWith(fn:toLowerCase(media:url(mediaNode)), '.mp3')}"> @@ -74,33 +72,25 @@ </c:set> <script type='text/javascript'> <![CDATA[ - window.addEvent('domready', function(){ - var swfobject = new SWFObject('${pageContext.request.contextPath}/.resources/media/players/player.swf','player','${width}','${height}','9','#ffffff'); - swfobject.addParam('allowfullscreen','true'); - swfobject.addParam('allowscriptaccess','always'); - swfobject.addParam('wmode','opaque'); - swfobject.addParam('flashvars', '${flashvars}'); - var version = deconcept.SWFObjectUtil.getPlayerVersion(); - if (version["major"] == 0 || version["major"] < 9) { - $('no-player').setStyle('display','block'); - } else { - swfobject.write('${previewId}'); - } - });]]> + var swfobject = new SWFObject('${pageContext.request.contextPath}/.resources/media/players/player.swf','player','${width}','${height}','9','#ffffff'); + swfobject.addParam('allowfullscreen','true'); + swfobject.addParam('allowscriptaccess','always'); + swfobject.addParam('wmode','opaque'); + swfobject.addParam('flashvars', '${flashvars}'); + var version = deconcept.SWFObjectUtil.getPlayerVersion(); + if (!(version["major"] == 0 || version["major"] < 9)) { + swfobject.write('${previewId}'); + }]]> </script> </c:if> <c:if test="${su:endsWith(fn:toLowerCase(media:url(mediaNode)), 'swf')}"> <script type='text/javascript'> <![CDATA[ - window.addEvent('domready', function(){ - var swfobject = new SWFObject('${pageContext.request.contextPath}${media:url(mediaNode)}', '${previewId}', "${width}", "${height}", "9.0.0"); - var version = deconcept.SWFObjectUtil.getPlayerVersion(); - if (version["major"] == 0 || version["major"] < 9) { - $('no-player').setStyle('display','block'); - } else { - swfobject.write('${previewId}'); - } - });]]> + var swfobject = new SWFObject('${pageContext.request.contextPath}${media:url(mediaNode)}', '${previewId}', "${width}", "${height}", "9.0.0"); + var version = deconcept.SWFObjectUtil.getPlayerVersion(); + if (!(version["major"] == 0 || version["major"] < 9)) { + swfobject.write('${previewId}'); + }]]> </script> </c:if> </c:if> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <die...@us...> - 2010-02-01 16:54:10
|
Revision: 1749 http://openutils.svn.sourceforge.net/openutils/?rev=1749&view=rev Author: diego_schivo Date: 2010-02-01 16:54:03 +0000 (Mon, 01 Feb 2010) Log Message: ----------- MEDIA-59 description for "player" attribute Modified Paths: -------------- trunk/openutils-mgnlmedia/src/main/resources/META-INF/tags/media/media.tag trunk/openutils-mgnlmedia/src/main/resources/META-INF/tags/media/player.tag trunk/openutils-mgnlmedia/src/main/resources/META-INF/tags/media/swfobject.tag Modified: trunk/openutils-mgnlmedia/src/main/resources/META-INF/tags/media/media.tag =================================================================== --- trunk/openutils-mgnlmedia/src/main/resources/META-INF/tags/media/media.tag 2010-02-01 16:41:49 UTC (rev 1748) +++ trunk/openutils-mgnlmedia/src/main/resources/META-INF/tags/media/media.tag 2010-02-01 16:54:03 UTC (rev 1749) @@ -5,7 +5,7 @@ <jsp:directive.tag description="Displays a media" pageEncoding="UTF-8"/> <jsp:directive.attribute name="id" required="false" rtexprvalue="true" description="html element id"/> <jsp:directive.attribute name="item" required="true" rtexprvalue="true" type="java.lang.Object" description="media uuid or media content node "/> - <jsp:directive.attribute name="player" required="false" rtexprvalue="true" type="java.lang.String" description=""/> + <jsp:directive.attribute name="player" required="false" rtexprvalue="true" type="java.lang.String" description="the swf file of the player (examples: player.swf (default), jw-player-5/player.swf, /.resources/media/players/jw-player-5/player.swf)"/> <jsp:directive.attribute name="width" required="false" rtexprvalue="true" type="java.lang.Integer" description="image or player width"/> <jsp:directive.attribute name="height" required="false" rtexprvalue="true" type="java.lang.Integer" description="image or player height"/> <jsp:directive.attribute name="useEm" required="false" rtexprvalue="true" type="java.lang.Boolean" description="if true, and ignoreDimensions is not true it will apply style attribute on img tags with sidth and height in 'em'. the em values will be computed using as width in pixel * emRatio (see next attribute)"/> Modified: trunk/openutils-mgnlmedia/src/main/resources/META-INF/tags/media/player.tag =================================================================== --- trunk/openutils-mgnlmedia/src/main/resources/META-INF/tags/media/player.tag 2010-02-01 16:41:49 UTC (rev 1748) +++ trunk/openutils-mgnlmedia/src/main/resources/META-INF/tags/media/player.tag 2010-02-01 16:54:03 UTC (rev 1749) @@ -4,7 +4,7 @@ xmlns:su="http://openutils.sf.net/openutils-stringutils"> <jsp:directive.tag description="Renders the audio or video player" pageEncoding="UTF-8"/> <jsp:directive.attribute name="item" required="true" rtexprvalue="true" type="java.lang.Object" description="media uuid or media content node "/> - <jsp:directive.attribute name="player" required="true" rtexprvalue="true" type="java.lang.String" description=""/> + <jsp:directive.attribute name="player" required="true" rtexprvalue="true" type="java.lang.String" description="the swf file of the player (examples: player.swf (default), jw-player-5/player.swf, /.resources/media/players/jw-player-5/player.swf)"/> <jsp:directive.attribute name="width" required="false" rtexprvalue="true" type="java.lang.Integer" description="image or player width"/> <jsp:directive.attribute name="height" required="false" rtexprvalue="true" type="java.lang.Integer" description="image or player height"/> <jsp:directive.attribute name="ignoreDim" required="false" rtexprvalue="true" type="java.lang.Boolean" description="if true the img element will be rendered without width and height attributes "/> Modified: trunk/openutils-mgnlmedia/src/main/resources/META-INF/tags/media/swfobject.tag =================================================================== --- trunk/openutils-mgnlmedia/src/main/resources/META-INF/tags/media/swfobject.tag 2010-02-01 16:41:49 UTC (rev 1748) +++ trunk/openutils-mgnlmedia/src/main/resources/META-INF/tags/media/swfobject.tag 2010-02-01 16:54:03 UTC (rev 1749) @@ -4,7 +4,7 @@ xmlns:su="http://openutils.sf.net/openutils-stringutils"> <jsp:directive.tag description="" pageEncoding="UTF-8" /> <jsp:directive.attribute name="player" required="true" rtexprvalue="true" type="java.lang.String" - description="" /> + description="the swf file of the player (examples: player.swf (default), jw-player-5/player.swf, /.resources/media/players/jw-player-5/player.swf)" /> <jsp:directive.attribute name="width" required="false" rtexprvalue="true" type="java.lang.Integer" description="flash content width" /> <jsp:directive.attribute name="height" required="false" rtexprvalue="true" type="java.lang.Integer" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fg...@us...> - 2010-02-13 22:12:27
|
Revision: 1921 http://openutils.svn.sourceforge.net/openutils/?rev=1921&view=rev Author: fgiust Date: 2010-02-13 22:12:21 +0000 (Sat, 13 Feb 2010) Log Message: ----------- MEDIA-91 get original video size for player if not specified + MEDIA-96 controlbar parameter fixed Modified Paths: -------------- trunk/openutils-mgnlmedia/src/main/resources/META-INF/tags/media/media.tag trunk/openutils-mgnlmedia/src/main/resources/META-INF/tags/media/player.tag Modified: trunk/openutils-mgnlmedia/src/main/resources/META-INF/tags/media/media.tag =================================================================== --- trunk/openutils-mgnlmedia/src/main/resources/META-INF/tags/media/media.tag 2010-02-13 21:26:04 UTC (rev 1920) +++ trunk/openutils-mgnlmedia/src/main/resources/META-INF/tags/media/media.tag 2010-02-13 22:12:21 UTC (rev 1921) @@ -45,14 +45,6 @@ <c:choose> <c:when test="${!empty mediaNode}"> <cms:setNode var="media" content="${mediaNode}" /> - <c:set var="controlBar"> - <![CDATA[&controlbar=bottom]]> - </c:set> - <c:if test="${!empty(controlbar)}"> - <c:set var="controlBar"> - <![CDATA[&controlbar=]]>${controlbar} - </c:set> - </c:if> <c:choose> <c:when test="${media.type eq 'image' or media.type eq 'wallpaper' or videoImagePreview}"> <c:choose> @@ -114,7 +106,7 @@ </c:if> </c:when> <c:when test="${media.type eq 'video' or media.type eq 'audio' }"> - <media:player player="${player}" share="${share}" item="${item}" width="${width}" height="${height}" autoPlay="${autoPlay}" loop="${loop}" thumbnail="${thumbnail}" noPlayIcon="${noPlayIcon}" controlBar="${controlBar}" skin="${skin}"/> + <media:player player="${player}" share="${share}" item="${item}" width="${width}" height="${height}" autoPlay="${autoPlay}" loop="${loop}" thumbnail="${thumbnail}" noPlayIcon="${noPlayIcon}" controlbar="${controlbar}" skin="${skin}"/> </c:when> <c:when test="${media.type eq 'youtube'}"> <c:set var="url" value="${media:url(mediaNode)}" /> Modified: trunk/openutils-mgnlmedia/src/main/resources/META-INF/tags/media/player.tag =================================================================== --- trunk/openutils-mgnlmedia/src/main/resources/META-INF/tags/media/player.tag 2010-02-13 21:26:04 UTC (rev 1920) +++ trunk/openutils-mgnlmedia/src/main/resources/META-INF/tags/media/player.tag 2010-02-13 22:12:21 UTC (rev 1921) @@ -2,37 +2,67 @@ xmlns:cms="cms-taglib" xmlns:cmsfn="http://www.magnolia.info/tlds/cmsfn-taglib.tld" xmlns:cmsu="cms-util-taglib" xmlns:fmt="http://java.sun.com/jsp/jstl/fmt" xmlns:fn="http://java.sun.com/jsp/jstl/functions" xmlns:media="http://net.sourceforge.openutils/mgnlMedia" xmlns:su="http://openutils.sf.net/openutils-stringutils"> - <jsp:directive.tag description="Renders the audio or video player" pageEncoding="UTF-8"/> - <jsp:directive.attribute name="item" required="true" rtexprvalue="true" type="java.lang.Object" description="media uuid or media content node "/> - <jsp:directive.attribute name="player" required="true" rtexprvalue="true" type="java.lang.String" description="the swf file of the player (examples: player.swf (default), jwplayer4, jwplayer5, jwplayer5/player.swf, /.resources/media/players/jwplayer5/player.swf)"/> - <jsp:directive.attribute name="width" required="false" rtexprvalue="true" type="java.lang.Integer" description="image or player width"/> - <jsp:directive.attribute name="height" required="false" rtexprvalue="true" type="java.lang.Integer" description="image or player height"/> - <jsp:directive.attribute name="ignoreDim" required="false" rtexprvalue="true" type="java.lang.Boolean" description="if true the img element will be rendered without width and height attributes "/> - <jsp:directive.attribute name="autoPlay" required="false" rtexprvalue="true" type="java.lang.Boolean" description="auto starts the player without waiting for user play command"/> - <jsp:directive.attribute name="loop" required="false" rtexprvalue="true" type="java.lang.Boolean" description="loop video or audio"/> - <jsp:directive.attribute name="noPlayIcon" required="false" rtexprvalue="true" type="java.lang.Boolean" description="hide player icons"/> - <jsp:directive.attribute name="skin" required="false" rtexprvalue="true" description="set player skin"/> - <jsp:directive.attribute name="thumbnail" required="false" rtexprvalue="true" type="java.lang.Boolean" description="if set to true the preview of the player shows the thumbnail image"/> - <jsp:directive.attribute name="controlBar" required="false" rtexprvalue="true" type="java.lang.String" description="defines controlbar position. Possible values are: 'none' (for hiding), 'over', 'bottom', 'top'. If not set, this value will be 'bottom' by default."/> - <jsp:directive.attribute name="share" required="false" rtexprvalue="true" type="java.lang.Boolean" description="if set to true the pluging share-1 is showen"/> - + <jsp:directive.tag description="Renders the audio or video player" pageEncoding="UTF-8" /> + <jsp:directive.attribute name="item" required="true" rtexprvalue="true" type="java.lang.Object" + description="media uuid or media content node " /> + <jsp:directive.attribute name="player" required="true" rtexprvalue="true" type="java.lang.String" + description="the swf file of the player (examples: player.swf (default), jwplayer4, jwplayer5, jwplayer5/player.swf, /.resources/media/players/jwplayer5/player.swf)" /> + <jsp:directive.attribute name="width" required="false" rtexprvalue="true" type="java.lang.Integer" + description="image or player width" /> + <jsp:directive.attribute name="height" required="false" rtexprvalue="true" type="java.lang.Integer" + description="image or player height" /> + <jsp:directive.attribute name="ignoreDim" required="false" rtexprvalue="true" type="java.lang.Boolean" + description="if true the img element will be rendered without width and height attributes " /> + <jsp:directive.attribute name="autoPlay" required="false" rtexprvalue="true" type="java.lang.Boolean" + description="auto starts the player without waiting for user play command" /> + <jsp:directive.attribute name="loop" required="false" rtexprvalue="true" type="java.lang.Boolean" + description="loop video or audio" /> + <jsp:directive.attribute name="noPlayIcon" required="false" rtexprvalue="true" type="java.lang.Boolean" + description="hide player icons" /> + <jsp:directive.attribute name="skin" required="false" rtexprvalue="true" description="set player skin" /> + <jsp:directive.attribute name="thumbnail" required="false" rtexprvalue="true" type="java.lang.Boolean" + description="if set to true the preview of the player shows the thumbnail image" /> + <jsp:directive.attribute name="controlbar" required="false" rtexprvalue="true" type="java.lang.String" + description="defines controlbar position. Possible values are: 'none' (for hiding), 'over', 'bottom', 'top'. If not set, this value will be 'bottom' by default." /> + <jsp:directive.attribute name="share" required="false" rtexprvalue="true" type="java.lang.Boolean" + description="if set to true the pluging share-1 is showen" /> <c:set value="${media:node(item)}" var="mediaNode" /> + <c:if test="${empty controlbar}"> + <c:set var="controlbar" value="bottom" /> + </c:if> <c:set var="baseUrl" scope="request"> <jsp:text>${pageContext.request.scheme}://${pageContext.request.serverName}</jsp:text> <c:if test="${(pageContext.request.scheme eq 'http' and pageContext.request.serverPort != 80)}">:${pageContext.request.serverPort}</c:if> </c:set> <c:set var="url" value="${media:url(mediaNode)}" /> <c:if test="${width eq 0 }"> + <c:set var="width" value="${media:width(mediaNode)}" /> + </c:if> + <c:if test="${height eq 0}"> + <c:set var="height" value="${media:height(mediaNode)}" /> + <c:if test="${(controlbar eq 'bottom' or controlbar eq 'top') and height gt 20}"> + <!-- the control bar adds 20px --> + <c:set var="height" value="${height + 20}" /> + </c:if> + </c:if> + <c:if test="${width eq 0 }"> <c:set var="width" value="320" /> </c:if> <c:if test="${height eq 0}"> - <c:set var="height" value="${media.type eq 'video' ? 240 : 20}" /> + <c:set var="height" value="${media.type eq 'audio' ? 20 : 240}" /> </c:if> + <c:set var="previewwidth" value="${width}" /> + <c:set var="previewheight" value="${height}" /> + <c:if test="${previewheight gt 20 and (controlbar eq 'bottom' or controlbar eq 'top')}"> + <c:set var="previewheight" value="${previewheight - 20}" /> + </c:if> <c:if test="${!empty(url)}"> - <c:if - test="${su:endsWith(fn:toLowerCase(url), '.flv') or su:endsWith(fn:toLowerCase(url), '.mp3')}"> + <c:if test="${su:endsWith(fn:toLowerCase(url), '.flv') or su:endsWith(fn:toLowerCase(url), '.mp3')}"> <c:set var="flashvars"> - <![CDATA[file=${pageContext.request.contextPath}${url}${controlBar}]]> + <![CDATA[file=${pageContext.request.contextPath}${url}]]> + <c:if test="${!empty controlbar}"> + <![CDATA[&controlbar=${controlbar}]]> + </c:if> <c:if test="${autoPlay}"> <![CDATA[&autostart=true]]> </c:if> @@ -47,8 +77,8 @@ </c:if> <c:if test="${thumbnail}"> <c:choose> - <c:when test="${width gt 0 and height gt 0}"> - <c:set var="previewres" value="${width}x${height}" /> + <c:when test="${previewwidth gt 0 and previewheight gt 0}"> + <c:set var="previewres" value="${previewwidth}x${previewheight}" /> <![CDATA[&image=${pageContext.request.contextPath}${media:urlres(mediaNode, previewres)}]]> </c:when> <c:otherwise> @@ -60,18 +90,18 @@ <c:set var="sharinglink">${baseUrl}${pageContext.request.contextPath}${actpage.handle}.html</c:set> <c:set var="sharingcode"> <embed src="${baseUrl}${pageContext.request.contextPath}/.resources/media/players/player.swf" - flashvars="file=${baseUrl}${pageContext.request.contextPath}${url}" - width="${width}" height="${height}" /> + flashvars="file=${baseUrl}${pageContext.request.contextPath}${url}" width="${width}" height="${height}" /> </c:set> <![CDATA[&plugins=sharing-1]]> <![CDATA[&sharing.link=${sharinglink}]]> <![CDATA[&sharing.code=${fn:escapeXml(sharingcode)}]]> </c:if> </c:set> - <media:swfobject player="${player}" width="${width}" height="${height}" allowfullscreen="true" allowscriptaccess="always" wmode="opaque" flashvars="${flashvars}" /> + <media:swfobject player="${player}" width="${width}" height="${height}" allowfullscreen="true" + allowscriptaccess="always" wmode="opaque" flashvars="${flashvars}" /> </c:if> <c:if test="${su:endsWith(fn:toLowerCase(url), 'swf')}"> <media:swfobject player="${pageContext.request.contextPath}${url}" width="${width}" height="${height}" /> </c:if> </c:if> -</jsp:root> +</jsp:root> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fg...@us...> - 2010-05-09 11:44:30
|
Revision: 2365 http://openutils.svn.sourceforge.net/openutils/?rev=2365&view=rev Author: fgiust Date: 2010-05-09 11:44:24 +0000 (Sun, 09 May 2010) Log Message: ----------- MEDIA-113 check for empty width/height properties in player tag Modified Paths: -------------- trunk/openutils-mgnlmedia/src/main/resources/META-INF/tags/media/media.tag trunk/openutils-mgnlmedia/src/main/resources/META-INF/tags/media/player.tag Modified: trunk/openutils-mgnlmedia/src/main/resources/META-INF/tags/media/media.tag =================================================================== --- trunk/openutils-mgnlmedia/src/main/resources/META-INF/tags/media/media.tag 2010-05-09 11:34:58 UTC (rev 2364) +++ trunk/openutils-mgnlmedia/src/main/resources/META-INF/tags/media/media.tag 2010-05-09 11:44:24 UTC (rev 2365) @@ -48,13 +48,13 @@ </c:if> <c:set value="${10000}" var="bigValue" /> <c:if test="${empty width }"> - <c:set var="width" value="${0 }" /> + <c:set var="width" value="${0}" /> </c:if> <c:if test="${empty height }"> - <c:set var="height" value="${0 }" /> + <c:set var="height" value="${0}" /> </c:if> <c:if test="${empty emRatio }"> - <c:set var="emRatio" value="${1.0 }" /> + <c:set var="emRatio" value="${1.0}" /> </c:if> <c:if test="${empty player}"> <c:set var="mediamodule" value="${media:module()}"/> Modified: trunk/openutils-mgnlmedia/src/main/resources/META-INF/tags/media/player.tag =================================================================== --- trunk/openutils-mgnlmedia/src/main/resources/META-INF/tags/media/player.tag 2010-05-09 11:34:58 UTC (rev 2364) +++ trunk/openutils-mgnlmedia/src/main/resources/META-INF/tags/media/player.tag 2010-05-09 11:44:24 UTC (rev 2365) @@ -41,20 +41,20 @@ <c:if test="${(pageContext.request.scheme eq 'http' and pageContext.request.serverPort != 80)}">:${pageContext.request.serverPort}</c:if> <jsp:text>${pageContext.request.contextPath}</jsp:text> </c:set> - <c:if test="${width eq 0 }"> + <c:if test="${empty width or width eq 0 }"> <c:set var="width" value="${media:width(mediaNode)}" /> </c:if> - <c:if test="${height eq 0}"> + <c:if test="${empty height or height eq 0}"> <c:set var="height" value="${media:height(mediaNode)}" /> <c:if test="${(controlbar eq 'bottom' or controlbar eq 'top') and height gt 20}"> <!-- the control bar adds 20px --> <c:set var="height" value="${height + 20}" /> </c:if> </c:if> - <c:if test="${width eq 0 }"> + <c:if test="${empty width or width eq 0 }"> <c:set var="width" value="320" /> </c:if> - <c:if test="${height eq 0}"> + <c:if test="${empty height or height eq 0}"> <c:set var="height" value="${media.type eq 'audio' ? 20 : 240}" /> </c:if> <c:set var="previewwidth" value="${width}" /> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fg...@us...> - 2011-08-20 15:50:31
|
Revision: 3620 http://openutils.svn.sourceforge.net/openutils/?rev=3620&view=rev Author: fgiust Date: 2011-08-20 15:50:25 +0000 (Sat, 20 Aug 2011) Log Message: ----------- MEDIA-250 Add support for jwplayer analytics plugin Modified Paths: -------------- trunk/openutils-mgnlmedia/src/main/resources/META-INF/tags/media/media.tag trunk/openutils-mgnlmedia/src/main/resources/META-INF/tags/media/player-jwplayer5.tag trunk/openutils-mgnlmedia/src/main/resources/META-INF/tags/media/player.tag Modified: trunk/openutils-mgnlmedia/src/main/resources/META-INF/tags/media/media.tag =================================================================== --- trunk/openutils-mgnlmedia/src/main/resources/META-INF/tags/media/media.tag 2011-08-20 15:47:51 UTC (rev 3619) +++ trunk/openutils-mgnlmedia/src/main/resources/META-INF/tags/media/media.tag 2011-08-20 15:50:25 UTC (rev 3620) @@ -31,7 +31,8 @@ <jsp:directive.attribute name="thumbnail" required="false" rtexprvalue="true" type="java.lang.Boolean" description="if set to true the preview of the player shows the thumbnail image"/> <jsp:directive.attribute name="videoImagePreview" required="false" rtexprvalue="true" type="java.lang.Boolean" description="if set to true, the tag will not insert the player for videos but only a preview image. For videos or mp3s it needs the following scripts loaded in page: <ul><li>.resources/media/js/mootools-1.2-core.js</li><li>.resources/media/js/mootools-1.2-more.js</li><li>.resources/media/js/mootools-1.2-swfobject.js</li></ul>"/> <jsp:directive.attribute name="controlbar" required="false" rtexprvalue="true" type="java.lang.String" description="defines controlbar position. Possible values are: 'none' (for hiding), 'over', 'bottom', 'top'. If not set, this value will be 'bottom' by default." /> - <jsp:directive.attribute name="share" required="false" rtexprvalue="true" type="java.lang.Boolean" description="if set to true the pluging share-1 is show"/> + <jsp:directive.attribute name="share" required="false" rtexprvalue="true" type="java.lang.Boolean" description="Adds the share features to the player (only supported for jwplayer 4/5)" /> + <jsp:directive.attribute name="analytics" required="false" rtexprvalue="true" type="java.lang.Boolean" description="Track views using google analytics (only supported for jwplayer 5)" /> <jsp:directive.attribute name="crop" required="false" rtexprvalue="true" type="java.lang.Boolean" description="if true, the zoom and crop mode is enabled on the media. The cropProperty attribute is mandatory"/> <jsp:directive.attribute name="cropProperty" required="false" rtexprvalue="true" type="java.lang.String" description="the name of the property where (with '_pzc' suffix) zoom and crop informations are saved "/> <jsp:directive.attribute name="cropJs" required="false" rtexprvalue="true" type="java.lang.Boolean" description="whether to load crop js files. Defaults to true. If false you have to manually include jquery, jquery ui and (before closing body tag) /.resources/media/js/crop/crop.js" /> @@ -167,7 +168,8 @@ thumbnail="${thumbnail}" noPlayIcon="${noPlayIcon}" controlbar="${controlbar}" - skin="${skin}"/> + skin="${skin}" + analytics="${analytics}" /> </c:otherwise> </c:choose> Modified: trunk/openutils-mgnlmedia/src/main/resources/META-INF/tags/media/player-jwplayer5.tag =================================================================== --- trunk/openutils-mgnlmedia/src/main/resources/META-INF/tags/media/player-jwplayer5.tag 2011-08-20 15:47:51 UTC (rev 3619) +++ trunk/openutils-mgnlmedia/src/main/resources/META-INF/tags/media/player-jwplayer5.tag 2011-08-20 15:50:25 UTC (rev 3620) @@ -27,13 +27,14 @@ <jsp:directive.attribute name="controlbar" required="false" rtexprvalue="true" type="java.lang.String" description="defines controlbar position. Possible values are: 'none' (for hiding), 'over', 'bottom', 'top'. If not set, this value will be 'bottom' by default." /> <jsp:directive.attribute name="share" required="false" rtexprvalue="true" type="java.lang.Boolean" - description="Adds the share features to the player (copy page url and embed code)" /> + description="Adds the share features to the player (only supported for jwplayer 4/5)" /> + <jsp:directive.attribute name="analytics" required="false" rtexprvalue="true" type="java.lang.Boolean" + description="Track views using google analytics (only supported for jwplayer 5)" /> <c:if test="${empty requestScope['mgnlmedia_jwplayer5_link_drawn']}"> <script type="text/javascript" src="${pageContext.request.contextPath}/.resources/media/players/jwplayer5/jwplayer.js"><!-- --> </script> <c:set var="mgnlmedia_jwplayer5_link_drawn" scope="request" value="true" /> </c:if> - <c:set var="previewId" value="preview-${su:randomAlphanumeric(6)}" /> <div id="${previewId}" class="preview"><!-- --> </div> @@ -49,16 +50,22 @@ ]]> <c:if test="${not empty skin}">skin:"${skin}",</c:if> <c:if test="${thumbnail and !empty preview}"> image:"${preview}",</c:if> + <jsp:text>'plugins': {</jsp:text> + <c:if test="${analytics}"> 'gapro-2': {},</c:if> <c:if test="${share}"> <c:set var="sharinglink">${baseUrl}${actpage.handle}.html</c:set> <c:set var="sharingcode"> <embed src="${playerPath}" flashvars="file=${fn:contains(url, '://')? '' : baseUrl}${url}" width="${width}" height="${height}" /> </c:set> - <![CDATA[plugins: "sharing-2",']]> - <![CDATA[sharing.link: "${sharinglink}",]]> - <![CDATA[sharing.code: "${fn:escapeXml(sharingcode)",}]]> + <![CDATA[ + 'sharing-3': { + link: "${sharinglink}", + code: '${sharingcode}' + }, + ]]> </c:if> + <jsp:text>},</jsp:text> <c:choose> <c:when test="${fn:startsWith(url, 'rtmp:') or fn:startsWith(url, 'rtmpt:')}"> <c:set var="file" value="${fn:split(url, '/')}" /> Modified: trunk/openutils-mgnlmedia/src/main/resources/META-INF/tags/media/player.tag =================================================================== --- trunk/openutils-mgnlmedia/src/main/resources/META-INF/tags/media/player.tag 2011-08-20 15:47:51 UTC (rev 3619) +++ trunk/openutils-mgnlmedia/src/main/resources/META-INF/tags/media/player.tag 2011-08-20 15:50:25 UTC (rev 3620) @@ -29,7 +29,9 @@ <jsp:directive.attribute name="controlbar" required="false" rtexprvalue="true" type="java.lang.String" description="defines controlbar position. Possible values are: 'none' (for hiding), 'over', 'bottom', 'top'. If not set, this value will be 'bottom' by default." /> <jsp:directive.attribute name="share" required="false" rtexprvalue="true" type="java.lang.Boolean" - description="Adds the share features to the player (copy page url and embed code)" /> + description="Adds the share features to the player (only supported for jwplayer 4/5)" /> + <jsp:directive.attribute name="analytics" required="false" rtexprvalue="true" type="java.lang.Boolean" + description="Track views using google analytics (only supported for jwplayer 5)" /> <!-- end attributes --> <c:set value="${media:node(item)}" var="mediaNode" /> <c:if test="${empty controlbar}"> @@ -78,7 +80,7 @@ <c:when test="${player eq 'jwplayer5' or player eq 'jwplayer'}"> <media:player-jwplayer5 url="${url}" preview="${preview}" share="${share}" item="${item}" width="${width}" height="${height}" autoPlay="${autoPlay}" loop="${loop}" thumbnail="${thumbnail}" - noPlayIcon="${noPlayIcon}" controlbar="${controlbar}" skin="${skin}" /> + noPlayIcon="${noPlayIcon}" controlbar="${controlbar}" skin="${skin}" analytics="${analytics}"/> </c:when> <c:otherwise> <c:choose> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fg...@us...> - 2011-11-20 20:39:21
|
Revision: 3705 http://openutils.svn.sourceforge.net/openutils/?rev=3705&view=rev Author: fgiust Date: 2011-11-20 20:39:15 +0000 (Sun, 20 Nov 2011) Log Message: ----------- MEDIA-274 handling of size and preview image Modified Paths: -------------- trunk/openutils-mgnlmedia/src/main/resources/META-INF/tags/media/media.tag trunk/openutils-mgnlmedia/src/main/resources/META-INF/tags/media/swfobject.tag Modified: trunk/openutils-mgnlmedia/src/main/resources/META-INF/tags/media/media.tag =================================================================== --- trunk/openutils-mgnlmedia/src/main/resources/META-INF/tags/media/media.tag 2011-11-20 20:21:47 UTC (rev 3704) +++ trunk/openutils-mgnlmedia/src/main/resources/META-INF/tags/media/media.tag 2011-11-20 20:39:15 UTC (rev 3705) @@ -185,8 +185,28 @@ <c:if test="${!(height gt 0)}"> <c:set var="height" value="${media:height(mediaNode)}" /> </c:if> - - <media:swfobject player="${pageContext.request.contextPath}${media:url(mediaNode)}" width="${width gt 0 ? width : ''}" height="${height gt 0? height : ''}" image="${thumbnail}"/> + + <c:choose> + <c:when test="${width gt 0 and height gt 0}"> + <c:set var="previewres" value="${width}x${height}" /> + <c:set var="preview" value="${media:urlres(mediaNode, previewres)}" /> + </c:when> + <c:otherwise> + <c:set var="preview" value="${media:thumbnail(mediaNode)}" /> + </c:otherwise> + </c:choose> + + <c:if test="${!empty preview}"> + <c:set var="preview" value="${pageContext.request.contextPath}${preview}" /> + </c:if> + + <media:swfobject + player="${pageContext.request.contextPath}${media:url(mediaNode)}" + width="${width gt 0 ? width : ''}" + height="${height gt 0? height : ''}" + image="${preview}" + title="${mediaNode.title}" + /> </c:when> </c:choose> Modified: trunk/openutils-mgnlmedia/src/main/resources/META-INF/tags/media/swfobject.tag =================================================================== --- trunk/openutils-mgnlmedia/src/main/resources/META-INF/tags/media/swfobject.tag 2011-11-20 20:21:47 UTC (rev 3704) +++ trunk/openutils-mgnlmedia/src/main/resources/META-INF/tags/media/swfobject.tag 2011-11-20 20:39:15 UTC (rev 3705) @@ -7,6 +7,7 @@ <jsp:directive.attribute name="width" required="false" rtexprvalue="true" type="java.lang.Integer" description="flash content width" /> <jsp:directive.attribute name="height" required="false" rtexprvalue="true" type="java.lang.Integer" description="flash content height" /> <jsp:directive.attribute name="image" required="false" rtexprvalue="true" description="replacement image" /> + <jsp:directive.attribute name="title" required="false" rtexprvalue="true" description="title/alt" /> <jsp:directive.tag dynamic-attributes="attrs" /> <!-- end attributes --> @@ -14,6 +15,9 @@ <c:set var="debug" value="${false}"/><!-- set to true to print out the generated javascript on page --> <c:set var="previewId" value="preview-${su:randomAlphanumeric(6)}" /> <div id="${previewId}" class="preview"><!-- --> + <c:if test="${!empty image}"> + <img src="${image}" width="${width}" height="${height}" alt="${title}" /> + </c:if> </div> <c:if test="${empty requestScope['mgnlmedia_swfobject_link_drawn']}"> <script type="text/javascript" src="${pageContext.request.contextPath}/.resources/media/js/swfobject.js"><!-- --> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |