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
39c728cb
Commit
39c728cb
authored
Mar 07, 2012
by
Piotr Mitros
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Used cookies to store speed
--HG-- branch : ernie-templates-video-fixes
parent
6bbdae6f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
8 deletions
+20
-8
main.html
+1
-0
video_init.js
+19
-8
No files found.
main.html
View file @
39c728cb
...
...
@@ -84,6 +84,7 @@
<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.cookie.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/cktsim.js"
></script>
...
...
video_init.js
View file @
39c728cb
...
...
@@ -29,13 +29,9 @@ function good() {
}
ajax_video
=
good
;
// 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
if
(
video_speed
==
1
||
!
streams
[
video_speed
])
{
loadNewVideo
(
streams
[
"1.0"
],
streams
[
"1.0"
],
$
{
position
});
}
else
{
loadNewVideo
(
streams
[
"1.0"
],
streams
[
video_speed
],
$
{
position
});
}
function
add_speed
(
key
,
stream
)
{
var
id
=
'speed_'
+
stream
;
...
...
@@ -67,9 +63,24 @@ function sort_by_value(a,b) {
l
.
sort
(
sort_by_value
);
for
(
var
i
=
0
;
i
<
l
.
length
;
i
++
)
{
add_speed
(
l
[
i
],
streams
[
l
[
i
]])
}
$
(
document
).
ready
(
function
()
{
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
(){
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