Quantcast
Viewing all articles
Browse latest Browse all 2540

New Post: XSLT: MediaFile passing to JWPlayer

Hello Napernik,

it appears to me, that I am doing something wrong in my XSLT-Function. I think this, because it is not rendered by PageRenderer as you pointed out above. This is my function as it currently looks:

<xsl:stylesheetversion="1.0"xmlns:xsl="http://www.w3.org/1999/XSL/Transform"xmlns:in="http://www.composite.net/ns/transformation/input/1.0"xmlns:lang="http://www.composite.net/ns/localization/1.0"xmlns:f="http://www.composite.net/ns/function/1.0"xmlns="http://www.w3.org/1999/xhtml"exclude-result-prefixes="xsl in lang f"><xsl:variablename="titleimage"select="/in:inputs/in:param[@name='TitleImage']"/><xsl:variablename="video"select="/in:inputs/in:param[@name='Video']"/><xsl:paramname="videofile"select="/in:inputs/in:result[@name='GetIMediaFileXml']/IMediaFile"/><xsl:paramname="imagefile"select="/in:inputs/in:result[@name='GetIImageFileXml']/IImageFile"/><xsl:templatematch="/"><html><head><scriptsrc="/Frontend/Skins/RB1/Media/JWPlayer/jwplayer.js"type="text/javascript"></script><scripttype="text/javascript">jwplayer.key="gPhBL4FBjW1w/9b6b8LBAhQSUcQJ5g0hpoGohA==";</script></head><body><divid="Rotator">Loading...</div><scripttype="text/javascript">
          jwplayer("Rotator").setup({
          title: "2013",
		  file: "<xsl:value-ofselect="concat('~media({',$videofile/@CompositePath,'})')"/>",
		  image: "<xsl:value-ofselect="concat('~media({',$imagefile/@CompositePath,'})')"/>",
          height: 300,
          width: 930,
          controls: true,
          stretching: "fill",
          autostart: false,
          mute: false,
          primary: "html5",
          repeat: false

          });
        </script></body></html></xsl:template></xsl:stylesheet>

This is rendered as:

<divid="Rotator">Loading...</div><scripttype="text/javascript">
          jwplayer("Rotator").setup({
          title: "2013",
		  file: "~media({MediaArchive:/Video/NeuJahr.mp4})",
		  image: "~media({MediaArchive:/Video/NeuJahr2.jpg})",
          height: 300,
          width: 930,
          controls: true,
          stretching: "fill",
          autostart: false,
          mute: false,
          primary: "html5",
          repeat: false

          });
        </script>

Using "KeyPath" instead of "CompositePath" will be rendered as:

<scripttype="text/javascript">
          jwplayer("Rotator").setup({
          title: "2013",
		  file: "~media({MediaArchive:266ad17b-d5ca-4f3b-b6e2-8733ebc75102})",
		  image: "~media({MediaArchive:8f5b1fbb-653b-4d8f-9ba1-2f7d165d3e1b})",
          height: 300,
          width: 930,
          controls: true,
          stretching: "fill",
          autostart: false,
          mute: false,
          primary: "html5",
          repeat: false

          });
        </script>

So I think That I make an error in the definition:

<xsl:value-ofselect="concat('~media({',$videofile/@CompositePath,'})')"/>

Thing is - I cannot figure out how to make it right.

Thank you for your patient.

Best to you

Rainer


Viewing all articles
Browse latest Browse all 2540

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>