Confirmed users
1,340
edits
No edit summary |
|||
(2 intermediate revisions by one other user not shown) | |||
Line 3: | Line 3: | ||
On the surface, MMS messages are very similar to multipart HTML emails. One part is responsible for the layout of the message, though MMS uses SMIL rather than HTML. The other parts are attachments, such as text, picture, video, and sound files. Much like in multipart emails, the attachments have "file names" and are referred to by those from the presentation part. | On the surface, MMS messages are very similar to multipart HTML emails. One part is responsible for the layout of the message, though MMS uses SMIL rather than HTML. The other parts are attachments, such as text, picture, video, and sound files. Much like in multipart emails, the attachments have "file names" and are referred to by those from the presentation part. | ||
The API proposal below tries to reuse as many existing Web technologies as applicable. The SMIL document is exposed as a [https://developer.mozilla.org/en/DOM:document DOM document] and the attachments as [https://developer.mozilla.org/en/DOM/Blob Blob] objects | The API proposal below tries to reuse as many existing Web technologies as applicable. The SMIL document is exposed as a [https://developer.mozilla.org/en/DOM:document DOM document] and the attachments as [https://developer.mozilla.org/en/DOM/Blob Blob] objects. On a User Agent capable of rendering SMIL, the web application may simply render the DOM right away. On other User Agents, it may use XSLT or some other method to convert SMIL to HTML. | ||
To read the attachments, the web application may use the [https://developer.mozilla.org/en/DOM/FileReader FileReader] API. However, it's not that useful or efficient to have image/audio/video data in memory (e.g. as a typed array). For display purposes the web application just needs a URI that resolves to the data, so that it can point to it in a <video>, <audio>, <img> element. | To read the attachments, the web application may use the [https://developer.mozilla.org/en/DOM/FileReader FileReader] API. However, it's not that useful or efficient to have image/audio/video data in memory (e.g. as a typed array). For display purposes the web application just needs a URI that resolves to the data, so that it can point to it in a <video>, <audio>, <img> element. This is possible with the [https://developer.mozilla.org/en/DOM/window.URL.createObjectURL window.URL] API. | ||
= API = | = API = | ||
Line 143: | Line 143: | ||
<div> | <div> | ||
<input type="text" id="number"> | <input type="text" id="number"> | ||
<button onclick="sendMMS()">Send</button> | <button onclick="sendMMS();">Send</button> | ||
</div> | </div> | ||
<script> | <script> | ||
Line 161: | Line 161: | ||
</body> | </body> | ||
</html> | </html> | ||
[[Category:Web APIs]] |