Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • syn-rg 282 posts 425 karma points
    Jul 01, 2011 @ 07:02
    syn-rg
    0

    More than one video per page?

    How can I more than one video per page?

    Currently I can only get one video to play per page.
    The second video, the "object" isn't being inserted:

    <div class="double_column"><h4>XXXXX</h4>

    <p>&nbsp;</p>

    <a id="ID0ECA" style="display: block; height: 216px; width: 384px;" class="flowplayervideo" href="/media/138936/1.0 brandmark internal animation.flv"><object width="100%" height="100%" type="application/x-shockwave-flash" data="/scripts/flowplayer-3.2.7.swf" id="ID0ECA_api"><param value="true" name="allowfullscreen"><param value="always" name="allowscriptaccess"><param value="high" name="quality"><param value="false" name="cachebusting"><param value="#000000" name="bgcolor"><param value="config={&quot;playerId&quot;:&quot;ID0ECA&quot;,&quot;clip&quot;:{&quot;url&quot;:&quot;/media/138936/1.0 brandmark internal animation.flv&quot;},&quot;playlist&quot;:[{&quot;url&quot;:&quot;/media/138936/1.0 brandmark internal animation.flv&quot;}]}" name="flashvars"></object></a><script type="text/javascript">

    var videoid = "ID0ECA";
    flowplayer(videoid, "/scripts/flowplayer-3.2.7.swf");

    </script>

    <p>&nbsp;</p>

    <p class="horizontal_rule">&nbsp;</p>

    <h4>XXXXXX</h4>

    <p>&nbsp;</p>

    <a id="ID0ECA" style="display: block; height: 216px; width: 384px;" class="flowplayervideo" href="/media/138933/1.0 brandmark highlight animation external.flv"></a><script type="text/javascript">

    var videoid = "ID0ECA";
    flowplayer(videoid, "/scripts/flowplayer-3.2.7.swf");

    </script>

    <p>&nbsp;</p>
    </div>

    Cheers,
    JV

  • aghy 129 posts 308 karma points
    Jul 01, 2011 @ 10:42
    aghy
    0

    Hi JV,

    Just a simple thing you could try first, try changing the id of the second video. For compliant html you shouldn't have more than one id on a page but you can have multiple classes. So if you are using the id for styling then give them both the same class instead. Edit: Just noticed you have a class defined.

    Of course if you change the id of the second a tag you will also need to change the javascript so that it points to that id.

    Ben

  • syn-rg 282 posts 425 karma points
    Jul 04, 2011 @ 04:50
    syn-rg
    0

    Thanks Ben,

    I didn't notice they Id value was the same for both.

    I made the following change:

    Replace:

    <xsl:variable name="videoid" select="generate-id($videonode)"/>

    With:

    <xsl:variable name="videoid" select="$videonode/node/@id"/>

    Cheers,
    JV

  • Eric 2 posts 23 karma points
    Jul 09, 2011 @ 22:42
    Eric
    0

    Tried the following line but for some reason it didn't work.

    <xsl:variable name="videoid" select="$videonode/node/@id"/>

    So I opted to create a new parameter for the macro and add the parameter in the admin site.  It's working just fine now.

    <xsl:variable name="controlId" select="/macro/controlId"/> 

    Set the autoPlay to false in the xslt while I was at it.   It is my first Umbraco project and I can't believe how easy it is to control the output of the HTML (both through the macro for the developer as well as through the content section for the content contributors).  Thanks for sharing this macro with us.  

Please Sign in or register to post replies

Write your reply to:

Draft