|
2441 | 2441 | EncodedAudioChunk Interface {#encodedaudiochunk-interface} |
2442 | 2442 | ------------------------------------------------------------ |
2443 | 2443 | <xmp class='idl'> |
2444 | | -[Exposed=(Window,DedicatedWorker)] |
| 2444 | +[Exposed=(Window,DedicatedWorker), Serializable] |
2445 | 2445 | interface EncodedAudioChunk { |
2446 | 2446 | constructor(EncodedAudioChunkInit init); |
2447 | 2447 | readonly attribute EncodedAudioChunkType type; |
|
2510 | 2510 | greater than in |destination|, throw a {{TypeError}}. |
2511 | 2511 | 2. Copy the {{EncodedAudioChunk/[[internal data]]}} into |destination|. |
2512 | 2512 |
|
| 2513 | +### Serialization ###{#encodedaudiochunk-serialization} |
| 2514 | +: The {{EncodedAudioChunk}} [=serialization steps=] (with |value|, |serialized|, |
| 2515 | + and |forStorage|) are: |
| 2516 | +:: 1. If |forStorage| is `true`, throw a {{TypeError}}. |
| 2517 | + 2. For each {{EncodedAudioChunk}} internal slot in |value|, assign the value |
| 2518 | + of each internal slot to a field in |serialized| with the same name as |
| 2519 | + the internal slot. |
| 2520 | + |
| 2521 | +: The {{EncodedAudioChunk}} [=deserialization steps=] (with |serialized| and |
| 2522 | + |value|) are: |
| 2523 | +:: 1. For all named fields in |serialized|, assign the value of each named field |
| 2524 | + to the {{EncodedAudioChunk}} internal slot in |value| with the same name |
| 2525 | + as the named field. |
| 2526 | + |
| 2527 | +NOTE: Since {{EncodedAudioChunk}}s are immutable, User Agents may choose to |
| 2528 | + implement serialization using a reference counting model similar to |
| 2529 | + [[#audiodata-transfer-serialization]]. |
| 2530 | + |
2513 | 2531 | EncodedVideoChunk Interface{#encodedvideochunk-interface} |
2514 | 2532 | ----------------------------------------------------------- |
2515 | 2533 | <xmp class='idl'> |
2516 | | -[Exposed=(Window,DedicatedWorker)] |
| 2534 | +[Exposed=(Window,DedicatedWorker), Serializable] |
2517 | 2535 | interface EncodedVideoChunk { |
2518 | 2536 | constructor(EncodedVideoChunkInit init); |
2519 | 2537 | readonly attribute EncodedVideoChunkType type; |
|
2584 | 2602 | {{TypeError}}. |
2585 | 2603 | 2. Copy the {{EncodedVideoChunk/[[internal data]]}} into |destination|. |
2586 | 2604 |
|
| 2605 | +### Serialization ###{#encodedvideochunk-serialization} |
| 2606 | +: The {{EncodedVideoChunk}} [=serialization steps=] (with |value|, |serialized|, |
| 2607 | + and |forStorage|) are: |
| 2608 | +:: 1. If |forStorage| is `true`, throw a {{TypeError}}. |
| 2609 | + 2. For each {{EncodedVideoChunk}} internal slot in |value|, assign the value |
| 2610 | + of each internal slot to a field in |serialized| with the same name as |
| 2611 | + the internal slot. |
| 2612 | + |
| 2613 | +: The {{EncodedVideoChunk}} [=deserialization steps=] (with |serialized| and |
| 2614 | + |value|) are: |
| 2615 | +:: 1. For all named fields in |serialized|, assign the value of each named field |
| 2616 | + to the {{EncodedVideoChunk}} internal slot in |value| with the same name |
| 2617 | + as the named field. |
| 2618 | + |
| 2619 | +NOTE: Since {{EncodedVideoChunk}}s are immutable, User Agents may choose to |
| 2620 | + implement serialization using a reference counting model similar to |
| 2621 | + [[#videoframe-transfer-serialization]]. |
| 2622 | + |
2587 | 2623 |
|
2588 | 2624 | Raw Media Interfaces {#raw-media-interfaces} |
2589 | 2625 | ==================================================== |
|
0 commit comments