diff --git a/content/html/content/src/HTMLMediaElement.cpp b/content/html/content/src/HTMLMediaElement.cpp
index e0cb50e3e45b..0beaa9bfed36 100755
--- a/content/html/content/src/HTMLMediaElement.cpp
+++ b/content/html/content/src/HTMLMediaElement.cpp
@@ -3095,14 +3095,6 @@ void HTMLMediaElement::UpdateReadyStateForData(MediaDecoderOwner::NextFrameStatu
return;
}
- // Section 2.4.3.1 of the Media Source Extensions spec requires
- // changing to HAVE_METADATA when seeking into an unbuffered
- // range.
- if (aNextFrame == MediaDecoderOwner::NEXT_FRAME_WAIT_FOR_MSE_DATA) {
- ChangeReadyState(nsIDOMHTMLMediaElement::HAVE_METADATA);
- return;
- }
-
if (aNextFrame == MediaDecoderOwner::NEXT_FRAME_UNAVAILABLE_SEEKING) {
ChangeReadyState(nsIDOMHTMLMediaElement::HAVE_METADATA);
return;
diff --git a/content/media/MediaDecoderOwner.h b/content/media/MediaDecoderOwner.h
index cdbac3a9a1bb..f3187d4dafaa 100644
--- a/content/media/MediaDecoderOwner.h
+++ b/content/media/MediaDecoderOwner.h
@@ -114,9 +114,6 @@ public:
NEXT_FRAME_UNAVAILABLE_SEEKING,
// The next frame of audio/video is unavailable for some other reasons
NEXT_FRAME_UNAVAILABLE,
- // The next frame is unavailable due to waiting for more Media Source
- // Extensions data to become available.
- NEXT_FRAME_WAIT_FOR_MSE_DATA,
// Sentinel value
NEXT_FRAME_UNINITIALIZED
};
diff --git a/content/media/mediasource/MediaSourceReader.cpp b/content/media/mediasource/MediaSourceReader.cpp
index 25ddcb6feccc..afa5ce2f52a1 100644
--- a/content/media/mediasource/MediaSourceReader.cpp
+++ b/content/media/mediasource/MediaSourceReader.cpp
@@ -371,25 +371,6 @@ MediaSourceReader::OnTrackBufferConfigured(TrackBuffer* aTrackBuffer, const Medi
mDecoder->NotifyWaitingForResourcesStatusChanged();
}
-class ChangeToHaveMetadata : public nsRunnable {
-public:
- explicit ChangeToHaveMetadata(AbstractMediaDecoder* aDecoder) :
- mDecoder(aDecoder)
- {
- }
-
- NS_IMETHOD Run() MOZ_OVERRIDE MOZ_FINAL {
- auto owner = mDecoder->GetOwner();
- if (owner) {
- owner->UpdateReadyStateForData(MediaDecoderOwner::NEXT_FRAME_WAIT_FOR_MSE_DATA);
- }
- return NS_OK;
- }
-
-private:
- nsRefPtr mDecoder;
-};
-
void
MediaSourceReader::WaitForTimeRange(int64_t aTime)
{
@@ -434,11 +415,6 @@ MediaSourceReader::Seek(int64_t aTime, int64_t aStartTime, int64_t aEndTime,
mLastAudioTime = aTime;
mLastVideoTime = aTime;
- if (!TrackBuffersContainTime(aTime)) {
- MSE_DEBUG("MediaSourceReader(%p)::Seek no active buffer contains target=%lld", this, aTime);
- NS_DispatchToMainThread(new ChangeToHaveMetadata(mDecoder));
- }
-
WaitForTimeRange(aTime);
if (IsShutdown()) {
diff --git a/content/media/mediasource/test/mochitest.ini b/content/media/mediasource/test/mochitest.ini
index 7701e71e4bbd..8ca2c7bfaf8e 100644
--- a/content/media/mediasource/test/mochitest.ini
+++ b/content/media/mediasource/test/mochitest.ini
@@ -5,10 +5,11 @@ support-files =
seek.webm seek.webm^headers^
seek_lowres.webm seek_lowres.webm^headers^
-[test_BufferedSeek.html]
-[test_FrameSelection.html]
[test_MediaSource.html]
[test_MediaSource_disabled.html]
+[test_BufferedSeek.html]
+[test_FrameSelection.html]
+[test_HaveMetadataUnbufferedSeek.html]
[test_SeekableAfterEndOfStream.html]
[test_SeekableAfterEndOfStreamSplit.html]
[test_SeekableBeforeEndOfStream.html]
diff --git a/content/media/mediasource/test/test_HaveMetadataUnbufferedSeek.html b/content/media/mediasource/test/test_HaveMetadataUnbufferedSeek.html
new file mode 100644
index 000000000000..6f569fc84262
--- /dev/null
+++ b/content/media/mediasource/test/test_HaveMetadataUnbufferedSeek.html
@@ -0,0 +1,48 @@
+
+
+
+ MSE: seekable attribute before end of stream
+
+
+
+
+
+
+
+
+
+