Skip to content

Commit ed4b27c

Browse files
authored
Merge pull request #794 from yilinwei/main
Allow `MediaSource` to be passed in to `URL.createObjectURL`
2 parents fc86449 + 053fa19 commit ed4b27c

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

api-reports/2_12.txt

+1
Original file line numberDiff line numberDiff line change
@@ -26182,6 +26182,7 @@ URL[JC] var search: String
2618226182
URL[JC] var searchParams: URLSearchParams
2618326183
URL[JC] var username: String
2618426184
URL[JO] def createObjectURL(blob: Blob): String
26185+
URL[JO] def createObjectURL(src: MediaSource): String
2618526186
URL[JO] def revokeObjectURL(url: String): Unit
2618626187
URLSearchParams[JC] def append(name: String, value: String): Unit
2618726188
URLSearchParams[JC] def delete(name: String): Unit

api-reports/2_13.txt

+1
Original file line numberDiff line numberDiff line change
@@ -26182,6 +26182,7 @@ URL[JC] var search: String
2618226182
URL[JC] var searchParams: URLSearchParams
2618326183
URL[JC] var username: String
2618426184
URL[JO] def createObjectURL(blob: Blob): String
26185+
URL[JO] def createObjectURL(src: MediaSource): String
2618526186
URL[JO] def revokeObjectURL(url: String): Unit
2618626187
URLSearchParams[JC] def append(name: String, value: String): Unit
2618726188
URLSearchParams[JC] def delete(name: String): Unit

dom/src/main/scala/org/scalajs/dom/URL.scala

+4-1
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,12 @@ object URL extends js.Object {
1616

1717
/** The URL.createObjectURL() static method creates a DOMString containing an URL representing the object given in
1818
* parameter. The URL lifetime is tied to the document in the window on which it was created. The new object URL
19-
* represents the specified File object or Blob object.
19+
* represents the specified File, Blob or MediaSource object.
2020
*/
2121
def createObjectURL(blob: Blob): String = js.native
22+
23+
def createObjectURL(src: MediaSource): String = js.native
24+
2225
}
2326

2427
/** The URL() constructor returns a newly created URL object representing the URL defined by the parameters. */

0 commit comments

Comments
 (0)