You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
message.current.textContent=__('Autoplay will cause the video to be muted in many browsers to prevent a poor user experience. It will be muted in AMP for this reason as well.','amp');
408
+
409
+
mutedToggleContainer.append(message.current);
410
+
},1);
411
+
}elseif(!showMessage&&message.current){
412
+
message.current.remove();
413
+
message.current=null;
414
+
}
415
+
},[autoplay,blockTypeDescription,muted]);
366
416
367
417
return(
368
418
<InspectorControls>
369
-
{(true===autoplay&&true!==muted)&&(
370
-
<PanelBodyclassName="amp-video-autoplay-notice">
371
-
{__('Autoplay will mute the video player by default in AMP mode.','amp')}
constautoplayNotice='Autoplay may cause usability issues for some users.';
21
+
constmutedNotice='Autoplay will cause the video to be muted in many browsers to prevent a poor user experience. It will be muted in AMP for this reason as well.';
22
+
23
+
/**
24
+
* Tests the notices for the featured image.
25
+
*/
26
+
describe('Video Block Muted Notice',()=>{
27
+
beforeEach(async()=>{
28
+
awaitcreateNewPost({postType: 'post'});
29
+
});
30
+
31
+
it('displays a message only if the autoplay is turned on and the muted option is off',async()=>{
0 commit comments