diff --git a/docs/translations-needed.md b/docs/translations-needed.md index 657c0d8d93..8c9e99a904 100644 --- a/docs/translations-needed.md +++ b/docs/translations-needed.md @@ -9,13 +9,15 @@ If you add or update a translation run `grunt check-translations` to update the | Language file | Missing translations | | ----------------------- | ----------------------------------------------------------------------------------- | -| ar.json (missing 6) | Close Modal Dialog | +| ar.json (missing 7) | Replay | +| | Close Modal Dialog | | | Descriptions | | | descriptions off | | | Audio Track | | | The media is encrypted and we do not have the keys to decrypt it. | | | , opens descriptions settings dialog | -| ba.json (missing 14) | Close Modal Dialog | +| ba.json (missing 15) | Replay | +| | Close Modal Dialog | | | Descriptions | | | descriptions off | | | Audio Track | @@ -29,7 +31,8 @@ If you add or update a translation run `grunt check-translations` to update the | | , opens subtitles settings dialog | | | , opens descriptions settings dialog | | | , selected | -| bg.json (missing 14) | Close Modal Dialog | +| bg.json (missing 15) | Replay | +| | Close Modal Dialog | | | Descriptions | | | descriptions off | | | Audio Track | @@ -43,7 +46,8 @@ If you add or update a translation run `grunt check-translations` to update the | | , opens subtitles settings dialog | | | , opens descriptions settings dialog | | | , selected | -| ca.json (missing 14) | Close Modal Dialog | +| ca.json (missing 15) | Replay | +| | Close Modal Dialog | | | Descriptions | | | descriptions off | | | Audio Track | @@ -57,7 +61,8 @@ If you add or update a translation run `grunt check-translations` to update the | | , opens subtitles settings dialog | | | , opens descriptions settings dialog | | | , selected | -| cs.json (missing 14) | Close Modal Dialog | +| cs.json (missing 15) | Replay | +| | Close Modal Dialog | | | Descriptions | | | descriptions off | | | Audio Track | @@ -71,7 +76,8 @@ If you add or update a translation run `grunt check-translations` to update the | | , opens subtitles settings dialog | | | , opens descriptions settings dialog | | | , selected | -| da.json (missing 14) | Close Modal Dialog | +| da.json (missing 15) | Replay | +| | Close Modal Dialog | | | Descriptions | | | descriptions off | | | Audio Track | @@ -85,9 +91,10 @@ If you add or update a translation run `grunt check-translations` to update the | | , opens subtitles settings dialog | | | , opens descriptions settings dialog | | | , selected | -| de.json (Complete) | | -| el.json (Complete) | | -| es.json (missing 14) | Close Modal Dialog | +| de.json (missing 1) | Replay | +| el.json (missing 1) | Replay | +| es.json (missing 15) | Replay | +| | Close Modal Dialog | | | Descriptions | | | descriptions off | | | Audio Track | @@ -101,7 +108,8 @@ If you add or update a translation run `grunt check-translations` to update the | | , opens subtitles settings dialog | | | , opens descriptions settings dialog | | | , selected | -| fa.json (missing 14) | Close Modal Dialog | +| fa.json (missing 15) | Replay | +| | Close Modal Dialog | | | Descriptions | | | descriptions off | | | Audio Track | @@ -115,7 +123,8 @@ If you add or update a translation run `grunt check-translations` to update the | | , opens subtitles settings dialog | | | , opens descriptions settings dialog | | | , selected | -| fi.json (missing 14) | Close Modal Dialog | +| fi.json (missing 15) | Replay | +| | Close Modal Dialog | | | Descriptions | | | descriptions off | | | Audio Track | @@ -129,8 +138,9 @@ If you add or update a translation run `grunt check-translations` to update the | | , opens subtitles settings dialog | | | , opens descriptions settings dialog | | | , selected | -| fr.json (Complete) | | -| hr.json (missing 14) | Close Modal Dialog | +| fr.json (missing 1) | Replay | +| hr.json (missing 15) | Replay | +| | Close Modal Dialog | | | Descriptions | | | descriptions off | | | Audio Track | @@ -144,7 +154,8 @@ If you add or update a translation run `grunt check-translations` to update the | | , opens subtitles settings dialog | | | , opens descriptions settings dialog | | | , selected | -| hu.json (missing 14) | Close Modal Dialog | +| hu.json (missing 15) | Replay | +| | Close Modal Dialog | | | Descriptions | | | descriptions off | | | Audio Track | @@ -158,7 +169,8 @@ If you add or update a translation run `grunt check-translations` to update the | | , opens subtitles settings dialog | | | , opens descriptions settings dialog | | | , selected | -| it.json (missing 14) | Close Modal Dialog | +| it.json (missing 15) | Replay | +| | Close Modal Dialog | | | Descriptions | | | descriptions off | | | Audio Track | @@ -172,7 +184,8 @@ If you add or update a translation run `grunt check-translations` to update the | | , opens subtitles settings dialog | | | , opens descriptions settings dialog | | | , selected | -| ja.json (missing 14) | Close Modal Dialog | +| ja.json (missing 15) | Replay | +| | Close Modal Dialog | | | Descriptions | | | descriptions off | | | Audio Track | @@ -186,7 +199,8 @@ If you add or update a translation run `grunt check-translations` to update the | | , opens subtitles settings dialog | | | , opens descriptions settings dialog | | | , selected | -| ko.json (missing 14) | Close Modal Dialog | +| ko.json (missing 15) | Replay | +| | Close Modal Dialog | | | Descriptions | | | descriptions off | | | Audio Track | @@ -200,7 +214,8 @@ If you add or update a translation run `grunt check-translations` to update the | | , opens subtitles settings dialog | | | , opens descriptions settings dialog | | | , selected | -| nb.json (missing 14) | Close Modal Dialog | +| nb.json (missing 15) | Replay | +| | Close Modal Dialog | | | Descriptions | | | descriptions off | | | Audio Track | @@ -214,10 +229,12 @@ If you add or update a translation run `grunt check-translations` to update the | | , opens subtitles settings dialog | | | , opens descriptions settings dialog | | | , selected | -| nl.json (missing 3) | Close Modal Dialog | +| nl.json (missing 4) | Replay | +| | Close Modal Dialog | | | Audio Track | | | The media is encrypted and we do not have the keys to decrypt it. | -| nn.json (missing 14) | Close Modal Dialog | +| nn.json (missing 15) | Replay | +| | Close Modal Dialog | | | Descriptions | | | descriptions off | | | Audio Track | @@ -231,14 +248,16 @@ If you add or update a translation run `grunt check-translations` to update the | | , opens subtitles settings dialog | | | , opens descriptions settings dialog | | | , selected | -| pl.json (missing 7) | Close Modal Dialog | +| pl.json (missing 8) | Replay | +| | Close Modal Dialog | | | Descriptions | | | descriptions off | | | Audio Track | | | The media is encrypted and we do not have the keys to decrypt it. | | | Play Video | | | , opens descriptions settings dialog | -| pt-BR.json (missing 14) | Close Modal Dialog | +| pt-BR.json (missing 15) | Replay | +| | Close Modal Dialog | | | Descriptions | | | descriptions off | | | Audio Track | @@ -252,8 +271,9 @@ If you add or update a translation run `grunt check-translations` to update the | | , opens subtitles settings dialog | | | , opens descriptions settings dialog | | | , selected | -| ru.json (Complete) | | -| sr.json (missing 14) | Close Modal Dialog | +| ru.json (missing 1) | Replay | +| sr.json (missing 15) | Replay | +| | Close Modal Dialog | | | Descriptions | | | descriptions off | | | Audio Track | @@ -267,7 +287,8 @@ If you add or update a translation run `grunt check-translations` to update the | | , opens subtitles settings dialog | | | , opens descriptions settings dialog | | | , selected | -| sv.json (missing 14) | Close Modal Dialog | +| sv.json (missing 15) | Replay | +| | Close Modal Dialog | | | Descriptions | | | descriptions off | | | Audio Track | @@ -281,14 +302,16 @@ If you add or update a translation run `grunt check-translations` to update the | | , opens subtitles settings dialog | | | , opens descriptions settings dialog | | | , selected | -| tr.json (missing 6) | Close Modal Dialog | +| tr.json (missing 7) | Replay | +| | Close Modal Dialog | | | Descriptions | | | descriptions off | | | Audio Track | | | The media is encrypted and we do not have the keys to decrypt it. | | | , opens descriptions settings dialog | -| uk.json (Complete) | | -| vi.json (missing 14) | Close Modal Dialog | +| uk.json (missing 1) | Replay | +| vi.json (missing 15) | Replay | +| | Close Modal Dialog | | | Descriptions | | | descriptions off | | | Audio Track | @@ -302,7 +325,8 @@ If you add or update a translation run `grunt check-translations` to update the | | , opens subtitles settings dialog | | | , opens descriptions settings dialog | | | , selected | -| zh-CN.json (missing 13) | Close Modal Dialog | +| zh-CN.json (missing 14) | Replay | +| | Close Modal Dialog | | | Descriptions | | | descriptions off | | | Audio Track | @@ -315,5 +339,5 @@ If you add or update a translation run `grunt check-translations` to update the | | , opens subtitles settings dialog | | | , opens descriptions settings dialog | | | , selected | -| zh-TW.json (Complete) | | +| zh-TW.json (missing 1) | Replay | diff --git a/lang/en.json b/lang/en.json index 0ce9413798..a31b1957c1 100644 --- a/lang/en.json +++ b/lang/en.json @@ -1,6 +1,7 @@ { "Play": "Play", "Pause": "Pause", + "Replay": "Replay", "Current Time": "Current Time", "Duration Time": "Duration Time", "Remaining Time": "Remaining Time", diff --git a/src/css/components/_play-pause.scss b/src/css/components/_play-pause.scss index abbe6e7b43..7e2f73792f 100644 --- a/src/css/components/_play-pause.scss +++ b/src/css/components/_play-pause.scss @@ -6,3 +6,6 @@ .video-js .vjs-play-control.vjs-playing { @extend .vjs-icon-pause; } +.video-js .vjs-play-control.vjs-ended { + @extend .vjs-icon-replay; +} diff --git a/src/js/control-bar/play-toggle.js b/src/js/control-bar/play-toggle.js index e20894cef0..28dc868871 100644 --- a/src/js/control-bar/play-toggle.js +++ b/src/js/control-bar/play-toggle.js @@ -25,6 +25,7 @@ class PlayToggle extends Button { this.on(player, 'play', this.handlePlay); this.on(player, 'pause', this.handlePause); + this.on(player, 'ended', this.handleEnded); } /** @@ -65,6 +66,7 @@ class PlayToggle extends Button { * @listens Player#play */ handlePlay(event) { + this.removeClass('vjs-ended'); this.removeClass('vjs-paused'); this.addClass('vjs-playing'); // change the button text to "Pause" @@ -86,6 +88,17 @@ class PlayToggle extends Button { this.controlText('Play'); } + /** + * Add the vjs-ended class to the element so it can change appearance + * + * @method handleEnded + */ + handleEnded(event) { + this.removeClass('vjs-playing'); + this.addClass('vjs-ended'); + // change the button text to "Replay" + this.controlText('Replay'); + } } /**