File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -10,13 +10,16 @@ import 'utils.dart';
1010class MediaStreamTrackWeb extends MediaStreamTrack {
1111 MediaStreamTrackWeb (this .jsTrack) {
1212 if (onEnded != null ) {
13- jsTrack.addEventListener ('ended' , onEnded? .toJS);
13+ void Function (JSAny ) onEndedCallback = (event) => onEnded? .call ();
14+ jsTrack.addEventListener ('ended' , onEndedCallback.toJS);
1415 }
1516 if (onMute != null ) {
16- jsTrack.addEventListener ('mute' , onMute? .toJS);
17+ void Function (JSAny ) onMuteCallback = (event) => onMute? .call ();
18+ jsTrack.addEventListener ('mute' , onMuteCallback.toJS);
1719 }
1820 if (onUnMute != null ) {
19- jsTrack.addEventListener ('unmute' , onUnMute? .toJS);
21+ void Function (JSAny ) onUnmuteCallback = (event) => onUnMute? .call ();
22+ jsTrack.addEventListener ('unmute' , onUnmuteCallback.toJS);
2023 }
2124 }
2225
You can’t perform that action at this time.
0 commit comments