Basic video plugin - I'm stuck

I’m trying to create a basic video plugin with only static content.



Would anyone be so kind as to help me with the code needed to just list a simple videoitem in the root menu?



I’ve mocked around for hours, and I just can’t get my head around what pathNouns are. I’ve looked at all the plugins I have installed, but I still can’t get it sorted.



Just a simple function that gives me one item to click at. I’ve got the site configs more or less sorted, the UI is the issue now.



Pretty please…?

Hey opet, happy to help. Not exactly sure what you mean by “static content”.



def HandleVideosRequest(pathNouns, count):<br />
  dir = MediaContainer("art-default.jpg", None, "Demo")<br />
  <br />
  # Top level menu.<br />
  if count == 0:<br />
	dir.AppendItem(VideoItem('http://path/to/file', 'Title', None, '', '')) # Playable video<br />
	dir.AppendItem(WebVideoItem('http://path/to/web/page', 'Title2', None, '', '')) # For use with site configs<br />
<br />
  return dir.ToXML()



Let me know if you need any more pointers.


I have a related question to this. Can the url for videoItem be a path to a file on disk somewhere?

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.