-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[WebM] MediaPlayerPrivateWebM can never enter in error state
https://bugs.webkit.org/show_bug.cgi?id=264931 rdar://118499989 Reviewed by Youenn Fablet. Parser return value wasn't read, therefore we couldn't detect errors. * LayoutTests/media/content/opus_variable_witherror.webm: Added. * LayoutTests/media/media-webm-opus-error-expected.txt: Added. * LayoutTests/media/media-webm-opus-error.html: Added. * LayoutTests/platform/mac-wk1/TestExpectations: * Source/WebCore/platform/graphics/cocoa/MediaPlayerPrivateWebM.h: * Source/WebCore/platform/graphics/cocoa/MediaPlayerPrivateWebM.mm: (WebCore::MediaPlayerPrivateWebM::appendCompleted): (WebCore::MediaPlayerPrivateWebM::append): Canonical link: https://commits.webkit.org/270938@main
- Loading branch information
Showing
7 changed files
with
50 additions
and
6 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
|
||
Check that a webm with garbage content at the end generate an error. | ||
|
||
EXPECTED (audio.canPlayType('audio/webm; codecs=opus') == 'probably') OK | ||
RUN(audio.src = "content/opus_variable_witherror.webm") | ||
EVENT(loadedmetadata) | ||
EXPECTED (audio.duration >= '0.98') OK | ||
EVENT(error) | ||
END OF TEST | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<script src="video-test.js"></script> | ||
<script> | ||
var audio = null; | ||
async function start() { | ||
audio = mediaElement = document.getElementsByTagName('audio')[0]; | ||
|
||
testExpected("audio.canPlayType('audio/webm; codecs=opus')", "probably"); | ||
waitForEvent('error', endTest); | ||
run('audio.src = "content/opus_variable_witherror.webm"'); | ||
await waitFor(audio, 'loadedmetadata'); | ||
testExpected('audio.duration', '0.98', '>='); | ||
} | ||
</script> | ||
</head> | ||
<body onload="start()"> | ||
<audio controls></audio> | ||
<p>Check that a webm with garbage content at the end generate an error.</p> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters