Skip to content

Commit

Permalink
Multimedia: Dropped the fast froward and rewind buttons
Browse files Browse the repository at this point in the history
Fixes (#5175)
  • Loading branch information
LaurentGoderre committed Jun 3, 2014
1 parent 3cd3144 commit a45ce94
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 9 deletions.
2 changes: 0 additions & 2 deletions src/i18n/base.js
Expand Up @@ -73,8 +73,6 @@ wb.i18nDict = {
pause: "@pause@", pause: "@pause@",
open: "@open@", open: "@open@",
close: "@close@", close: "@close@",
rew: "@rew@",
ffwd: "@ffwd@",
mute: { mute: {
on: "@mute-on@", on: "@mute-on@",
off: "@mute-off@" off: "@mute-off@"
Expand Down
2 changes: 0 additions & 2 deletions src/plugins/multimedia/assets/mediacontrols.html
Expand Up @@ -12,9 +12,7 @@


<div class="frstpnl"> <div class="frstpnl">
<div class="btn-group"> <div class="btn-group">
<button type="button" class="btn btn-default rewind" aria-controls="{{mId}}" title="{{rewind}}" data-role="none"><span class="glyphicon glyphicon-backward"><span class="wb-inv">{{rewind}}</span></span></button>
<button type="button" class="btn btn-default playpause" aria-controls="{{mId}}" title="{{play}}" data-state-on="{{play}}" data-state-off="{{pause}}" data-role="none"><span class="glyphicon glyphicon-play"><span class="wb-inv">{{play}}</span></span></button> <button type="button" class="btn btn-default playpause" aria-controls="{{mId}}" title="{{play}}" data-state-on="{{play}}" data-state-off="{{pause}}" data-role="none"><span class="glyphicon glyphicon-play"><span class="wb-inv">{{play}}</span></span></button>
<button type="button" class="btn btn-default fastforward" aria-controls="{{mId}}" title="{{ff}}" data-role="none"><span class="glyphicon glyphicon-forward"><span class="wb-inv">{{ff}}</span></span></button>
</div> </div>
</div> </div>


Expand Down
8 changes: 3 additions & 5 deletions src/plugins/multimedia/multimedia.js
Expand Up @@ -50,8 +50,6 @@ var pluginName = "wb-mltmd",
if ( !i18nText ) { if ( !i18nText ) {
i18n = wb.i18n; i18n = wb.i18n;
i18nText = { i18nText = {
rewind: i18n( "rew" ),
ff: i18n( "ffwd" ),
play: i18n( "play" ), play: i18n( "play" ),
pause: i18n( "pause" ), pause: i18n( "pause" ),
cc_on: i18n( "cc", "on" ), cc_on: i18n( "cc", "on" ),
Expand Down Expand Up @@ -768,7 +766,7 @@ $document.on( "click", selector, function( event ) {
return true; return true;
} }


// Opitmized multiple class tests to include child glyphicon because Safari was reporting the click event // Optimized multiple class tests to include child glyphicon because Safari was reporting the click event
// from the child span not the parent button, forcing us to have to check for both elements // from the child span not the parent button, forcing us to have to check for both elements
// JSPerf for multiple class matching http://jsperf.com/hasclass-vs-is-stackoverflow/7 // JSPerf for multiple class matching http://jsperf.com/hasclass-vs-is-stackoverflow/7
if ( className.match( /playpause|-play|-pause|wb-mm-ovrly/ ) || $target.is( "object" ) ) { if ( className.match( /playpause|-play|-pause|wb-mm-ovrly/ ) || $target.is( "object" ) ) {
Expand Down Expand Up @@ -801,11 +799,11 @@ $document.on( "keydown", selector, function( event ) {
break; break;


case 37: case 37:
$this.find( ctrls + " .rewind" ).trigger( "click" ); playerTarget.player( "setCurrentTime", this.player( "getCurrentTime" ) - this.player( "getDuration" ) * 0.05);
break; break;


case 39: case 39:
$this.find( ctrls + " .fastforward" ).trigger( "click" ); playerTarget.player( "setCurrentTime", this.player( "getCurrentTime" ) + this.player( "getDuration" ) * 0.05);
break; break;


case 38: case 38:
Expand Down

0 comments on commit a45ce94

Please sign in to comment.