diff --git a/dom/html/HTMLMediaElement.cpp b/dom/html/HTMLMediaElement.cpp index b5028da0f356..be1ea06dfcac 100644 --- a/dom/html/HTMLMediaElement.cpp +++ b/dom/html/HTMLMediaElement.cpp @@ -3286,18 +3286,6 @@ void HTMLMediaElement::MetadataLoaded(const MediaInfo* aInfo, #endif // MOZ_EME } - // Expose the tracks to JS directly. - for (OutputMediaStream& out : mOutputStreams) { - if (aInfo->HasAudio()) { - TrackID audioTrackId = aInfo->mAudio.mTrackId; - out.mStream->CreateOwnDOMTrack(audioTrackId, MediaSegment::AUDIO); - } - if (aInfo->HasVideo()) { - TrackID videoTrackId = aInfo->mVideo.mTrackId; - out.mStream->CreateOwnDOMTrack(videoTrackId, MediaSegment::VIDEO); - } - } - // If this element had a video track, but consists only of an audio track now, // delete the VideoFrameContainer. This happens when the src is changed to an // audio only file.