Forum for discussing general topics related to Couch.
4 posts Page 1 of 1
ok i have downloaded and confiqured projekktor media player to work with couch. what i need help with is how to show the player and the playlist<listview> on the same page.

right now i am using a list view like the blog list on your tutorial to show the playlist and episodes. is there a way to show the list view on the same page as the player?

the following is my 2 pages so you can see how i have it set up.

############################################################
<?php require_once( 'cms/cms.php' ); ?>
<cms:template title='Video' clonable='1' >
<cms:editable
name='ep_name'
label='Episode Name'
desc='Enter name of episode here'
type='text' />

<cms:editable
name='ep_desc'
label='Episode URL'
desc='Enter url of video here'
type='text' />

<cms:editable
name='ep_type'
label='Video Type'
desc='youtube, mp4, flv '
type='text' />

<cms:editable
name='ep_img'
label='Video Poster'
desc='Just a picture to show at beginning of video a generic on is provided if you dont have on ready'
width='480'
type='image' />

<cms:editable
name='ep_remarks'
label='Episode Remarks'
type='textarea' />

<cms:folder name='got' title='Thrones' />
<cms:folder name='eoe' title='Echoes' />

#############################################
<!--just extra margin room-->
</div>
</div>
<div class="c80r">
<div class="subcr">
<cms:if k_page_foldertitle >
<cms:set my_category=k_page_foldertitle />
<cms:else />
</cms:if>

<h3> <cms:show my_category /></h3>


<!-- video player goes here -->
<video id="player_a" class="projekktor" poster="<cms:show ep_img />" title="<cms:show ep_name />" width="480" height="320" controls>

<source src="<cms:show ep_desc />" type="video/<cms:show ep_type />" />

</video>

<script type="text/javascript">
$(document).ready(function() {
projekktor('#player_a'); // instantiation
});
</script>

</div>
</div>
<div class="c25r" role="complementary">
<div class="subcolumns">
<div class="c50l">
<div class="subcr">
<cms:embed 'playlist_sidebar.html' />
</div>
</div>
<div class="c50r">
<div class="subcr">
<!--<cms:embed 'episode_sidebar.html' />-->
</div>
</div>
</div>
<div class="subc">
<div class="info">

<h3><cms:show ep_name /></h3>

<cms:show ep_remarks />

</div>
</div>


#########################################
above is my editable regions and my player set up to use those regions .

what i want is to put the list view where playlist_sidebar isbut i cant get it to work, for me. so i am using a seperate list view page as follows.


<div class="c75l" role="main">
<cms:pages masterpage='video.php' folder=k_folder_name start_on=k_archive_date stop_before=k_next_archive_date paginate='1' limit='10' >
<div class="subcl">
<h3><a href="<cms:show k_page_link />"><cms:show k_page_title /> </a> </h3>
<cms:if k_page_foldertitle >
<cms:set my_category=k_page_foldertitle />
<cms:else />
<cms:set my_category='Uncategorized' />
</cms:if>
<p><a href="#"><cms:show my_category /></a> &bull; <cms:date k_page_date format='jS M, y'/> </p>
<cms:excerptHTML count='75' ignore='img'><big><cms:show ep_remarks /></big></cms:excerptHTML>
<p><a href="<cms:show k_page_link />" class="noprint">more ...</a> </p>
</div>
<cms:if k_paginated_bottom >
<!-- blog nav##############################################-->
<div class="c66l">
<div class="c50l">
<cms:if k_paginate_link_next >
<a href="<cms:show k_paginate_link_next />""class="float_left"> <big>Previous Posts</big></a>
</cms:if>
</div>
<div class="c50r">
<cms:if k_paginate_link_prev >
<a href="<cms:show k_paginate_link_prev />" "class="float_right"><big>Newer Posts</big></a>
</cms:if>
</div>
</div>
</cms:if>
</cms:pages >
</div>
<!--########################################################################sidebar area#############################-->

it works fine this way i would just like to beable to show the player and the playlist on the same page with out having to go back to the list page every time i want to view a different page.

I also know that this would be simpler just to use the player and a xml playlist but i am trying to make this for a person to use in the cms with out alot of coding having to be done on their part.

thank you.........tim
Hi,

Why don't you list the videos in the sidebar of the page view?
I see that you are embedding 'playlist_sidebar.html' in the sidebar -
Code: Select all
<cms:embed 'playlist_sidebar.html' />

- so we can place the listing code within this 'playlist_sidebar.html' -
Code: Select all
<ul>
<cms:pages masterpage='video.php' limit='10' >
   <li><a href="<cms:show k_page_link />"><cms:show k_page_title /> </a> </li>
</cms:pages >
</ul>

This will list the latest 10 videos in the sidebar. You can also use pagination, but, I think, pagination in the sidebar will be confusing.

The second method could be-
Show the player on top of the page and list (via pages tag) the videos below it.
On each item of the list, create a JavaScript link that changes the source of the video player to this item (player.setItem is the call, if I am not wrong).

Please let me know if this helps
yes that worked, infact i had the same idea to begin with but apparrently i didnt refresh my page while cms was open, always forget that . anyway here is the finished snippet i used.

<div class="c90r">
<div id="cat">
<div id="cat_content">
<h3>Playlist's </h3>
<ul>
<cms:folders masterpage='video.php' limit='1' paginate='1' >

<li><a href="<cms:show k_folder_link />"><big><cms:show k_folder_title /></big></a></li>



</cms:folders>

</ul>

<!--<ul>
<cms:pages masterpage='video.php' limit='10' >
<li><a href="<cms:show k_page_link />"><cms:show k_page_title /> </a> </li>
</cms:pages >
</ul>-->
</div>
</div>



</div>


</div>
</div>
<div class="c50r">
<div class="subcr">

<h3>Episodes</h3>
<ul>


<cms:if k_is_folder >

<cms:pages masterpage='video.php' folder=k_folder_name limit='15' >

<li><a href="<cms:show k_page_link />"><cms:show k_page_title /> </a> </li>


</cms:pages >
</cms:if>
</ul>



I have the paginate because i was wondering if you could paginate folders but i couldnt get it to work, any way thanks for the help.
Hi,

'folders' tag doesn't support pagination - only 'pages', 'comments' and 'search' tags do.
4 posts Page 1 of 1

Who is online

In total there are 3 users online :: 0 registered, 0 hidden and 3 guests
(based on users active over the past 5 minutes)

Users browsing this forum: No registered users and 3 guests