mirror of
https://github.com/servo/servo.git
synced 2025-08-07 06:25:32 +01:00
Auto merge of #23103 - ferjm:srcObject, r=Manishearth
Implement srcObject logic for Blob media providers - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] There are tests for these changes <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/23103) <!-- Reviewable:end -->
This commit is contained in:
commit
b9b729caa0
4 changed files with 115 additions and 14 deletions
|
@ -0,0 +1,31 @@
|
|||
<!doctype html>
|
||||
<meta charset="utf-8">
|
||||
<title>HTMLMediaElement.srcObject blob</title>
|
||||
<script src='/common/media.js'></script>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<video></video>
|
||||
<script>
|
||||
async_test(function(t) {
|
||||
t.step(function() {
|
||||
fetch(getVideoURI('/media/movie_5'))
|
||||
.then(function(response) {
|
||||
return response.blob();
|
||||
})
|
||||
.then(function(blob) {
|
||||
let video = document.querySelector("video");
|
||||
video.srcObject = blob;
|
||||
video.addEventListener('ended', function() {
|
||||
t.done();
|
||||
});
|
||||
video.play().catch(function(error) {
|
||||
assert(false, error);
|
||||
});
|
||||
})
|
||||
.catch(function(error) {
|
||||
assert(false, error);
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue