File tree 2 files changed +9
-2
lines changed
src/compiler/compile/render_dom/wrappers/Element
test/js/samples/media-bindings
2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -140,6 +140,7 @@ export default class BindingWrapper {
140
140
case 'playbackRate' :
141
141
case 'volume' :
142
142
update_conditions . push ( x `!@_isNaN(${ this . snippet } )` ) ;
143
+ mount_conditions . push ( x `!@_isNaN(${ this . snippet } )` ) ;
143
144
break ;
144
145
145
146
case 'paused' :
Original file line number Diff line number Diff line change @@ -58,8 +58,14 @@ function create_fragment(ctx) {
58
58
} ,
59
59
m ( target , anchor ) {
60
60
insert ( target , audio , anchor ) ;
61
- audio . volume = ctx . volume ;
62
- audio . playbackRate = ctx . playbackRate ;
61
+
62
+ if ( ! isNaN ( ctx . volume ) ) {
63
+ audio . volume = ctx . volume ;
64
+ }
65
+
66
+ if ( ! isNaN ( ctx . playbackRate ) ) {
67
+ audio . playbackRate = ctx . playbackRate ;
68
+ }
63
69
} ,
64
70
p ( changed , ctx ) {
65
71
if ( ! audio_updating && changed . currentTime && ! isNaN ( ctx . currentTime ) ) {
You can’t perform that action at this time.
0 commit comments