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
f096a291
Commit
f096a291
authored
Dec 22, 2011
by
Piotr Mitros
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Video speeds work
parent
ce85762f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
1 deletions
+11
-1
courseware/static/js/video_player.js
+11
-1
No files found.
courseware/static/js/video_player.js
View file @
f096a291
...
...
@@ -15,6 +15,14 @@ var global=5;
var
load_id
=
0
;
var
video_speed
=
1.0
;
function
change_video_speed
(
speed
,
youtube_id
)
{
new_position
=
ytplayer
.
getCurrentTime
()
*
video_speed
/
speed
;
video_speed
=
speed
;
ytplayer
.
loadVideoById
(
youtube_id
,
new_position
);
}
function
caption_at
(
index
)
{
if
(
captions
==
0
)
return
" "
;
...
...
@@ -37,11 +45,13 @@ function caption_time_at(index) {
if
(
index
>=
time_array
.
length
)
return
ytplayer
.
getDuration
();
return
time_array
[
index
]
/
1000.0
;
return
time_array
[
index
]
/
1000.0
/
video_speed
;
}
function
caption_index
(
now
)
{
// Returns the index of the current caption, given a time
now
=
now
*
video_speed
;
if
(
captions
==
0
)
return
0
;
...
...
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