Skip to content

Commit

Permalink
Ff128 Blob.bytes() supported (#34310)
Browse files Browse the repository at this point in the history
* FF128 supports Blob.bytes()

* FF128 relnote

* domxref > jsxref for typed array
  • Loading branch information
hamishwillee committed Jun 24, 2024
1 parent 786234b commit 55dc6f0
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 0 deletions.
1 change: 1 addition & 0 deletions files/en-us/mozilla/firefox/releases/128/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ This article provides information about the changes in Firefox 128 that affect d
### APIs

- {{domxref('RTCRtpReceiver.getParameters()')}} and {{domxref('RTCRtpSender.getParameters()')}} are now supported, returning an object that describes the current codecs used for the encoding and transmission of media on the receiver and sender tracks, respectively. ([Firefox bug 1534687](https://bugzil.la/1534687)).
- {{domxref('Blob.bytes()')}} is supported for returning the data from a {{domxref('Blob')}} as an array of bytes in a {{jsxref("Uint8Array")}} object. ([Firefox bug 1896509](https://bugzil.la/1896509)).
- {{domxref('MediaKeys.getStatusForPolicy()')}} is now supported for checking whether the CDM module, which is used to decrypt DRM protected content, would allow the presentation of encrypted media data for a "hypothetical" key based on specified policy requirements such as the HDCP version supported by the system.
This provides an application with a simple mechanism to know in advance whether playback at the optimal resolution will be allowed, without having to create a media key session or fetch a real license. ([Firefox bug 1878714](https://bugzil.la/1878714)).

Expand Down
39 changes: 39 additions & 0 deletions files/en-us/web/api/blob/bytes/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
---
title: "Blob: bytes() method"
short-title: bytes()
slug: Web/API/Blob/bytes
page-type: web-api-instance-method
browser-compat: api.Blob.bytes
---

{{APIRef("File API")}}{{AvailableInWorkers}}

The **`bytes()`** method of the {{domxref("Blob")}} interface returns a {{jsxref("Promise")}} that resolves with a {{jsxref("Uint8Array")}} containing the contents of the blob as an array of bytes.

## Syntax

```js-nolint
bytes()
```

### Parameters

None.

### Return value

A {{jsxref("Promise")}} that fulfills with a {{jsxref("Uint8Array")}} object containing the blob data.

### Exceptions

The method will reject the returned {{jsxref("Promise")}} if, for example, the reader used to fetch the blob's data throws an exception.

## Specifications

{{Specifications}}

## Browser compatibility

{{Compat}}

## See also
2 changes: 2 additions & 0 deletions files/en-us/web/api/blob/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ The APIs accepting `Blob` objects are also listed in the {{DOMxRef("File")}} doc

- {{DOMxRef("Blob.arrayBuffer()")}}
- : Returns a promise that resolves with an {{jsxref("ArrayBuffer")}} containing the entire contents of the `Blob` as binary data.
- {{DOMxRef("Blob.bytes()")}}
- : Returns a promise that resolves with an {{jsxref("Uint8Array")}} containing the contents of the `Blob`.
- {{DOMxRef("Blob.slice()")}}
- : Returns a new `Blob` object containing the data in the specified range of bytes of the blob on which it's called.
- {{DOMxRef("Blob.stream()")}}
Expand Down

0 comments on commit 55dc6f0

Please sign in to comment.