[xiph-commits] r3910 - in arkaiv/trunk: . arkaiv/controllers arkaiv/model arkaiv/templates data/templates

dcrowdy at svn.annodex.net dcrowdy at svn.annodex.net
Thu Apr 23 20:24:04 PDT 2009


Author: dcrowdy
Date: 2009-04-23 20:24:03 -0700 (Thu, 23 Apr 2009)
New Revision: 3910

Modified:
   arkaiv/trunk/arkaiv/controllers/page.py
   arkaiv/trunk/arkaiv/controllers/page.pyc
   arkaiv/trunk/arkaiv/model/__init__.pyc
   arkaiv/trunk/arkaiv/templates/displayitem.mak
   arkaiv/trunk/arkaiv/templates/playlistview.mak
   arkaiv/trunk/data/templates/displayitem.mak.py
   arkaiv/trunk/data/templates/displayitem.mak.pyc
   arkaiv/trunk/production.ini
Log:
Correctly play clips where an end point exists


Modified: arkaiv/trunk/arkaiv/controllers/page.py
===================================================================
--- arkaiv/trunk/arkaiv/controllers/page.py	2009-04-20 03:52:46 UTC (rev 3909)
+++ arkaiv/trunk/arkaiv/controllers/page.py	2009-04-24 03:24:03 UTC (rev 3910)
@@ -13,7 +13,6 @@
 import os
 import os.path
 import shutil
-#import annodex
 import logging
 import subprocess
 import sys
@@ -22,10 +21,8 @@
 from arkaiv.controllers import *
 from arkaiv.lib.base import *
 from paste.deploy import CONFIG
-#from authkit.permissions import NotAuthenticatedError
 from pylons import config
 from arkaiv.model.oggzinfo import OggzInfo
-#from arkaiv.model.anxparser import anxParser
 from arkaiv.model.cmmlparser import cmmlParser
 from arkaiv.model.framer import Frame
 
@@ -36,15 +33,10 @@
 
 myhostname = gethostname()
 url_base = "http://" + myhostname + ":5000/"
-#media_url_base = "http://" + myhostname + "/"
-#media_url_base = "http://127.0.0.1/"
 media_url_base = config['media_url_base']
 
 class PageController(BaseController):
 
-#    def index(self):
-#        return 'Hello World'
-
     def serverinfo(self):
         import cgi
         import pprint
@@ -107,7 +99,6 @@
             try:
                 itemid = request.params[str(i)]
                 model.additemtoplaylist(playlist, itemid)
-            #    print clipid
             except:
                 pass
 
@@ -117,12 +108,10 @@
     def addclipstoplaylist(self):
         nclips = int(request.params['numclips'])
         playlist = request.params['playlist']
-        #print playlist
         for i in range(nclips):
             try:
                 clipid = request.params[str(i)]
                 model.addcliptoplaylist(playlist, clipid)
-            #    print clipid
             except:
                 pass
 
@@ -137,47 +126,31 @@
     def displayplaylist(self):
         # Need to extract appropriate info for the playlist selected
         playlistid = int(request.params['id'])
-        print "playlist id is \n\n"
-#        print playlistid
+#        print "playlist id is \n\n"
         c.name = request.params['name']        
         clips = model.getclipsfromplaylist(playlistid)
         items = model.getitemsfromplaylist(playlistid)
         # send a list of dictionaries to the template
-#        c.cliplist = []
         for clip in clips:
             if (clip != None):
-           #     clipdict = {}
                 item = model.getitemforclip(clip['index'])
                 sourceid = model.getsourcesforitem(item.ixi)
                 oggsource = model.getsourcepath(sourceid)
-                #print oggsource
                 cmmlfile = model.getitemcmmlfile(item.ixi)
-                #print cmmlfile
                 urlpath = split(cmmlfile, path_base)
                 # Now split off the extension
                 urlpath = os.path.splitext(urlpath[1])[0]
-                #clipimageurl = media_url_base + os.dirname(urlpath) + "/"
-                #print clipimageurl
-           #     clipdict['id'] = clip.ixc
                 clip['url'] = media_url_base + urlpath + ".anx" + "?id=" + clip['id']
-                #c.cliplist.append(clipdict)
         
         for item in items:
-#            itemdict = {}
             sourceid = model.getsourcesforitem(item['index'])
             oggsource = model.getsourcepath(sourceid)
-            #print oggsource
-#            cmmlfile = model.getitemcmmlfile(item.ixi)
-            #print cmmlfile
             urlpath = split(item['cmmlfile'], path_base)
             # Now split off the extension
             urlpath = os.path.splitext(urlpath[1])[0]
             #clipimageurl = media_url_base + os.path.dirname(urlpath) + "/"
-            #print clipimageurl
             item['id'] = ""    # a dummy to match clip info
-            #itemdict['url'] = media_url_base + urlpath + ".anx" + "?id=0"
             item['url'] = media_url_base + urlpath + ".anx" + "?id=0"
-#            c.cliplist.append(itemdict)
             clips.append(item)
 
         c.clips = clips 
@@ -212,9 +185,6 @@
         except:
             c.playclip = ""
 
-        #if toedit == "yes":
-        #    if not request.environ.has_key('REMOTE_USER'):
-        #         raise NotAuthenticatedError('Not Authenticated')
 
         c.itemid = itemid
         c.itemname = model.getitemname(itemid)
@@ -318,7 +288,10 @@
 
     def addclip(self):
         clip = {}
-        clip['starttime'] = float(request.params['starttime'])
+        if request.params['starttime'] == "":
+            clip['starttime'] = 0
+        else: 
+            clip['starttime'] = float(request.params['starttime'])
         if (not request.params['endtime']):
             print "no value for endtime"
             clip['endtime'] = ""
@@ -421,7 +394,6 @@
         basename = os.path.splitext(newoggname)[0]
         imagedirname = basename + "_clipimages"
         # Create a directory for clip images
-#        print imagedirname
         if not os.path.isdir(imagedirname):
             os.makedirs(imagedirname, mode=0755)
 
@@ -454,7 +426,6 @@
             if o.has_video():
                 # get a still image for the correct frame
                 print "getting a clip image"
-                #clipdict['img_src'] = ""
                 try:
                     # this fails very badly - stopping the web server even, so 
                     # has been disabled for the moment.

Modified: arkaiv/trunk/arkaiv/controllers/page.pyc
===================================================================
(Binary files differ)

Modified: arkaiv/trunk/arkaiv/model/__init__.pyc
===================================================================
(Binary files differ)

Modified: arkaiv/trunk/arkaiv/templates/displayitem.mak
===================================================================
--- arkaiv/trunk/arkaiv/templates/displayitem.mak	2009-04-20 03:52:46 UTC (rev 3909)
+++ arkaiv/trunk/arkaiv/templates/displayitem.mak	2009-04-24 03:24:03 UTC (rev 3910)
@@ -16,23 +16,25 @@
  
 
 %     if c.sourcedict['has_video'] == "Yes":
-<video src='${c.sourcedict['urlpath']}${c.sourcedict['clipdetail']}' controls='controls' width=320 height=240></video>
+<video src='${c.sourcedict['urlpath']}${c.sourcedict['clipdetail']}' controls='controls' ontimeupdate="Vupdatetime()" width=320 height=240></video>
 %     endif
 
 %     if c.sourcedict['has_video'] == "No":
-<audio src='${c.sourcedict['urlpath']}${c.sourcedict['clipdetail']}' controls='controls'></audio>
+<audio src='${c.sourcedict['urlpath']}${c.sourcedict['clipdetail']}' controls='controls' ontimeupdate="Aupdatetime()"></audio>
 %     endif
 
-##<input type=button onclick='AudioClipPlay()' value='Change source'>
 
-
 ##Output area useful for debugging:
 <form name="api">
 <table style="font-size:small">
 <tr>
-<td>Output:</td>
-<td><textarea name="ofield" cols="40" rows="2"></textarea></td>
+<td>Time:</td>
+<td><input name="tfield" cols="10"></textarea></td>
 </tr>
+##<tr>
+##<td>Output:</td>
+##<td><textarea name="ofield" cols="40" rows="2"></textarea></td>
+##</tr>
 </table>
 </form>
 
@@ -153,8 +155,13 @@
 %  endif
 
  %  if c.sourcedict['has_video'] == "No":
+ %    if clipinfo['end_time'] == 0:
    <td><a onclick='AudioClipPlay("${c.sourcedict['urlpath']}?t=${clipinfo['id']}")'><img src="/images/blank.png"></a></td>
+  %   else:
+   <td><a onclick='AudioClipPlay("${c.sourcedict['urlpath']}?t=${clipinfo['id']}/${clipinfo['end_time']}")'><img src="/images/blank.png"></a></td>
+ %     endif
 %  endif
+
     <td>${clipinfo['start_time']}</td>
     <td>${clipinfo['desc']}</td>
     <td>${clipinfo['a_href']}</td>
@@ -206,26 +213,40 @@
 <script>
 
 var output = document.api.ofield;
+var toutput = document.api.tfield;
+var myVideo = document.getElementsByTagName('video')[0];
+var myAudio = document.getElementsByTagName('audio')[0];
 
+v.addEventListener("seeked", function() { document.getElementsByTagName("video")[0].play(); }, true);
+
 function VideoClipPlay(location) {
-  var myVideo = document.getElementsByTagName('video')[0];
   myVideo.src = location
   myVideo.load();
   myVideo.play();
-  addOutput("Video clip");
- 
+  //addOutput("Video clip");
 }
 
 
 function AudioClipPlay(location) {
-  var myAudio = document.getElementsByTagName('audio')[0];
   myAudio.src = location
   myAudio.load();
   myAudio.play();
-  addOutput("Audio clip");
+  //addOutput("Audio clip");
  
 }
 
+function Vupdatetime() {
+  addToutput(myVideo.currentTime);
+}
+
+function Aupdatetime() {
+  addToutput(myAudio.currentTime);
+}
+
+function addToutput(str) {
+  toutput.value = str;
+}
+
 var outLines = 0;
 
 function addOutput(str) {

Modified: arkaiv/trunk/arkaiv/templates/playlistview.mak
===================================================================
--- arkaiv/trunk/arkaiv/templates/playlistview.mak	2009-04-20 03:52:46 UTC (rev 3909)
+++ arkaiv/trunk/arkaiv/templates/playlistview.mak	2009-04-24 03:24:03 UTC (rev 3910)
@@ -12,9 +12,11 @@
 <label for="${clip['id']}">
 <input id="${clip['id']}" type="checkbox" name="list" value="${clip['url']}" checked/>
 ${clip['url']}
+
 </label>
 <br>
 % endfor
+
 </form>
 <embed type="application/liboggplay" src="${c.clips[0]['url']}" width=320 height=240/>
 

Modified: arkaiv/trunk/data/templates/displayitem.mak.py
===================================================================
--- arkaiv/trunk/data/templates/displayitem.mak.py	2009-04-20 03:52:46 UTC (rev 3909)
+++ arkaiv/trunk/data/templates/displayitem.mak.py	2009-04-24 03:24:03 UTC (rev 3910)
@@ -3,7 +3,7 @@
 __M_dict_builtin = dict
 __M_locals_builtin = locals
 _magic_number = 5
-_modified_time = 1240199467.157346
+_modified_time = 1240543335.5623989
 _template_filename='/home/dcrowdy/src/arkaiv/working/trunk/arkaiv/templates/displayitem.mak'
 _template_uri='/displayitem.mak'
 _template_cache=cache.Cache(__name__, _modified_time)
@@ -56,7 +56,7 @@
             __M_writer(u"<video src='")
             __M_writer(unicode(c.sourcedict['urlpath']))
             __M_writer(unicode(c.sourcedict['clipdetail']))
-            __M_writer(u"' controls='controls' width=320 height=240></video>\n")
+            __M_writer(u'\' controls=\'controls\' ontimeupdate="Vupdatetime()" width=320 height=240></video>\n')
         # SOURCE LINE 21
         __M_writer(u'\n')
         # SOURCE LINE 22
@@ -65,128 +65,128 @@
             __M_writer(u"<audio src='")
             __M_writer(unicode(c.sourcedict['urlpath']))
             __M_writer(unicode(c.sourcedict['clipdetail']))
-            __M_writer(u"' controls='controls'></audio>\n")
+            __M_writer(u'\' controls=\'controls\' ontimeupdate="Aupdatetime()"></audio>\n')
         # SOURCE LINE 25
-        __M_writer(u'\n')
-        # SOURCE LINE 27
         __M_writer(u'\n\n')
-        # SOURCE LINE 30
-        __M_writer(u'<form name="api">\n<table style="font-size:small">\n<tr>\n<td>Output:</td>\n<td><textarea name="ofield" cols="40" rows="2"></textarea></td>\n</tr>\n</table>\n</form>\n\n')
-        # SOURCE LINE 40
+        # SOURCE LINE 28
+        __M_writer(u'<form name="api">\n<table style="font-size:small">\n<tr>\n<td>Time:</td>\n<td><input name="tfield" cols="10"></textarea></td>\n</tr>\n')
+        # SOURCE LINE 38
+        __M_writer(u'</table>\n</form>\n\n')
+        # SOURCE LINE 42
         __M_writer(u'<hr>\nHead:\n')
-        # SOURCE LINE 42
+        # SOURCE LINE 44
         __M_writer(unicode( h.form(h.url_for(action='editheadinfo'), multipart=True) ))
         __M_writer(u'\nid:\n')
-        # SOURCE LINE 44
+        # SOURCE LINE 46
         __M_writer(unicode( h.text_field('headid', value=c.headdict['id']) ))
         __M_writer(u'\nTitle:\n')
-        # SOURCE LINE 46
+        # SOURCE LINE 48
         __M_writer(unicode( h.text_field('headtitle', value=c.headdict['title']) ))
         __M_writer(u'\n')
-        # SOURCE LINE 47
+        # SOURCE LINE 49
         __M_writer(unicode( h.hidden_field('itemid', value=c.itemid) ))
         __M_writer(u'\n\n')
-        # SOURCE LINE 49
+        # SOURCE LINE 51
         __M_writer(unicode( h.submit('Edit') ))
         __M_writer(u' \n')
-        # SOURCE LINE 50
+        # SOURCE LINE 52
         __M_writer(unicode( h.end_form() ))
         __M_writer(u' \n<br />\n<hr>\n\nMeta information:<br />\n<table style="font-size:small">\n<tr>\n  <td>Name</td>\n  <td>Content</td>\n</tr>\n')
-        # SOURCE LINE 60
+        # SOURCE LINE 62
         for metainfo in c.metalist:
-            # SOURCE LINE 61
+            # SOURCE LINE 63
             __M_writer(u'<tr>\n<td>\n<p id="editmetaname">')
-            # SOURCE LINE 63
+            # SOURCE LINE 65
             __M_writer(unicode(metainfo['name']))
             __M_writer(u'</p>\n<script type="text/javascript">\n new Ajax.InPlaceEditor(\'editmetaname\', \'/page/editheadmetaname\', { callback: function(form, value) { return \'id=')
-            # SOURCE LINE 65
+            # SOURCE LINE 67
             __M_writer(unicode(metainfo['id']))
             __M_writer(u'&field=name&itemid=')
             __M_writer(unicode(c.itemid))
             __M_writer(u'&myparam=\' + escape(value) }});\n</script>\n</td>\n<td>\n<p id="editmetacontent">')
-            # SOURCE LINE 69
+            # SOURCE LINE 71
             __M_writer(unicode(metainfo['content']))
             __M_writer(u'</p>\n<script type="text/javascript">\n new Ajax.InPlaceEditor(\'editmetacontent\', \'/page/editheadmetaname\', { callback: function(form, value) { return \'id=')
-            # SOURCE LINE 71
+            # SOURCE LINE 73
             __M_writer(unicode(metainfo['id']))
             __M_writer(u'&field=content&itemid=')
             __M_writer(unicode(c.itemid))
             __M_writer(u"&myparam=' + escape(value) }});\n</script>\n</td>\n<td>\n")
-            # SOURCE LINE 75
+            # SOURCE LINE 77
             __M_writer(unicode( h.form(h.url_for(action='deletemeta'), multipart=True) ))
             __M_writer(u'\n')
-            # SOURCE LINE 76
+            # SOURCE LINE 78
             __M_writer(unicode( h.submit('Delete') ))
             __M_writer(u'\n')
-            # SOURCE LINE 77
+            # SOURCE LINE 79
             __M_writer(unicode( h.hidden_field('metaid', value=metainfo['index']) ))
             __M_writer(u'\n')
-            # SOURCE LINE 78
+            # SOURCE LINE 80
             __M_writer(unicode( h.hidden_field('itemid', value=c.itemid) ))
             __M_writer(u'\n')
-            # SOURCE LINE 79
+            # SOURCE LINE 81
             __M_writer(unicode( h.hidden_field('headid', value=c.headdict['index']) ))
             __M_writer(u'\n')
-            # SOURCE LINE 80
+            # SOURCE LINE 82
             __M_writer(unicode( h.end_form() ))
             __M_writer(u' \n\n</td>\n</tr> \n')
-        # SOURCE LINE 85
+        # SOURCE LINE 87
         __M_writer(u'</table>\n<hr>\nAdd new meta tag:\n')
-        # SOURCE LINE 88
+        # SOURCE LINE 90
         __M_writer(unicode( h.form(h.url_for(action='addmetainfo'), multipart=True) ))
         __M_writer(u'\n<table style="font-size:small">\n<tr>\n    <td>Id</td>\n    <td>Name</td>\n    <td>Content</td>\n</tr>\n\n<tr>\n  <td>')
-        # SOURCE LINE 97
+        # SOURCE LINE 99
         __M_writer(unicode( h.text_field('metaid', size=5) ))
         __M_writer(u'</td>\n  <td>')
-        # SOURCE LINE 98
+        # SOURCE LINE 100
         __M_writer(unicode( h.text_field('metaname') ))
         __M_writer(u'</td>\n  <td>')
-        # SOURCE LINE 99
+        # SOURCE LINE 101
         __M_writer(unicode( h.text_field('metacontent') ))
         __M_writer(u'</td>\n</tr>\n</table>\n')
-        # SOURCE LINE 102
+        # SOURCE LINE 104
         __M_writer(unicode( h.hidden_field('metascheme') ))
         __M_writer(u'\n')
-        # SOURCE LINE 103
+        # SOURCE LINE 105
         __M_writer(unicode( h.hidden_field('headindex', value = c.headdict['index']) ))
         __M_writer(u'\n')
-        # SOURCE LINE 104
+        # SOURCE LINE 106
         __M_writer(unicode( h.hidden_field('itemid', value=c.itemid) ))
         __M_writer(u'\n\n')
-        # SOURCE LINE 106
+        # SOURCE LINE 108
         __M_writer(unicode( h.submit('Add') ))
         __M_writer(u' \n')
-        # SOURCE LINE 107
+        # SOURCE LINE 109
         __M_writer(unicode( h.end_form() ))
         __M_writer(u' \n\n<hr>\n\n\n<!--div class="sourceinfo"-->\n<table style="font-size:small">\n<tr>\n<td>Duration:</td><td> ')
-        # SOURCE LINE 115
+        # SOURCE LINE 117
         __M_writer(unicode(c.sourcedict['duration']))
         __M_writer(u'</td>\n</tr>\n<tr>\n<td>Bitrate: </td><td>')
-        # SOURCE LINE 118
+        # SOURCE LINE 120
         __M_writer(unicode(c.sourcedict['bitrate']))
         __M_writer(u'</td>\n</tr>\n<tr>\n<td>Resolution: </td><td>')
-        # SOURCE LINE 121
+        # SOURCE LINE 123
         __M_writer(unicode(c.sourcedict['resolution']))
         __M_writer(u'</td>\n</tr>\n<tr>\n<td>Framerate: </td><td>')
-        # SOURCE LINE 124
+        # SOURCE LINE 126
         __M_writer(unicode(c.sourcedict['framerate']))
         __M_writer(u'</td>\n</tr>\n<tr>\n<td>Audio: </td><td>')
-        # SOURCE LINE 127
+        # SOURCE LINE 129
         __M_writer(unicode(c.sourcedict['audio']))
         __M_writer(u'</td>\n</tr>\n<tr>\n<td>Has video: </td><td>')
-        # SOURCE LINE 130
+        # SOURCE LINE 132
         __M_writer(unicode(c.sourcedict['has_video']))
         __M_writer(u'</td>\n</tr>\n<tr>\n<td>Has audio: </td><td>')
-        # SOURCE LINE 133
+        # SOURCE LINE 135
         __M_writer(unicode(c.sourcedict['has_audio']))
         __M_writer(u'</td>\n</tr>\n</table>\n\n\n\n</div>\n\n<table style="font-size:small">\n<tr>\n  <td></td>\n  <td>Time</td>\n  <td></td>\n  <td></td> \n</tr>\n\n')
-        # SOURCE LINE 149
+        # SOURCE LINE 151
         for clipinfo in c.cliplist:
-            # SOURCE LINE 150
+            # SOURCE LINE 152
             __M_writer(u'<tr>\n')
-            # SOURCE LINE 151
+            # SOURCE LINE 153
             if c.sourcedict['has_video'] == "Yes":
-                # SOURCE LINE 152
+                # SOURCE LINE 154
                 __M_writer(u'   <td><a onclick=\'VideoClipPlay("')
                 __M_writer(unicode(c.sourcedict['urlpath']))
                 __M_writer(u'?t=')
@@ -195,76 +195,89 @@
                 __M_writer(unicode(c.sourcedict['clipimageurl']))
                 __M_writer(unicode(clipinfo['img_src']))
                 __M_writer(u'"></a></td>\n')
-            # SOURCE LINE 154
+            # SOURCE LINE 156
             __M_writer(u'\n')
-            # SOURCE LINE 155
+            # SOURCE LINE 157
             if c.sourcedict['has_video'] == "No":
-                # SOURCE LINE 156
-                __M_writer(u'   <td><a onclick=\'AudioClipPlay("')
-                __M_writer(unicode(c.sourcedict['urlpath']))
-                __M_writer(u'?t=')
-                __M_writer(unicode(clipinfo['id']))
-                __M_writer(u'")\'><img src="/images/blank.png"></a></td>\n')
-            # SOURCE LINE 158
-            __M_writer(u'    <td>')
+                # SOURCE LINE 158
+                if clipinfo['end_time'] == 0:
+                    # SOURCE LINE 159
+                    __M_writer(u'   <td><a onclick=\'AudioClipPlay("')
+                    __M_writer(unicode(c.sourcedict['urlpath']))
+                    __M_writer(u'?t=')
+                    __M_writer(unicode(clipinfo['id']))
+                    __M_writer(u'")\'><img src="/images/blank.png"></a></td>\n')
+                    # SOURCE LINE 160
+                else:
+                    # SOURCE LINE 161
+                    __M_writer(u'   <td><a onclick=\'AudioClipPlay("')
+                    __M_writer(unicode(c.sourcedict['urlpath']))
+                    __M_writer(u'?t=')
+                    __M_writer(unicode(clipinfo['id']))
+                    __M_writer(u'/')
+                    __M_writer(unicode(clipinfo['end_time']))
+                    __M_writer(u'")\'><img src="/images/blank.png"></a></td>\n')
+            # SOURCE LINE 164
+            __M_writer(u'\n    <td>')
+            # SOURCE LINE 165
             __M_writer(unicode(clipinfo['start_time']))
             __M_writer(u'</td>\n    <td>')
-            # SOURCE LINE 159
+            # SOURCE LINE 166
             __M_writer(unicode(clipinfo['desc']))
             __M_writer(u'</td>\n    <td>')
-            # SOURCE LINE 160
+            # SOURCE LINE 167
             __M_writer(unicode(clipinfo['a_href']))
             __M_writer(u'</td>\n\n')
-            # SOURCE LINE 162
+            # SOURCE LINE 169
             __M_writer(unicode( h.form(h.url_for(action='deleteclip'), multipart=True) ))
             __M_writer(u'\n<td>')
-            # SOURCE LINE 163
+            # SOURCE LINE 170
             __M_writer(unicode( h.submit('Delete') ))
             __M_writer(u' </td>\n')
-            # SOURCE LINE 164
+            # SOURCE LINE 171
             __M_writer(unicode( h.hidden_field('clipid', value=clipinfo['ixc']) ))
             __M_writer(u'\n')
-            # SOURCE LINE 165
+            # SOURCE LINE 172
             __M_writer(unicode( h.hidden_field('itemid', value=c.itemid) ))
             __M_writer(u'\n')
-            # SOURCE LINE 166
+            # SOURCE LINE 173
             __M_writer(unicode( h.end_form() ))
             __M_writer(u' \n\n</tr> \n')
-        # SOURCE LINE 170
+        # SOURCE LINE 177
         __M_writer(u'</table>\n\nAdd new clip:\n<!--')
-        # SOURCE LINE 173
+        # SOURCE LINE 180
         __M_writer(unicode( h.form(h.url_for(action='addclip'), multipart=True) ))
         __M_writer(u'-->\n<form name="addaclip" action="addclip" >\n<table style="font-size:small">\n<tr>\n    <td>Start</td>\n  <td>')
-        # SOURCE LINE 178
+        # SOURCE LINE 185
         __M_writer(unicode( h.text_field('starttime', size=5) ))
         __M_writer(u'</td>\n</tr>\n<tr>\n<tr>\n    <td>End</td>\n  <td>')
-        # SOURCE LINE 183
+        # SOURCE LINE 190
         __M_writer(unicode( h.text_field('endtime', size=5) ))
         __M_writer(u'</td>\n</tr>\n<td>Desc</td>\n  <td>\n  <input type="text" name="desc" size="20" onfocus="disableShortcuts()" onblur="enableShortcuts()" id="desc" />\n  <!--')
-        # SOURCE LINE 188
+        # SOURCE LINE 195
         __M_writer(unicode( h.text_field('desc') ))
         __M_writer(u'--></td>\n</tr>\n<tr>\n    <td>a_text</td>\n  <td>')
-        # SOURCE LINE 192
+        # SOURCE LINE 199
         __M_writer(unicode( h.text_field('a_text') ))
         __M_writer(u'</td>\n</tr>\n<tr>\n    <td>a_href</td>\n  <td>')
-        # SOURCE LINE 196
+        # SOURCE LINE 203
         __M_writer(unicode( h.text_field('a_href') ))
         __M_writer(u'</td>\n</tr>\n</table>\n')
-        # SOURCE LINE 199
+        # SOURCE LINE 206
         __M_writer(unicode( h.hidden_field('headindex', value = c.headdict['index']) ))
         __M_writer(u'\n')
-        # SOURCE LINE 200
+        # SOURCE LINE 207
         __M_writer(unicode( h.hidden_field('itemid', value=c.itemid) ))
         __M_writer(u'\n')
-        # SOURCE LINE 201
+        # SOURCE LINE 208
         __M_writer(unicode( h.hidden_field('hasvideo', value=c.sourcedict['has_video']) ))
         __M_writer(u'\n')
-        # SOURCE LINE 202
+        # SOURCE LINE 209
         __M_writer(unicode( h.submit('Add') ))
         __M_writer(u' \n')
-        # SOURCE LINE 203
+        # SOURCE LINE 210
         __M_writer(unicode( h.end_form() ))
-        __M_writer(u' \n\n\n<script>\n\nvar output = document.api.ofield;\n\nfunction VideoClipPlay(location) {\n  var myVideo = document.getElementsByTagName(\'video\')[0];\n  myVideo.src = location\n  myVideo.load();\n  myVideo.play();\n  addOutput("Video clip");\n \n}\n\n\nfunction AudioClipPlay(location) {\n  var myAudio = document.getElementsByTagName(\'audio\')[0];\n  myAudio.src = location\n  myAudio.load();\n  myAudio.play();\n  addOutput("Audio clip");\n \n}\n\nvar outLines = 0;\n\nfunction addOutput(str) {\n  if (outLines == 0) {\n    output.value = str;\n  } else {\n    output.value = str + "\\n" + output.value;\n  }\n  outLines++;\n  if (outLines == 11) {\n    i = output.value.lastIndexOf("\\n");\n    output.value = output.value.substr(0, i);\n    outLines--;\n  }\n\n}\n</script>\n\n\n')
+        __M_writer(u' \n\n\n<script>\n\nvar output = document.api.ofield;\nvar toutput = document.api.tfield;\nvar myVideo = document.getElementsByTagName(\'video\')[0];\nvar myAudio = document.getElementsByTagName(\'audio\')[0];\n\nv.addEventListener("seeked", function() { document.getElementsByTagName("video")[0].play(); }, true);\n\nfunction VideoClipPlay(location) {\n  myVideo.src = location\n  myVideo.load();\n  myVideo.play();\n  //addOutput("Video clip");\n}\n\n\nfunction AudioClipPlay(location) {\n  myAudio.src = location\n  myAudio.load();\n  myAudio.play();\n  //addOutput("Audio clip");\n \n}\n\nfunction Vupdatetime() {\n  addToutput(myVideo.currentTime);\n}\n\nfunction Aupdatetime() {\n  addToutput(myAudio.currentTime);\n}\n\nfunction addToutput(str) {\n  toutput.value = str;\n}\n\nvar outLines = 0;\n\nfunction addOutput(str) {\n  if (outLines == 0) {\n    output.value = str;\n  } else {\n    output.value = str + "\\n" + output.value;\n  }\n  outLines++;\n  if (ou
 tLines == 11) {\n    i = output.value.lastIndexOf("\\n");\n    output.value = output.value.substr(0, i);\n    outLines--;\n  }\n\n}\n</script>\n\n\n')
         return ''
     finally:
         context.caller_stack._pop_frame()

Modified: arkaiv/trunk/data/templates/displayitem.mak.pyc
===================================================================
(Binary files differ)

Modified: arkaiv/trunk/production.ini
===================================================================
--- arkaiv/trunk/production.ini	2009-04-20 03:52:46 UTC (rev 3909)
+++ arkaiv/trunk/production.ini	2009-04-24 03:24:03 UTC (rev 3910)
@@ -10,6 +10,7 @@
 error_email_from = paste at localhost
 media_path_base = /var/www/
 archive_loc = /var/www/arkaiv/
+media_url_base = http://137.111.156.142/
 
 [server:main]
 use = egg:Paste#http



More information about the commits mailing list