File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed
Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change 931931 elt . addEventListener ( 'loadedmetadata' , function ( ) {
932932 c . width = elt . videoWidth ;
933933 c . height = elt . videoHeight ;
934+ //c.elt.playbackRate = s;
934935 // set elt width and height if not set
935936 if ( c . elt . width === 0 ) c . elt . width = elt . videoWidth ;
936937 if ( c . elt . height === 0 ) c . elt . height = elt . videoHeight ;
938+ if ( c . presetPlaybackRate ) {
939+ c . elt . playbackRate = c . presetPlaybackRate ;
940+ delete c . presetPlaybackRate ;
941+ }
937942 c . loadedmetadata = true ;
938943 } ) ;
939944
24522457 */
24532458 p5 . MediaElement . prototype . speed = function ( val ) {
24542459 if ( typeof val === 'undefined' ) {
2455- return this . elt . playbackRate ;
2460+ return this . presetPlaybackRate || this . elt . playbackRate ;
24562461 } else {
2457- this . elt . playbackRate = val ;
2462+ if ( this . loadedmetadata ) {
2463+ this . elt . playbackRate = val ;
2464+ } else {
2465+ this . presetPlaybackRate = val ;
2466+ }
24582467 }
24592468 } ;
24602469
You can’t perform that action at this time.
0 commit comments