-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ME.js player keyboard support #4151
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
71 changes: 71 additions & 0 deletions
71
vendor/assets/javascripts/mediaelement/plugins/jump-forward/jump-forward-i18n.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
'use strict'; | ||
|
||
if (mejs.i18n.ca !== undefined) { | ||
mejs.i18n.ca['mejs.time-jump-forward'] = ['Salteu endavant 1 segon', 'Salta endavant %1 segons']; | ||
} | ||
if (mejs.i18n.cs !== undefined) { | ||
mejs.i18n.cs['mejs.time-jump-forward'] = ['Přeskočte o 1 sekundu dopředu', 'Přeskočte %1 vteřiny dopředu', 'Jump forward %1 seconds']; | ||
} | ||
if (mejs.i18n.de !== undefined) { | ||
mejs.i18n.de['mejs.time-jump-forward'] = ['1 Sekunde vorspulen', 'Přeskočte %1 vteřiny dopředu', 'Skok %1 vteřin']; | ||
} | ||
if (mejs.i18n.es !== undefined) { | ||
mejs.i18n.es['mejs.time-jump-forward'] = ['Adelantar 1 segundo', 'Adelantar %1 segundos']; | ||
} | ||
if (mejs.i18n.fa !== undefined) { | ||
mejs.i18n.fa['mejs.time-jump-forward'] = 'پرش به جلو 1% ثانیه'; | ||
} | ||
if (mejs.i18n.fr !== undefined) { | ||
mejs.i18n.fr['mejs.time-jump-forward'] = ['Avancer de %1 seconde', 'Avancer de %1 secondes']; | ||
} | ||
if (mejs.i18n.hr !== undefined) { | ||
mejs.i18n.hr['mejs.time-jump-forward'] = ['Skoči naprijed 1 sekundu', 'Skoči naprijed %1 sekunde', 'Skoči naprijed %1 sekundi']; | ||
} | ||
if (mejs.i18n.hu !== undefined) { | ||
mejs.i18n.hu['mejs.time-jump-forward'] = ['Ugrás előre 1 másodpercig', 'Ugrás előre %1 másodpercig']; | ||
} | ||
if (mejs.i18n.it !== undefined) { | ||
mejs.i18n.it['mejs.time-jump-forward'] = ['Salta in avanti per 1 secondo', 'Salta in avanti %1 secondi']; | ||
} | ||
if (mejs.i18n.ja !== undefined) { | ||
mejs.i18n.ja['mejs.time-jump-forward'] = '%1秒前にジャンプ'; | ||
} | ||
if (mejs.i18n.ko !== undefined) { | ||
mejs.i18n.ko['mejs.time-jump-forward'] = '%1 초 앞으로 뛰어 오르십시오'; | ||
} | ||
if (mejs.i18n.ms !== undefined) { | ||
mejs.i18n.ms['mejs.time-jump-forward'] = 'Lompat masa %1 saat'; | ||
} | ||
if (mejs.i18n.nl !== undefined) { | ||
mejs.i18n.nl['mejs.time-jump-forward'] = '%1 seconden vooruit springen'; | ||
} | ||
if (mejs.i18n.pl !== undefined) { | ||
mejs.i18n.pl['mejs.time-jump-forward'] = ['Przewiń do przodu o sekundę', 'Przewiń do przodu o %1 sekundy', 'Przewiń do przodu o %1 sekund']; | ||
} | ||
if (mejs.i18n.pt !== undefined) { | ||
mejs.i18n.pt['mejs.time-jump-forward'] = ['Avance 1 segundo', 'Avance %1 segundos']; | ||
} | ||
if (mejs.i18n.ro !== undefined) { | ||
mejs.i18n.ro['mejs.time-jump-forward'] = ['Salt înainte de 1 secundă', 'Salt înainte de %1 secunde']; | ||
} | ||
if (mejs.i18n.ru !== undefined) { | ||
mejs.i18n.ru['mejs.time-jump-forward'] = ['Перейти вперед на %1 секунду', 'Перейти вперед на %1 секунды', 'Перейти вперед на %1 секунд']; | ||
} | ||
if (mejs.i18n.sk !== undefined) { | ||
mejs.i18n.sk['mejs.time-jump-forward'] = ['Skočiť dopredu o 1 sekundu', 'Skok vpred o %1 sekundy', 'Skok dopredu %1 sekúnd']; | ||
} | ||
if (mejs.i18n.sv !== undefined) { | ||
mejs.i18n.sv['mejs.time-jump-forward'] = ['Hoppa fram 1 sekund', 'Hoppa fram %1 sekunder']; | ||
} | ||
if (mejs.i18n.tr !== undefined) { | ||
mejs.i18n.tr['mejs.time-jump-forward'] = ['1 saniye ileri atla', '%1 saniye ileri atla']; | ||
} | ||
if (mejs.i18n.uk !== undefined) { | ||
mejs.i18n.uk['mejs.time-jump-forward'] = ['Перейти вперед на %1 секунду', 'Перейти вперед на %1 секунди', 'Перейти вперед на %1 секунд']; | ||
} | ||
if (mejs.i18n.zh !== undefined) { | ||
mejs.i18n.zh['mejs.time-jump-forward'] = '向前跳%1秒'; | ||
} | ||
if (mejs.i18n['zh-CN'] !== undefined) { | ||
mejs.i18n['zh-CN']['mejs.time-jump-forward'] = '向前跳%1秒'; | ||
} |
70 changes: 70 additions & 0 deletions
70
vendor/assets/javascripts/mediaelement/plugins/jump-forward/jump-forward.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
/*! | ||
* MediaElement.js | ||
* http://www.mediaelementjs.com/ | ||
* | ||
* MediaElement.js Plugins - https://github.com/mediaelement/mediaelement-plugins | ||
* | ||
* Copyright 2010-2017, John Dyer (http://j.hn/) and Rafael Miranda (https://github.com/rafa8626) | ||
* License: MIT | ||
* | ||
* Feature: Jump forward in the media file for a given number of seconds | ||
* | ||
*/ | ||
|
||
'use strict'; | ||
|
||
/** | ||
* Jump forward button | ||
* | ||
* This feature creates a button to forward media a specific number of seconds. | ||
*/ | ||
|
||
// Translations (English required) | ||
mejs.i18n.en['mejs.time-jump-forward'] = ['Jump forward 1 second', 'Jump forward %1 seconds']; | ||
|
||
Object.assign(mejs.MepDefaults, { | ||
/** | ||
* @type {Number} | ||
*/ | ||
jumpForwardInterval: 30, | ||
/** | ||
* @type {?String} | ||
*/ | ||
jumpForwardText: null | ||
}); | ||
|
||
Object.assign(MediaElementPlayer.prototype, { | ||
/** | ||
* Feature constructor. | ||
* | ||
* Always has to be prefixed with `build` and the name that will be used in MepDefaults.features list | ||
* @param {MediaElementPlayer} player | ||
* @param {HTMLElement} controls | ||
* @param {HTMLElement} layers | ||
* @param {HTMLElement} media | ||
*/ | ||
buildjumpforward (player, controls, layers, media) { | ||
|
||
const | ||
t = this, | ||
defaultTitle = mejs.i18n.t('mejs.time-jump-forward', t.options.jumpForwardInterval), | ||
forwardTitle = mejs.Utils.isString(t.options.jumpForwardText) ? t.options.jumpForwardText.replace('%1', t.options.jumpForwardInterval) : defaultTitle, | ||
button = document.createElement('div') | ||
; | ||
|
||
button.className = `${t.options.classPrefix}button ${t.options.classPrefix}jump-forward-button`; | ||
button.innerHTML = `<button type="button" aria-controls="${t.id}" title="${forwardTitle}" aria-label="${forwardTitle}" tabindex="0">${t.options.jumpForwardInterval}</button>`; | ||
|
||
t.addControlElement(button, 'jumpforward'); | ||
|
||
// add a click toggle event | ||
button.addEventListener('click', function() { | ||
const duration = !isNaN(media.duration) ? media.duration : t.options.jumpForwardInterval; | ||
if (duration) { | ||
const current = media.currentTime === Infinity ? 0 : media.currentTime; | ||
media.setCurrentTime(Math.min(current + t.options.jumpForwardInterval, duration)); | ||
this.querySelector('button').blur(); | ||
} | ||
}); | ||
} | ||
}); |
71 changes: 71 additions & 0 deletions
71
vendor/assets/javascripts/mediaelement/plugins/skip-back/skip-back-i18n.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
'use strict'; | ||
|
||
if (mejs.i18n.ca !== undefined) { | ||
mejs.i18n.ca['mejs.time-skip-back'] = ['Retornar 1 segon', 'Retornar %1 segons']; | ||
} | ||
if (mejs.i18n.cs !== undefined) { | ||
mejs.i18n.cs['mejs.time-skip-back'] = ['Přeskočte zpět o 1 sekundu', 'Přeskočte zpět %1 vteřiny', 'Přeskočte zpět %1 sekund']; | ||
} | ||
if (mejs.i18n.de !== undefined) { | ||
mejs.i18n.de['mejs.time-skip-back'] = ['1 Sekunde zurückspulen', '%1 Sekunden zurückspulen']; | ||
} | ||
if (mejs.i18n.es !== undefined) { | ||
mejs.i18n.es['mejs.time-skip-back'] = ['Rebobinar 1 segundo', 'Rebobinar %1 segundos']; | ||
} | ||
if (mejs.i18n.fr !== undefined) { | ||
mejs.i18n.fr['mejs.time-skip-back'] = ['Reculer de %1 seconde', 'Reculer de %1 secondes']; | ||
} | ||
if (mejs.i18n.fa !== undefined) { | ||
mejs.i18n.fa['mejs.time-skip-back'] = '%1 ثانیه به عقب برگردید'; | ||
} | ||
if (mejs.i18n.hr !== undefined) { | ||
mejs.i18n.hr['mejs.time-skip-back'] = ['Skoči natrag 1 sekundu', 'Skoči natrag %1 sekunde', 'Skoči natrag %1 sekundi']; | ||
} | ||
if (mejs.i18n.hu !== undefined) { | ||
mejs.i18n.hu['mejs.time-skip-back'] = ['Menj vissza 1 másodpercig', 'Ugrás vissza %1 másodperccel']; | ||
} | ||
if (mejs.i18n.it !== undefined) { | ||
mejs.i18n.it['mejs.time-skip-back'] = ['Riavvolgere 1 secondo', 'Riavvolgere %1 secondi']; | ||
} | ||
if (mejs.i18n.ja !== undefined) { | ||
mejs.i18n.ja['mejs.time-skip-back'] = '%1秒スキップバックする'; | ||
} | ||
if (mejs.i18n.ko !== undefined) { | ||
mejs.i18n.ko['mejs.time-skip-back'] = '%1초 를 뒤로 건너뛰세요'; | ||
} | ||
if (mejs.i18n.ms !== undefined) { | ||
mejs.i18n.ms['mejs.time-skip-back'] = 'Undur masa %1 saat'; | ||
} | ||
if (mejs.i18n.nl !== undefined) { | ||
mejs.i18n.nl['mejs.time-skip-back'] = ['Sla 1 seconde terug', 'Sla %1 seconden terug']; | ||
} | ||
if (mejs.i18n.pl !== undefined) { | ||
mejs.i18n.pl['mejs.time-skip-back'] = ['Cofnij o 1 sekundę', 'Cofnij o %1 sekundy', 'Cofnij o %1 sekund']; | ||
} | ||
if (mejs.i18n.pt !== undefined) { | ||
mejs.i18n.pt['mejs.time-skip-back'] = ['Retroceder %1 segundo', 'Retroceder %1 segundos']; | ||
} | ||
if (mejs.i18n.ro !== undefined) { | ||
mejs.i18n.ro['mejs.time-skip-back'] = ['Treceți înapoi 1 secundă', 'Treceți înapoi în %1 secunde']; | ||
} | ||
if (mejs.i18n.ru !== undefined) { | ||
mejs.i18n.ru['mejs.time-skip-back'] = ['Перейти назад на %1 секунду', 'Перейти назад на %1 секунды', 'Перейти назад на %1 секунд']; | ||
} | ||
if (mejs.i18n.sk !== undefined) { | ||
mejs.i18n.sk['mejs.time-skip-back'] = ['Preskočte späť 1 sekundu', 'Preskočte %1 sekundy', 'Preskočte späť %1 sekúnd']; | ||
} | ||
if (mejs.i18n.sv !== undefined) { | ||
mejs.i18n.sv['mejs.time-skip-back'] = ['Hoppa tillbaka 1 sekund', 'Hoppa tillbaka %1 sekunder']; | ||
} | ||
if (mejs.i18n.tr !== undefined) { | ||
mejs.i18n.tr['mejs.time-skip-back'] = ['1 saniye geri sar', '%1 saniye geri sar']; | ||
} | ||
if (mejs.i18n.uk !== undefined) { | ||
mejs.i18n.uk['mejs.time-skip-back'] = ['Перейти назад на %1 секунду', 'Перейти назад на %1 секунди', 'Перейти назад на %1 секунд']; | ||
} | ||
if (mejs.i18n.zh !== undefined) { | ||
mejs.i18n.zh['mejs.time-skip-back'] = '跳躍式迴繞%1秒'; | ||
} | ||
if (mejs.i18n['zh-CN'] !== undefined) { | ||
mejs.i18n['zh-CN']['mejs.time-skip-back'] = '后退%1秒'; | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if we really want this in the embed player since we have limited space within the iframe, but it would be helpful in fullscreen mode and it might have to be in the normal size in order to be in fullscreen. What do other people think?
@joncameron
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel like this might be too much and cramp the rail even further. But I'm interested in at least testing it out on Spruce and feel it out. Maybe these could also sit outside of the MEjs features row.