Skip to content

Commit

Permalink
Multimedia: Expose the text version of the current total time
Browse files Browse the repository at this point in the history
  • Loading branch information
LaurentGoderre committed Dec 12, 2013
1 parent c7f3827 commit e026d44
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 24 deletions.
4 changes: 2 additions & 2 deletions src/plugins/multimedia/multimedia.js
Expand Up @@ -824,7 +824,7 @@ $document.on( "durationchange play pause ended volumechange timeupdate " +
Math.round( currentTime / eventTarget.player( "getDuration" ) * 1000 ) / 10
);

$this.find( ".wb-mm-tmln-crrnt span" )
$this.find( ".wb-mm-tmln-crrnt span:nth-child(2)" )
.text( formatTime( currentTime ) );

if ( $this.hasClass( captionClass ) && $.data( eventTarget, "captions" ) !== undef ) {
Expand All @@ -837,7 +837,7 @@ $document.on( "durationchange play pause ended volumechange timeupdate " +
break;

case "durationchange":
$this.find( ".wb-mm-tmln-ttl span" )
$this.find( ".wb-mm-tmln-ttl span:nth-child(2)" )
.text( formatTime( eventTarget.player( "getDuration" ) ) );
break;

Expand Down
54 changes: 32 additions & 22 deletions src/plugins/multimedia/multimedia.scss
Expand Up @@ -2,12 +2,8 @@
Multimedia Player Code
*/

%multimedia-display-none {
display: none;
}

%multimedia-display-block {
display: block;
%multimedia-display-none {
display: none;
}

@keyframes spin {
Expand Down Expand Up @@ -188,7 +184,9 @@
}

.wb-mm-txtonly {
@extend %multimedia-display-none;
span {
@extend %accessible-invisible;
}
}

/* Progress Bar */
Expand All @@ -211,23 +209,35 @@

//TODO: Cleanup placeholders when libsass supports nested selectors
.xxsmallview {
.wb-mm-txtonly {
@extend %multimedia-display-block;
}
.wb-mm-txtonly {
span {
~ {
span {
@extend %accessible-invisible-show;
}
}
}
}

.wb-mm-prgrss {
@extend %multimedia-display-none;
}
.wb-mm-prgrss {
@extend %multimedia-display-none;
}
}

.mediumview, .largeview, .xlargeview, .xxlargeview {
.col-md-1, .col-md-2, .col-md-3 {
.wb-mm-txtonly {
@extend %multimedia-display-block;
}

.wb-mm-prgrss {
@extend %multimedia-display-none;
}
}
.col-md-1, .col-md-2, .col-md-3 {
.wb-mm-txtonly {
span {
~ {
span {
@extend %accessible-invisible-show;
}
}
}
}

.wb-mm-prgrss {
@extend %multimedia-display-none;
}
}
}

0 comments on commit e026d44

Please sign in to comment.