[mediacapture-main] Is onended event only applicable to a MediaStreamTrack from getUserMedia()? (#710)

guest271314 has just created a new issue for https://github.com/w3c/mediacapture-main:

== Is onended event only applicable to a MediaStreamTrack from getUserMedia()? ==
Consider navigating to https://upload.wikimedia.org/wikipedia/commons/a/a4/Xacti-AC8EX-Sample_video-001.ogv to avoid cross-origin request and running this code

```
      var video = document.createElement('video');
      video.autoplay = true;
      video.onplay = e => {
        const ms = video.captureStream();
        const [audioTrack] = ms.getAudioTracks();
        console.log(audioTrack);
        audioTrack.onended = e => console.log(e);
        audioTrack.stop();
        console.log(audioTrack.ended);
      }
      video.src = 'https://upload.wikimedia.org/wikipedia/commons/a/a4/Xacti-AC8EX-Sample_video-001.ogv';
```

and also running this code 

```
    var ac = new AudioContext();
    var msd = new MediaStreamAudioDestinationNode(ac);
    var {stream} = msd;
    var [audioTrack] = stream.getAudioTracks();
    audioTrack.onended = e => console.log(e);
    audioTracl.stop();
    console.log(audioTrack.ended);
```

[`onended` ](https://w3c.github.io/mediacapture-main/#dom-mediastreamtrack-onended) is never fired.

Is onended event only applicable to a `MediaStreamTrack` from `getUserMedia()`?

Please view or discuss this issue at https://github.com/w3c/mediacapture-main/issues/710 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Wednesday, 12 August 2020 16:00:49 UTC