Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
208 commits
Select commit Hold shift + click to select a range
e846bca
Fix Image aspect ratio
oaubert Oct 7, 2015
4b9aaa0
Move pip-menu into the whole widget
oaubert Oct 7, 2015
bc123b3
Cosmetic fixes
oaubert Oct 9, 2015
9548116
Add BarSlider component
oaubert Oct 9, 2015
21c5947
Whitespace/semicolons fixes
oaubert Oct 12, 2015
7747262
Forward show_title parameter to annotation template
oaubert Oct 12, 2015
e8adabf
Merge branch 'iri'
oaubert Oct 12, 2015
443dab0
Simplify importUsers code
oaubert Oct 12, 2015
fad0d82
Whitespace fixes
oaubert Oct 12, 2015
825d02a
Formatting fixes
oaubert Oct 12, 2015
9298b3f
Fix closing tag
oaubert Oct 12, 2015
bd4ff1c
Fix BarSlider display
oaubert Oct 12, 2015
c844b90
Implement custom Coco video controller widget
oaubert Oct 12, 2015
34b4b29
Do not specify px units for 0
oaubert Oct 12, 2015
e688f0f
Coding style changes
oaubert Oct 13, 2015
5e17b36
Coding style fixes
oaubert Oct 13, 2015
e16cdbb
Use trim method
oaubert Oct 13, 2015
51e2e81
Display slide titles
oaubert Oct 13, 2015
37b789a
Handle Controller.fullscreen_widget selector for designing fullscreen…
oaubert Oct 13, 2015
419899d
Coding style fixes
oaubert Oct 13, 2015
7be10a3
Preload metadata only for html player
oaubert Oct 13, 2015
75349de
Simplify barslider css code
oaubert Oct 13, 2015
5140a24
Set width/height for .Ldt-Fullscreen-Element
oaubert Oct 13, 2015
6206b96
Move search field out of controls
oaubert Oct 13, 2015
f9d8c24
Generate dummy toc annotation if no segmentation is found
oaubert Oct 13, 2015
e2b466e
Fix fullscreen
oaubert Oct 13, 2015
ae7d255
Coding style fixes
oaubert Oct 13, 2015
71329d4
Use the description first line as title if show_title is false
oaubert Oct 13, 2015
147b7fe
Coding style fixes
oaubert Oct 13, 2015
7dced5e
Add jscs configuration file
oaubert Oct 13, 2015
0651989
Add missing semicolon
oaubert Oct 13, 2015
d266e75
Whitespace fixes
oaubert Oct 13, 2015
47a7529
Put Search field inside <form>, but outside of configuration option
oaubert Oct 13, 2015
6fb7f94
Allow incomplete slide information
oaubert Oct 13, 2015
9986900
Do not try to display thumbnail if it is not present
oaubert Oct 13, 2015
9659c0d
Define styles for toc levels
oaubert Oct 15, 2015
5c66970
Coding style fixes
oaubert Oct 15, 2015
3c36f57
Implement IriSP.generateUuid and use it
oaubert Oct 15, 2015
2d964a8
Use generateUuid for generating prefix
oaubert Oct 15, 2015
32795ec
Implement basic edit/delete framework (not wired yet)
oaubert Oct 15, 2015
e4480d3
Preserve extra metadata info for Annotation and Media elements
oaubert Oct 15, 2015
afcc9c5
Set description before title
oaubert Oct 16, 2015
04c8351
Trim whitespaces from description
oaubert Oct 16, 2015
c16d66e
Increase size of action icons
oaubert Oct 16, 2015
c708f9d
Use coco:category metadata
oaubert Oct 19, 2015
35fc3cb
Define own capitalize method
oaubert Oct 19, 2015
bdb8296
Remove volume bar + add mute icon
oaubert Oct 19, 2015
8e7185e
Specify position/repeat for button background
oaubert Oct 19, 2015
56179c5
Transmit deleteFromDirectory parameter
oaubert Oct 19, 2015
f77e13c
Specify 100% default width instead of fixed width
oaubert Oct 19, 2015
d156c7d
Whitespace/coding style fixes
oaubert Oct 20, 2015
07145c5
Move jscs config file to assets
oaubert Oct 20, 2015
d9d3c53
Allow no space after function keyword
oaubert Oct 20, 2015
0ab684e
Hide fullscreen button if feature not available
oaubert Oct 27, 2015
59728ae
Bind touchstart even on mute button
oaubert Oct 27, 2015
216b0a0
Fix Enrichedplan title display
oaubert Oct 27, 2015
023610a
Remove outline from search box
oaubert Oct 27, 2015
3abb70f
Indenting
oaubert Oct 27, 2015
1158dec
Add .Ldt-EnrichedPlan-Note-Link
oaubert Oct 27, 2015
2c51a82
Coding style fixes
oaubert Oct 27, 2015
87be885
Add Mediafragment URL to annotations
oaubert Oct 27, 2015
02db207
Fetch slide level from slide.content.data.level
oaubert Oct 27, 2015
f6fe4ae
Fix button handling
oaubert Oct 28, 2015
1e83955
Add proprietary css attributes
oaubert Oct 28, 2015
72fa102
Remove obsolete comments
oaubert Nov 2, 2015
602766b
New widget CocoCreateAnnotation
oaubert Nov 2, 2015
c9ec475
Append video element to container rather than replacing all content
oaubert Nov 2, 2015
3c4e35f
Allow to specify PIP position
oaubert Nov 2, 2015
e8f71f4
.Ldt-SlideVideoPlayer-pip-menu is not used anymore
oaubert Nov 2, 2015
37f2ed4
Allow to toggle main display
oaubert Nov 2, 2015
4896a5c
Make pip toggle buttons 32x32
oaubert Nov 2, 2015
96ac63d
l10nize EnrichedPlan
oaubert Nov 2, 2015
f63a093
l10nize CocoCreateAnnotation.
oaubert Nov 2, 2015
1d1c11d
Use absolute for filtered out elements
oaubert Nov 9, 2015
f9fd729
Display timecode left of input
oaubert Nov 9, 2015
05d4f26
Modify timecode font size
oaubert Nov 9, 2015
679f60f
Update timecode if there is no input
oaubert Nov 9, 2015
d2f6c48
Use same font size for active timecode
oaubert Nov 9, 2015
d88b4db
Display note timecodes if thumbnail is hidden
oaubert Nov 9, 2015
bbd5558
Convert EnrichedPlan control menu to dropdown menu
oaubert Nov 10, 2015
4eca6c1
Hide input field
oaubert Nov 10, 2015
aa50aa9
Modify edit icon size
oaubert Nov 10, 2015
7ae824a
Use svg file for checkboxes
oaubert Nov 10, 2015
4514967
Remove whitespace
oaubert Nov 20, 2015
5a868a8
Merge branch 'upstream'
oaubert Nov 24, 2015
49e5456
Define BaseElement.getTitleOrDescription
oaubert Nov 26, 2015
0cb1a54
Use .getTitleOrDescription for notes
oaubert Nov 26, 2015
d626982
Specify method for posting annotation
oaubert Nov 26, 2015
49ce48e
Allow to publish a remote annotation
oaubert Nov 26, 2015
97d1b0a
Move config menu to the left of input field
oaubert Nov 26, 2015
f8cfdda
Enlarge edit control icon space
oaubert Nov 26, 2015
3621120
Append video player as first child
oaubert Nov 27, 2015
5568c14
Add a shadow to the controller menu
oaubert Nov 27, 2015
66d69f2
Copy all annotation.meta data when deserializing annotation
oaubert Dec 7, 2015
6cc1d79
Factorize update_content method so that the component can update itself
oaubert Dec 7, 2015
382b884
Clear input data after sending it
oaubert Dec 7, 2015
5a1ee9b
Remove unused code
oaubert Dec 7, 2015
58e88e0
Use a strict comparison for slide inclusion test
oaubert Dec 7, 2015
49dfc1d
Add translations
oaubert Dec 9, 2015
750eea4
Handle is_admin parameter
oaubert Dec 9, 2015
a840897
Fix typo
oaubert Dec 11, 2015
2f7c2ac
Add videoonly mode for SlideVideoPlayer
oaubert Dec 14, 2015
c796754
Fix translation fetching
oaubert Dec 14, 2015
f41eb82
Hide non appliable pip menu toggle items
oaubert Dec 15, 2015
409e557
Highlight selected annotation
oaubert Dec 15, 2015
327e4b1
Show edit buttons only on selected annotation
oaubert Dec 15, 2015
20c30ec
Hide information for whole-slide mode
oaubert Dec 15, 2015
3140f75
Define flat_mode
oaubert Dec 15, 2015
a35af83
Use explicit Ldt-SlideVideoPlayer-pip-br class
oaubert Dec 16, 2015
ed3d765
Implement group filtering
oaubert Dec 16, 2015
51ea1df
Specify initial position for pip
oaubert Dec 16, 2015
59dbaea
Add left margin to search box
oaubert Dec 16, 2015
bf6e4e1
Add data-level information
oaubert Dec 17, 2015
5277f8d
Do not specify SlideTitle height
oaubert Dec 18, 2015
ec70133
Implement slide level update controls
oaubert Dec 18, 2015
324466e
Use action_url method to get URLs
oaubert Dec 18, 2015
97640f7
Specify pip-main class in videoonly mode
oaubert Dec 22, 2015
e9a6270
Make update_level more robust
oaubert Jan 4, 2016
b5d7201
Add different pip toggles for pip positioning
oaubert Jan 5, 2016
902748c
Force hide fullscreen icon
oaubert Jan 5, 2016
4bf4a49
Define enable_add_question option, disabled by default
oaubert Jan 6, 2016
38139cd
Specify white background for PIP
oaubert Jan 7, 2016
de2c93c
Use grey background for selected annotations
oaubert Jan 7, 2016
8ec5ed6
Specify fill/stroke for hamburger icon
oaubert Jan 7, 2016
3b7564c
Fix padding
oaubert Jan 13, 2016
7c4ee32
Tweak Selected-Timecode background-color
oaubert Jan 13, 2016
59b40ca
Display featured annotations (instead of hardcoded teacher)
oaubert Jan 14, 2016
d554355
Coding style fix
oaubert Jan 14, 2016
5497740
Serialize sharing attribute
oaubert Jan 14, 2016
fa08362
Use current_group information for sharing new annotations
oaubert Jan 14, 2016
9528959
Display sharing icon next to annotation
oaubert Jan 14, 2016
6925861
Handle public notes
oaubert Jan 14, 2016
2da41cd
Move edit button to the right of the widget
oaubert Jan 15, 2016
9d0617a
Implement annotation bar display
oaubert Jan 15, 2016
053b448
Update icon_group and icon_public
oaubert Jan 19, 2016
fdc0bf2
Display group/public icons only for own annotations
oaubert Jan 19, 2016
032a5c9
Coding style fixes
oaubert Jan 19, 2016
6d98b02
Add tooltip to slide bar
oaubert Jan 20, 2016
872ba1c
Set focus on annotation zone on pause event
oaubert Jan 20, 2016
01b88f6
Handle clicks on bar representation
oaubert Jan 22, 2016
ddc8545
Quick fix for a strange resizing issue
oaubert Jan 26, 2016
53cedc9
Remove max-height (conflict with height)
oaubert Jan 26, 2016
b5bc8e6
Reorder css directives
oaubert Jan 26, 2016
ec58051
Make filtered_out more generic
oaubert Jan 26, 2016
6777f9f
Display notes in annotation bar
oaubert Jan 26, 2016
3e95631
Use relative positioning for slider
oaubert Jan 28, 2016
c17bc08
Highlight hovered bar element
oaubert Jan 28, 2016
80c3f92
Use grey background for annotation bar
oaubert Feb 2, 2016
9537cca
Add horizontal padding for annotation bar
oaubert Feb 2, 2016
5fa1dae
Make pip bottom right by default
oaubert Feb 2, 2016
1ef458a
Add border around PIP
oaubert Feb 2, 2016
1cb5ebe
Trigger twitter/facebook events
oaubert Feb 2, 2016
40919b4
Add classname to slide bars so that they react to visibility toggle
oaubert Feb 2, 2016
d89339a
Add "Configure tab display" menuitem
oaubert Feb 4, 2016
0e49065
Tweak linkify method
oaubert Feb 22, 2016
c5f4b52
Fix quiz deactivation button
oaubert Mar 30, 2016
1b67573
Fix refresh after quiz creation
oaubert Mar 30, 2016
132fdf7
Use getWidgetAnnotations to get standard filtering behaviour
oaubert Mar 30, 2016
2bc75c2
Implement Annotation feature toggle
oaubert Apr 14, 2016
a2bc2b9
Check that no data will be lost before leaving page
oaubert Apr 15, 2016
e5d90de
Use a popup dialog for annotation edit
oaubert Apr 18, 2016
e89aed1
Factorize close_quiz method
oaubert Apr 27, 2016
256566f
Remove marks for correct/incorrect answers
oaubert Apr 27, 2016
25ed279
Modify quiz result display
oaubert Apr 27, 2016
e30a8d4
Increase quiz font size when fullscreen
oaubert May 9, 2016
5e1fe39
Implement set_placeholder method
oaubert May 30, 2016
0e60319
Merge branch 'upstream'
oaubert Jun 3, 2016
32f7cd6
Add show_quiz_notes options
oaubert Jun 6, 2016
bb94377
Coding style fixes
oaubert Jun 7, 2016
ac5e3c0
Add play/pause feature to imagedisplay
oaubert Jun 7, 2016
c188257
Search in slide contents
oaubert Jun 7, 2016
2601f5b
Add tracing information
oaubert Jun 7, 2016
be07044
Display slides as rectangles in bar
oaubert Jun 8, 2016
f270c9b
Handle accented search terms
oaubert Jun 8, 2016
229d876
Add expander to show slide content
oaubert Jun 8, 2016
bef1bb3
Coding style fixes
oaubert Jun 8, 2016
1f84bd3
Implement Media.togglePlayPause method
oaubert Jun 8, 2016
7ef302a
Pressing space with an empty input field toggles play/pause
oaubert Jun 9, 2016
1a2a5b5
Allow text selection in slides
oaubert Jun 9, 2016
5771864
Use markjs.io for searching
oaubert Jun 9, 2016
b2478e8
Add slide content show/hide icons
oaubert Jun 21, 2016
7ef9b2b
Implement Comment infrastructure. Add is_authenticated option
oaubert Jun 23, 2016
f59e1f8
Set pointer cursor for all menu labels
oaubert Jun 28, 2016
b360e2a
Highlight current menu element
oaubert Jun 28, 2016
f40cd2a
Add show_comments option
oaubert Jun 28, 2016
b1a341d
Fallover for input type=search
oaubert Jul 21, 2016
149e373
Hack source reference for created annotation
oaubert Jul 21, 2016
938ebfa
Coding style fixes
oaubert Jul 21, 2016
7a63cc0
Implement autoscroll
oaubert Jul 22, 2016
10e6f41
Modify EnrichedPlan layout to avoid top margin
oaubert Jul 22, 2016
980ad8a
Convert to unix EOL
oaubert Jul 22, 2016
641c94f
Display creator
oaubert Aug 30, 2016
275ad71
Adjust padding
oaubert Aug 30, 2016
94ef462
Handle non-defined input field
oaubert Sep 2, 2016
498c4c2
Rename Search to Filter
oaubert Sep 5, 2016
630d6d6
Trace settings checkboxes
oaubert Sep 6, 2016
21e5576
Trigger player event when changing setting
oaubert Sep 6, 2016
5ec15de
Add Comment Edit icon
oaubert Sep 28, 2016
00c6cfd
Make PIP view transparent
oaubert Sep 29, 2016
5e1cb27
Right align comment edit icon
oaubert Oct 12, 2016
19f127d
Highlight comments
oaubert Oct 12, 2016
da0e348
Fix Comment.edit trigger
oaubert Oct 12, 2016
99ca3ad
Get featured information from a.meta dict
oaubert Oct 12, 2016
b3166cf
Fix PIP opacity value
oaubert Oct 12, 2016
86f37cf
Fix comment width when editable
oaubert Oct 12, 2016
dec05e3
Modify display of annotation count
oaubert Oct 13, 2016
e8db6c1
Select annotation identified in the document fragment
oaubert Oct 14, 2016
3ca8ef5
Merge branch 'master' of github.com:oaubert/metadataplayer
oaubert Mar 28, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
68 changes: 68 additions & 0 deletions assets/dev/jscsrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
{
"maxErrors": -1,
"requireCurlyBraces": [
"if",
"else",
"for",
"while",
"do",
"try",
"catch"
],
"requireSpaceAfterKeywords": [
"if",
"else",
"for",
"while",
"do",
"switch",
"case",
"return",
"try",
"catch",
// "function",
"typeof"
],
"requireSpaceBeforeBlockStatements": true,
"requireParenthesesAroundIIFE": true,
"requireSpacesInConditionalExpression": true,
"requireSemicolons": true,
"disallowSpacesInNamedFunctionExpression": {
"beforeOpeningRoundBrace": true
},
"disallowSpacesInFunctionDeclaration": {
"beforeOpeningRoundBrace": true
},
"requireSpaceBetweenArguments": true,
// "requireMultipleVarDecl": "no",
// "requireBlocksOnNewline": true,
"disallowEmptyBlocks": true,
// "disallowSpacesInsideArrayBrackets": true,
"disallowSpacesInsideParentheses": true,
// "disallowDanglingUnderscores": true,
"requireCommaBeforeLineBreak": true,
"disallowSpaceAfterPrefixUnaryOperators": true,
"disallowSpaceBeforePostfixUnaryOperators": true,
"disallowSpaceBeforeBinaryOperators": [
","
],
"requireSpacesInForStatement": true,
"requireSpaceBeforeBinaryOperators": true,
"requireSpaceAfterBinaryOperators": true,
"disallowKeywords": [
"with",
"continue"
],
"validateIndentation": 4,
"disallowMixedSpacesAndTabs": true,
"disallowTrailingWhitespace": true,
"disallowTrailingComma": true,
"disallowKeywordsOnNewLine": [
"else"
],
"requireLineFeedAtFileEnd": true,
"requireCapitalizedConstructors": true,
"requireDotNotation": false,
"disallowNewlineBeforeBlockStatements": true,
"disallowMultipleLineStrings": true
}
103 changes: 52 additions & 51 deletions src/js/html-player.js
Original file line number Diff line number Diff line change
@@ -1,25 +1,26 @@
/* HTML player, to be reused in a widget, or elsewhere */

IriSP.htmlPlayer = function(media, jqselector, options) {
IriSP.htmlPlayer = function (media, jqselector, options) {

var opts = options || {},
videoURL = opts.video || media.video;

if (typeof opts.url_transform === "function") {
videoURL = opts.url_transform(videoURL);
}

var videoEl = IriSP.jQuery('<video>');

videoEl.attr({
width : opts.width || undefined,
height : opts.height || undefined,
controls : opts.controls || undefined,
autoplay : opts.autostart || opts.autoplay || undefined
autoplay : opts.autostart || opts.autoplay || undefined,
preload: "metadata"
});
if(typeof videoURL === "string"){
videoEl.attr("src",videoURL);

if (typeof videoURL === "string") {
videoEl.attr("src", videoURL);
} else {
for (var i = 0; i < videoURL.length; i++) {
var _srcNode = IriSP.jQuery('<source>');
Expand All @@ -41,105 +42,105 @@ IriSP.htmlPlayer = function(media, jqselector, options) {
});
videoEl.append(_trackNode);
}
jqselector.html(videoEl);
jqselector.prepend(videoEl);

var mediaEl = videoEl[0];

// Binding HTML video functions to media events
media.on("setcurrenttime", function(_milliseconds) {
media.on("setcurrenttime", function (_milliseconds) {
try {
mediaEl.currentTime = (_milliseconds / 1000);
} catch (err) {

}
});
media.on("setvolume", function(_vol) {

media.on("setvolume", function (_vol) {
media.volume = _vol;
try {
mediaEl.volume = _vol;
} catch (err) {

}
});
media.on("setmuted", function(_muted) {

media.on("setmuted", function (_muted) {
media.muted = _muted;
try {
mediaEl.muted = _muted;
} catch (err) {

}
});
media.on("settimerange", function(_timeRange){

media.on("settimerange", function (_timeRange) {
media.timeRange = _timeRange;
try {
if (media.getCurrentTime() > _timeRange[0] || media.getCurrentTime() < _timeRange){
if (media.getCurrentTime() > _timeRange[0] || media.getCurrentTime() < _timeRange) {
mediaEl.currentTime = (_timeRange[0] / 1000);
}
} catch (err) {
}
})
media.on("resettimerange", function(){
});

media.on("resettimerange", function () {
media.timeRange = false;
})
media.on("setplay", function() {
});

media.on("setplay", function () {
try {
mediaEl.play();
} catch (err) {

}
});
media.on("setpause", function() {

media.on("setpause", function () {
try {
mediaEl.pause();
} catch (err) {

}
});

// Binding DOM events to media
function getVolume() {
media.muted = mediaEl.muted;
media.volume = mediaEl.volume;
}
videoEl.on("loadedmetadata", function() {

videoEl.on("loadedmetadata", function () {
getVolume();
media.trigger("loadedmetadata");
media.trigger("volumechange");
});
videoEl.on("timeupdate", function() {
media.trigger("timeupdate", new IriSP.Model.Time(1000*mediaEl.currentTime));

videoEl.on("timeupdate", function () {
media.trigger("timeupdate", new IriSP.Model.Time(1000 * mediaEl.currentTime));
});
videoEl.on("volumechange", function() {

videoEl.on("volumechange", function () {
getVolume();
media.trigger("volumechange");
});
videoEl.on("play", function() {

videoEl.on("play", function () {
media.trigger("play");
});
videoEl.on("pause", function() {

videoEl.on("pause", function () {
media.trigger("pause");
});
videoEl.on("seeking", function() {

videoEl.on("seeking", function () {
media.trigger("seeking");
});
videoEl.on("seeked", function() {

videoEl.on("seeked", function () {
media.trigger("seeked");
});
videoEl.on("click", function() {

videoEl.on("click", function () {
if (mediaEl.paused) {
media.play();
} else {
Expand Down
7 changes: 7 additions & 0 deletions src/js/libs/jquery.mark.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading