Commit 340cea91 by Piotr Mitros

UI work, starting to integrate speeds into video player

parent 43743df4
#coursenav {
background-color:#031634;
padding: 4px 8px 8px 0px;
margin: 4px 8px 8px 0px;
width: 100%;
text-align: right;
}
#left_nav {
border: 0;
padding: 0;
margin: 0;
float: left;
width: 276;
}
#hide_acc {
min-height:600;
}
#mainblock {
border: 0;
padding: 0;
margin: 0;
width: 200;
min-height:600px;
margin-left: 276px;
margin-right: 0px;
}
#bodyContent {
width: 100%;
}
.seq_problem_visited { background-color: #ccccaa;}
.seq_video_visited { background-color: #ccaacc;}
.seq_video_visited { background-color: #cccaac;}
.seq_html_visited { background-color: #caaccc;}
.seq_tab_visited { background-color: #aacccc;}
.seq_vertical_visited { background-color: #acaccc;}
.seq_sequential_visited { background-color: #cacacc;}
.seq_problem_visited { background-color: #ccacac;}
.seq_schematic_visited { background-color: #cccaca;}
.seq_problem_inactive { background-color: #aaaa99;}
.seq_video_inactive { background-color: #aa99aa;}
.seq_video_inactive { background-color: #aaa99a;}
.seq_html_inactive { background-color: #a99aaa;}
.seq_tab_inactive { background-color: #99aaaa;}
.seq_vertical_inactive { background-color: #9a9aab;}
.seq_sequential_inactive { background-color: #a9a9aa;}
.seq_problem_inactive { background-color: #aa9a9a;}
.seq_schematic_inactive { background-color: #aaa9a9;}
.seq_active { background-color: red;}
\ No newline at end of file
...@@ -180,6 +180,7 @@ function updateytplayerInfo() { ...@@ -180,6 +180,7 @@ function updateytplayerInfo() {
// functions for the api calls // functions for the api calls
function loadNewVideo(id, startSeconds) { function loadNewVideo(id, startSeconds) {
captions={"start":[0],"end":[0],"text":["Attempting to load captions..."]};
$.getJSON("/static/subs/"+id+".srt.sjson", function(data) { $.getJSON("/static/subs/"+id+".srt.sjson", function(data) {
captions=data; captions=data;
}); });
......
...@@ -26,16 +26,23 @@ class VideoModule(XModule): ...@@ -26,16 +26,23 @@ class VideoModule(XModule):
''' Tags in the courseware file guaranteed to correspond to the module ''' ''' Tags in the courseware file guaranteed to correspond to the module '''
return "video" return "video"
def video_list(self):
l=self.item_id.split(',')
l=[i.split(":") for i in l]
return json.dumps(dict(l))
def get_html(self): def get_html(self):
return render_to_string('video.html',{'id':self.item_id, return render_to_string('video.html',{'streams':self.video_list(),
'time':self.video_time}) 'id':self.item_id,
'video_time':self.video_time})
def get_init_js(self): def get_init_js(self):
''' JavaScript code to be run when problem is shown. Be aware ''' JavaScript code to be run when problem is shown. Be aware
that this may happen several times on the same page that this may happen several times on the same page
(e.g. student switching tabs). Common functions should be put (e.g. student switching tabs). Common functions should be put
in the main course .js files for now. ''' in the main course .js files for now. '''
return render_to_string('video_init.js',{'id':self.item_id, return render_to_string('video_init.js',{'streams':self.video_list(),
'id':self.item_id,
'video_time':self.video_time}) 'video_time':self.video_time})
def get_destroy_js(self): def get_destroy_js(self):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment