Skip to content

Commit

Permalink
Merge pull request #52 from hahow/feature/bookmark
Browse files Browse the repository at this point in the history
feat: lecture note
  • Loading branch information
raccoon-lee authored Aug 22, 2018
2 parents 4b8faca + 2da474b commit 25d17f2
Show file tree
Hide file tree
Showing 21 changed files with 6,948 additions and 5,591 deletions.
2 changes: 1 addition & 1 deletion dist/hahow-plyr.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/plyr.css

Large diffs are not rendered by default.

5,932 changes: 3,159 additions & 2,773 deletions dist/plyr.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/plyr.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/plyr.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/plyr.min.js.map

Large diffs are not rendered by default.

6,009 changes: 3,203 additions & 2,806 deletions dist/plyr.polyfilled.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/plyr.polyfilled.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/plyr.polyfilled.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/plyr.polyfilled.min.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/plyr.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions src/js/controls.js
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,11 @@ const controls = {
icon = 'play';
break;

case 'add-lecture-note':
type = 'add-lecture-note';
label = '筆記標註';
icon = 'add-lecture-note';

default:
label = type;
icon = buttonType;
Expand Down
13 changes: 13 additions & 0 deletions src/js/hahowCustomControl.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,19 @@ const hahow = {
// Media duration display
bottomLeft.appendChild(controls.createTime.call(this, 'duration'));

// Add lecture note button
const addLecturneNoteBtn = controls.createButton.call(this, 'add-lecture-note', {
class: 'plyr__add-lecture-note hidden',
});
addLecturneNoteBtn.appendChild(createElement('span', {}, '筆記標註'));
bottomRight.appendChild(addLecturneNoteBtn);

addLecturneNoteBtn.addEventListener('click', (e) => {
this.pause();
this.lectureNote.addLectureNote();
e.stopPropagation();
});

// Toggle mute button
bottomRight.appendChild(controls.createButton.call(this, 'mute'));

Expand Down
Loading

0 comments on commit 25d17f2

Please sign in to comment.