Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
6cbc7c9e
Commit
6cbc7c9e
authored
Mar 07, 2012
by
Piotr Mitros
Browse files
Options
Browse Files
Download
Plain Diff
Merge
parents
318a9f2b
39c728cb
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
7 deletions
+22
-7
main.html
+1
-0
video_init.js
+21
-7
No files found.
main.html
View file @
6cbc7c9e
...
@@ -84,6 +84,7 @@
...
@@ -84,6 +84,7 @@
<script
type=
"text/javascript"
src=
"${ settings.LIB_URL }jquery.treeview.js"
></script>
<script
type=
"text/javascript"
src=
"${ settings.LIB_URL }jquery.treeview.js"
></script>
<script
type=
"text/javascript"
src=
"/static/js/jquery.leanModal.min.js"
></script>
<script
type=
"text/javascript"
src=
"/static/js/jquery.leanModal.min.js"
></script>
<script
type=
"text/javascript"
src=
"/static/js/jquery.cookie.js"
></script>
<script
type=
"text/javascript"
src=
"/static/js/video_player.js"
></script>
<script
type=
"text/javascript"
src=
"/static/js/video_player.js"
></script>
<script
type=
"text/javascript"
src=
"/static/js/schematic.js"
></script>
<script
type=
"text/javascript"
src=
"/static/js/schematic.js"
></script>
<script
type=
"text/javascript"
src=
"/static/js/cktsim.js"
></script>
<script
type=
"text/javascript"
src=
"/static/js/cktsim.js"
></script>
...
...
video_init.js
View file @
6cbc7c9e
...
@@ -30,14 +30,13 @@ function good() {
...
@@ -30,14 +30,13 @@ function good() {
ajax_video
=
good
;
ajax_video
=
good
;
loadNewVideo
(
streams
[
"1.0"
],
$
{
position
});
// load the same video speed your last video was at in a sequence
// if the last speed played on video doesn't exist on another video just use 1.0 as default
function
add_speed
(
key
,
stream
)
{
function
add_speed
(
key
,
stream
)
{
var
id
=
'speed_'
+
stream
;
var
id
=
'speed_'
+
stream
;
//TODO: this should be smarter and know which video is first selected when we have
if
(
key
==
video_speed
)
{
// video speed as an option/parameter per user that is saved
if
(
key
==
1.0
)
{
$
(
"#video_speeds"
).
append
(
' <li class=active id="'
+
id
+
'">'
+
key
+
'x</li>'
);
$
(
"#video_speeds"
).
append
(
' <li class=active id="'
+
id
+
'">'
+
key
+
'x</li>'
);
}
else
{
}
else
{
$
(
"#video_speeds"
).
append
(
' <li id="'
+
id
+
'">'
+
key
+
'x</li>'
);
$
(
"#video_speeds"
).
append
(
' <li id="'
+
id
+
'">'
+
key
+
'x</li>'
);
...
@@ -64,9 +63,24 @@ function sort_by_value(a,b) {
...
@@ -64,9 +63,24 @@ function sort_by_value(a,b) {
l
.
sort
(
sort_by_value
);
l
.
sort
(
sort_by_value
);
for
(
var
i
=
0
;
i
<
l
.
length
;
i
++
)
{
$
(
document
).
ready
(
function
()
{
add_speed
(
l
[
i
],
streams
[
l
[
i
]])
video_speed
=
$
.
cookie
(
"video_speed"
);
}
console
.
log
(
"ready"
);
console
.
log
(
video_speed
);
if
((
!
video_speed
)
||
(
!
streams
[
video_speed
]
))
{
video_speed
=
"1.0"
;
}
console
.
log
(
video_speed
);
loadNewVideo
(
streams
[
"1.0"
],
streams
[
video_speed
],
$
{
position
});
for
(
var
i
=
0
;
i
<
l
.
length
;
i
++
)
{
add_speed
(
l
[
i
],
streams
[
l
[
i
]])
}
});
function
toggleVideo
(){
function
toggleVideo
(){
if
(
$
(
"#video_control"
).
hasClass
(
"play"
)){
if
(
$
(
"#video_control"
).
hasClass
(
"play"
)){
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment