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. |