@@ -80,14 +80,14 @@ def _apply_latest(self) -> None:
8080
8181
8282@magicgui (
83- image = {"label" : "video layer" }, call_button = " Play audio" , volume_dB = {"widget_type" : "FloatSlider" , "min" : - 20 , "max" : 60 })
83+ image = {"label" : "video layer" }, call_button = " Play with audio" , volume_dB = {"widget_type" : "FloatSlider" , "min" : - 20 , "max" : 60 })
8484def _av_widget_function (image : Image , viewer : napari .Viewer , playback_speed : float = 1.0 , volume_dB : float = 20.0 , rewind : bool = True ):
8585
8686 if GLOBAL_STATE ["playing" ]:
8787 GLOBAL_STATE ["audio_stream" ].stop ()
8888 GLOBAL_STATE ["playing" ] = False
8989 _av_widget_function .call_button .set_icon ("play" )
90- _av_widget_function .call_button .text = " Play audio"
90+ _av_widget_function .call_button .text = " Play with audio"
9191 return
9292
9393 video_reader_obj = image .data
@@ -127,7 +127,7 @@ def callback(outdata, frames, time, status):
127127 except StopIteration :
128128 GLOBAL_STATE ["playing" ] = False
129129 _av_widget_function .call_button .set_icon ("play" )
130- _av_widget_function .call_button .text = " Play audio"
130+ _av_widget_function .call_button .text = " Play with audio"
131131 if rewind :
132132 setter .request (0 )
133133 ar .seek (0 )
@@ -138,7 +138,7 @@ def callback(outdata, frames, time, status):
138138 audio_stream .start ()
139139 GLOBAL_STATE ["playing" ] = True
140140 _av_widget_function .call_button .set_icon ("pause" )
141- _av_widget_function .call_button .text = " Pause audio "
141+ _av_widget_function .call_button .text = " Pause"
142142 GLOBAL_STATE ["audio_stream" ] = audio_stream
143143
144144
0 commit comments