diff --git a/files/en-us/web/api/mediaerror/message/index.md b/files/en-us/web/api/mediaerror/message/index.md index 5a0a6ec4b877769..9ced4232e860628 100644 --- a/files/en-us/web/api/mediaerror/message/index.md +++ b/files/en-us/web/api/mediaerror/message/index.md @@ -8,83 +8,83 @@ browser-compat: api.MediaError.message {{APIRef("HTML DOM")}} -The read-only property **`MediaError.message`** returns a -human-readable string offering specific -diagnostic details related to the error described by the `MediaError` object, -or an empty string (`""`) if no diagnostic information can be determined or -provided. +The read-only property **`MediaError.message`** returns a human-readable string offering specific diagnostic details related to the error described by the `MediaError` object, or an empty string (`""`) if no diagnostic information can be determined or provided. ## Value -A string providing a detailed, specific explanation of what went -wrong and possibly how it might be fixed. This is _not_ a generic description of -the {{domxref("MediaError.code")}} property's value, but instead goes deeper into the -specifics of this particular error and its circumstances. If no specific details are -available, this string is empty. +A string providing a detailed, specific explanation of what went wrong and possibly how it might be fixed. This is _not_ a generic description of the {{domxref("MediaError.code")}} property's value, but instead goes deeper into the specifics of this particular error and its circumstances. +If no specific details are available, this string is empty. ## Examples -This example creates an {{HTMLElement("audio")}} element, establishes an error handler -for it, then lets the user click buttons to choose whether to assign a valid audio file -or a missing file to the element's [`src`](/en-US/docs/Web/HTML/Reference/Elements/audio#src) attribute. The error -handler outputs a message to a box onscreen describing the error, including both the -`code` and the `message`. +This example creates an {{HTMLElement("audio")}} element, establishes an error handler for it, then lets the user click buttons to choose whether to assign a valid audio file or a missing file to the element's [`src`](/en-US/docs/Web/HTML/Reference/Elements/audio#src) attribute. +The error handler outputs a message to a box onscreen describing the error, including both the `code` and the `message`. -Only the relevant parts of the code are displayed; you can [see the complete source code here](https://github.com/mdn/dom-examples/tree/main/media/mediaerror). +```html + +
+ + +
+

+```
 
-The example creates an {{HTMLElement("audio")}} element and lets the user assign either
-a valid music file to it, or a link to a file which doesn't exist. This lets us see the
-behavior of the {{domxref("HTMLMediaElement/error_event", "error")}} event handler, which is received by an event handler
-we add to the `