01-14-2011 05:03 PM
I would like to display the total number of videos available in a playlist. I'm looking for something like {videoList.length}.
Here's a snippet. The label is to appear above the playlist:
<Canvas height ="27" width="260">
<Label text="{videoList.length}" height="25" multiline="false" truncate="true"/>
</Canvas>
<List id="videoList" width="260" rowHeight="54" automaticAdvance="true" data="{playlistTabs.selectedItem.videoDTOs}" selectOnClick="true" itemInsetV="4" itemLeading="2">
...
Any suggestions?
01-14-2011 05:34 PM
Hi Greg,
Does
<Label text="{playlistTabs.selectedItem.videoDTOs.length}" height="25" multiline="false" truncate="true"/>
work for you? (I'm using what the List's data property is being set to in your example.)
Best,
Mel
01-14-2011 06:10 PM
Hello Mel,
Thanks for your quick response. I have made the suggested change, but I still don't see the number of videos (nothing is displayed).
Do you have any other suggestions?
Regards,
Greg
01-14-2011 06:21 PM
Hi Greg,
That's odd -- it worked in my smoke test. Would you mind posting your full BEML?
Thanks,
Mel
01-14-2011 06:32 PM
Mel, sure thing, here it is:
<Runtime>
<Theme name="Deluxe" style="Light">
<Style id="default"><![CDATA[.titleText {fontSize: 12;}.bodyText {fontSize: 10;}.linkText {fontSize: 10;}]]></Style>
</Theme>
<Layout id="application" boxType="vbox" padding="8" gutter="4">
<HBox gutter="4" width="630">
<ChromelessVideoPlayer width="370" id="videoPlayer" useOverlayMenu="false" video="{videoList.selectedItem}">
</ChromelessVideoPlayer>
<VBox>
<Canvas height ="27" width="260" style="background-color:#428385">
<Label text="{playlistTabs.selectedItem.videoDTOs.length} " y="4" x="9" size="12" style="bodyText:#ffffff;bodyText-selected:#ffffff; bodyText-active:#ffffff;bodyText-rollover:#ffffff" height="25" multiline="false" truncate="true"/>
</Canvas>
<List style="background-color:#FF0000" showBack="false" id="videoList" width="260" rowHeight="54" automaticAdvance="true" data="{playlistTabs.selectedItem.videoDTOs}" selectOnClick="true" itemInsetV="4" itemLeading="2">
<ListItem showBack="false" boxType="hbox">
<Spacer width="8"/>
<VBox width="64" height="44" vAlign="middle">
<ThumbnailButton height="50" data="{currentItem}" source="{currentItem.thumbnailURL}"/>
</VBox>
<Spacer width="7"/>
<VBox>
<Spacer height="4"/>
<TitleLabel height="16" text="{currentItem.displayName}" multiline="true"/>
<Label height="52" multiline="true" text="{currentItem.shortDescription}" truncate="true"/>
</VBox>
<Spacer width="3"/>
</ListItem>
</List>
</VBox>
</HBox>
</Layout>
</Runtime>
01-14-2011 07:29 PM
Ah, I was thrown off by this:
<List style="background-color:#FF0000" showBack="false" id="videoList" width="260" rowHeight="54" automaticAdvance="true" data="{playlistTabs.selectedItem.videoDTOs}" selectOnClick="true" itemInsetV="4" itemLeading="2">
This implies that the videoList is getting its data from the playlistTabs. (My suggestion worked for me because the playlistTabs.selectedItem property is bindable in the BEML, this article has more information on data binding in player templates.) I'm guessing you want a single playlist player, right? In that case, you wouldn't want to use playlistTabs.selectedItem.videoDTOs for your data videoList.data property (and so you can't access playlistTabs.selectedItem, unfortunately).
Is using the Actionscript or Javascript APIs a possibility for you?
Mel
01-14-2011 09:31 PM
Mel,
You're correct, we want a single playlist player. I will take a look at the Actionscript API. Initially, we were hoping to do our players as Smart Players that would automatically swap in the HTML5 version on iPad. For that reason, I was hoping to stick to BEML. But even the customizations we're currently looking at (custom icons for the player buttons, for instance) don't appear to be supported in HTML5, so we'll probably need to create different versions anyway (one for Flash, one for HTML5).
If we go that route, then we might as well take advantage of Actionscript, and custom components, so that we can get things the way we want them.
Thanks so much for your assistance.
Regards,
Greg
Brightcove Inc., a leading global provider of cloud content services, provides a family of products used to publish and distribute the world's professional digital media. The company's products include Brightcove Video Cloud, the market-leading online video platform, and Brightcove App Cloud, the pioneering content app platform. Together, more than 4,200 customers in 50 countries rely on Brightcove's cloud content services to build and operate exceptional media experiences across PCs, smartphones, tablets and connected TVs.
Brightcove Inc.
© 2012 Brightcove Inc.
