index.html 71.7 KB
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<!--
          ******* WARNING *********************************************************
          This document was automatically generated using the Re-Spec specification
          publishing system. Edits made here will be lost when it is regenerated
          and chances are high that the editor will do something quite unpleasant
          to you should that happen.
          ******* WARNING *********************************************************
        -->
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Media Access Events</title>
<link rel="stylesheet" href="respec-w3c.css" type="text/css" />
<link rel="stylesheet" href="http://www.w3.org/StyleSheets/TR/W3C-WD" type="text/css" />
<meta name="revision" content="$Id: Overview.html,v 1.4 2006/10/12 17:47:44 dean Exp $" />
</head>
<body><div class="head"><p><a href="http://www.w3.org/"><img src="http://www.w3.org/Icons/w3c_home" width="72" height="48" alt="W3C" /></a></p><h1 class="head">Media Access Events</h1><h2 id="pagesubtitle">W3C Working Draft <em>13 October 2006</em></h2>
    <dl><dt>This version:</dt>
        <dd><a href="http://www.w3.org/TR/2006/WD-MediaAccessEvents-20061013/">http://www.w3.org/TR/2006/WD-MediaAccessEvents-20061013/</a></dd>
        <dt>Latest version:</dt>
        <dd><a href="http://www.w3.org/TR/MediaAccessEvents/">http://www.w3.org/TR/MediaAccessEvents/</a></dd>
        <dt>Editors:</dt>
        <dd><span class="person">Ola Andersson (<a href="http://www.ikivo.com/">Ikivo</a>) &lt;<a href="mailto:ola.andersson@ikivo.com">ola.andersson@ikivo.com</a>&gt;</span></dd><dd><span class="person">Jean-Claude Dufourd (<a href="http://www.streamezzo.com/">Streamezzo</a>) &lt;<a href="mailto:jean-claude.dufourd@streamezzo.com">jean-claude.dufourd@streamezzo.com</a>&gt;</span></dd><dd><span class="person">Roland Lundblad (<a href="http://www.ikivo.com/">Ikivo</a>) &lt;<a href="mailto:roland.lundblad@ikivo.com">roland.lundblad@ikivo.com</a>&gt;</span></dd></dl><p class="copyright"><a href="http://www.w3.org/Consortium/Legal/ipr-notice#Copyright">Copyright</a> ©2006
        <a href="http://www.w3.org/"><acronym title="World Wide Web Consortium">W3C</acronym></a><sup>®</sup>
        (<a href="http://www.csail.mit.edu/"><acronym title="Massachusetts Institute of Technology">MIT</acronym></a>,
        <a href="http://www.ercim.org/"><acronym title="European Research Consortium for Informatics and Mathematics">ERCIM</acronym></a>,
        <a href="http://www.keio.ac.jp/">Keio</a>), All Rights Reserved. W3C
        <a href="http://www.w3.org/Consortium/Legal/ipr-notice#Legal_Disclaimer">liability</a>,
        <a href="http://www.w3.org/Consortium/Legal/ipr-notice#W3C_Trademarks">trademark</a> and 
        <a href="http://www.w3.org/Consortium/Legal/copyright-documents">document  use</a> rules apply.
      </p></div><hr />

    

    <h2 id="specabstract">Abstract</h2><div class="section">
        
        <p>
            This specification defines a set of DOM 3 Events [<cite><a href="#DOM3EV" class="bibref">DOM3EV</a></cite>] compatible events and DOM APIs related to
            media access. The defined events and APIs enables detailed monitoring of media stream buffering and initialization.
            They are designed to be easily combined with the SVG Tiny 1.2 [<cite><a href="#SVGT12" class="bibref">SVGT12</a></cite>] uDOM but can equally well be combined
            with other, larger DOM APIs.
        </p>
    </div>

    <div class="section"><h2 id="sotd">Status of this Document</h2>
        

        
  <p>
    <em>This section describes the status of this document at the time of its publication.
    Other documents may supersede this document. A list of current <acronym title="World Wide Web Consortium">W3C</acronym> publications and the
    latest revision of this technical report can be found in the 
    <a href="http://www.w3.org/TR/"><acronym title="World Wide Web Consortium">W3C</acronym>
    technical reports index</a> at http://www.w3.org/TR/.</em>
  </p>

        <p>This is a First Public Working Draft of "Media Access Events".</p>
        <p class="custom">This specification has been released for public feedback regarding the
overall design and functionality; in particular, whether it meets the
needs of OMA, ISO SC 29, SVG, and SMIL for event-driven access to streaming
media. It should not be implemented at this stage.</p>
        <p>
          This document was developed by the <a href="http://www.w3.org/Graphics/SVG/">SVG
          <acronym title="Working Group">WG</acronym></a> as part of the <acronym title="World Wide Web Consortium">W3C</acronym> 
          <a href="http://www.w3.org/Graphics/Activity">Graphics Activity</a>.
          The Working Group expects to advance this Working Draft to Recommendation Status.
        </p>
        <p>
          Web content and browser developers are encouraged to review this draft.
          Please send comments to <a href="mailto:www-svg@w3.org">www-svg@w3.org</a>,
          the public email list for issues related to SVG.
          <a href="http://lists.w3.org/Archives/Public/www-svg/">Archives</a> of the
          list are available.
        </p>
        
  <p>
    Publication as a Working Draft does not imply endorsement by the <acronym title="World Wide Web Consortium">W3C</acronym> Membership.
    This is a draft document and may be updated, replaced or obsoleted by other 
    documents at any time. It is inappropriate to cite this document as other than
    work in progress.
  </p>

        <p>This document was produced by a group operating under the 
        <a href="http://www.w3.org/Consortium/Patent-Policy-20040205/">5
  February 2004 <acronym title="World Wide Web Consortium">W3C</acronym> Patent Policy</a>. 
    <acronym title="World Wide Web Consortium">W3C</acronym> maintains a <a rel="disclosure" href="http://www.w3.org/2004/01/pp-impl/19480/status">public list of any
    patent disclosures</a> made in connection with the
    deliverables of the group; that page also includes 
    instructions for disclosing a patent.
  An individual who has actual knowledge of a patent which the
  individual believes contains <a href="http://www.w3.org/Consortium/Patent-Policy-20040205/#def-essential">Essential Claim(s)</a> must disclose the
  information in accordance with <a href="http://www.w3.org/Consortium/Patent-Policy-20040205/#sec-Disclosure">section 6 of the <acronym title="World Wide Web Consortium">W3C</acronym> Patent Policy</a>.</p>

    </div>

    <div class="section"><h2 id="contents">Table of Contents</h2>
        

        <ul class="toc"><li><a href="#introduction">1. Introduction</a></li><li><a href="#definitions">2. Definitions</a></li><li><a href="#stateChart">3. State chart</a></li><li><a href="#MediaAccessEvent-if">4. The MediaAccessEvent interface</a></li><li><a href="#MediaStreamInfo-if">5. The MediaStreamInfo interface</a></li><li><a href="#MediaStreamInfoList-if">6. The MediaStreamInfoList interface</a></li><li><a href="#conform">7. Conformance</a></li><li><a href="#example">8. Examples of usage</a></li><li><ul class="toc"><li><a href="#example-1">8.1. Simple state information display</a></li><li><a href="#example-2">8.2. Buffering progress bar</a></li><li><a href="#example-3">8.3. Stream info box</a></li></ul></li><li><a href="#ack">9. Acknowledgements</a></li></ul><ul class="toc"><li><a href="#bibref">A. References</a></li></ul>
    </div>

    <div class="section"><h2 id="introduction">1. Introduction</h2><p><strong>This section is informative.</strong></p>
        
        <p>
            Streamable media, such as audio and video, is streamed over the network and is processed on the client as it
            arrives.
            This leads to different behaviour compared to downloaded media. The client normally holds a buffer where it
            stores part
            of the media prior to processing it. The state of this buffer affects the client. For example, if the buffer
            fills too slowly
            in relation to client processing the client will have to stall processing while it waits for the buffer to
            fill. It is
            often of interest to monitor the state of the buffer and client, and the purpose of correlating
            media access
            events introduced in this specification is to facilitate such monitoring.
            Initialising a
            <a class="term" href="#dfn-session">session</a>
            containing one or several media streams often takes a considerable
            amount of time.
            The author may wish to give the user some feedback that this setup is in progress and, when setup is done,
            present information of the available media streams.
        </p>

    </div>

    <div class="section"><h2 id="definitions">2. Definitions</h2>
        
        <p>The Media Access Events
            <dfn id="dfn-namespace">namespace</dfn>
            is
            <strong>http://www.w3.org/ns/media-access-event#</strong>
            .
        </p>
        <p>The examples in this specification use a namespace prefix of
            <strong>me</strong>
            to denote the Media Access Events
            <a class="term" href="#dfn-namespace">namespace</a>
            .
        </p>
        <p>A
            <dfn id="dfn-session">session</dfn>
            is a set of synchronized streams rendered by a single media element.
        </p>
    </div>

    <div class="section"><h2 id="stateChart">3. State chart</h2><p><strong>This section is informative.</strong></p>
        
        <p>The following state chart illustrates the flow of events generated when streaming a media resource.
            Even if multiple streams are rendered by a single media element within one
            <a class="term" href="#dfn-session">session</a>
            , only one event is fired
            at each stage.
        </p>
        <img src="images/stateChart.png" alt="State chart" />

        <p>This chart can be explained as follows:</p>

        <ul>
            <li>The UA goes into the
                <strong>Setting Session</strong>
                state, firing a
                
        '<a href="#event-BeginSessionSetup" class="event-name">BeginSessionSetup</a>'
      
                event. If a connection request needs to be sent to the server, it is sent during this phase.
            </li>

            <li>The UA goes into the
                <strong>Session Setup</strong>
                state, firing a
                
        '<a href="#event-EndSessionSetup" class="event-name">EndSessionSetup</a>'
      
                event, upon completion of the
                <a class="term" href="#dfn-session">session</a>
                set up on the terminal. If the
                <a class="term" href="#dfn-session">session</a>
                setup cannot be completed, the UA goes into the
                <strong>Stopped</strong>
                state and fires a
                
        '<a href="#event-Error" class="event-name">Error</a>'
      
                event. If a connection to a server was attempted, it was successful.
            </li>

            <li>The UA goes into the
                <strong>Reception</strong>
                state, firing a
                
        '<a href="#event-DataRequest" class="event-name">DataRequest</a>'
      
                event, while sending a request for data to the server. If the data request cannot be sent, the UA goes
                into the
                <strong>Stopped</strong>
                state and fires a
                
        '<a href="#event-Error" class="event-name">Error</a>'
      
                event. While in this state, the UA may fire
                
        '<a href="#event-DataReceptionProgress" class="event-name">DataReceptionProgress</a>'
      
                events.
            </li>

            <li>The UA goes into the
                <strong>Reception and Playing</strong>
                state, firing a
                
        '<a href="#event-Playable" class="event-name">Playable</a>'
      
                event, when enough data has been received to start playing. If the operation is unsuccessful,
                the UA goes into the
                <strong>Stopped</strong>
                state and fires a
                
        '<a href="#event-Error" class="event-name">Error</a>'
      
                event. While in this state, the UA may fire
                
        '<a href="#event-DataReceptionProgress" class="event-name">DataReceptionProgress</a>'
      
                events.
            </li>

            <li>From the
                <strong>Reception and Playing</strong>
                state, the UA may either go into the
                <strong>Playing</strong>
                state, firing a
                
        '<a href="#event-EndOfDataReception" class="event-name">EndOfDataReception</a>'
      
                event, when the end of the data has arrived, or back into the
                <strong>Reception</strong>
                state, firing a
                
        '<a href="#event-NotPlayable" class="event-name">NotPlayable</a>'
      
                event if there is not enough data available to continue playing. If the operation is unsuccessful, the
                UA
                goes into the
                <strong>Stopped</strong>
                state and fires a
                
        '<a href="#event-Error" class="event-name">Error</a>'
      
                event.
            </li>

            <li>From the
                <strong>Playing</strong>
                state, the UA goes into the
                <strong>Stopped</strong>
                state, firing a
                
        '<a href="#event-Stop" class="event-name">Stop</a>'
      
                event, at the end of the playing of available data. If the operation is unsuccessful, the UA
                goes into the
                <strong>Stopped</strong>
                state and fires a
                
        '<a href="#event-Error" class="event-name">Error</a>'
      
                event.
            </li>
        </ul>

    </div>

    <div class="section"><h2 id="MediaAccessEvent-if">4. The MediaAccessEvent interface</h2>
        
        <p>
            The Media Access Event module contains basic event types associated with media access. This interface
            inherits from the
            <a href="http://www.w3.org/TR/SVGMobile12/svgudom.html#events__Event">Event</a>
            interface in the SVG uDOM [<cite><a href="#SVGT12" class="bibref">SVGT12</a></cite>].
        </p>

        <div class="boxed"><p><span class="idlTitle">The MediaAccessEvent interface</span></p><pre class="schema" title="The MediaAccessEvent interface">interface <a href="#idl-if-MediaAccessEvent">MediaAccessEvent</a> : events::Event {

  // MediaAccessEvent
  const unsigned short      <a href="#idl-defs-MediaAccessEvent-STATUS_OK">STATUS_OK</a>                           = 0;
  const unsigned short      <a href="#idl-defs-MediaAccessEvent-STATUS_ERROR_ON_SETUP">STATUS_ERROR_ON_SETUP</a>               = 1;
  const unsigned short      <a href="#idl-defs-MediaAccessEvent-STATUS_ERROR_UNSUPPORTED_MEDIA">STATUS_ERROR_UNSUPPORTED_MEDIA</a>      = 2;
  const unsigned short      <a href="#idl-defs-MediaAccessEvent-STATUS_ERROR_CORRUPT_STREAM">STATUS_ERROR_CORRUPT_STREAM</a>         = 3;

  readonly attribute boolean         <a href="#dfn-bufferlevelvalid">bufferLevelValid</a>;
  readonly attribute unsigned long   <a href="#dfn-bufferlevel">bufferLevel</a>;
  readonly attribute float           <a href="#dfn-bufferremainingtime">bufferRemainingTime</a>;
  readonly attribute unsigned short  <a href="#dfn-status">status</a>;
  DOMString           <a href="#dfn-getsessionname">getSessionName</a>();
  <a href="#idl-if-MediaStreamInfoList">MediaStreamInfoList</a> <a href="#dfn-getmediastreams">getMediaStreams</a>();
};</pre></div><div class="section" id="idl-if-MediaAccessEvent"><div class="section"><h4 class="idl-header" id="idl-defs-MediaAccessEvent">Definition Group <em>MediaAccessEvent</em></h4><dl class="idl-defs"><dt id="idl-defs-MediaAccessEvent-STATUS_OK"><code>STATUS_OK</code></dt><dd>
                            No error has occured.
                        </dd><dt id="idl-defs-MediaAccessEvent-STATUS_ERROR_ON_SETUP"><code>STATUS_ERROR_ON_SETUP</code></dt><dd>
                            Initialization of a
                            <a class="term" href="#dfn-session">session</a>
                            failed.
                        </dd><dt id="idl-defs-MediaAccessEvent-STATUS_ERROR_UNSUPPORTED_MEDIA"><code>STATUS_ERROR_UNSUPPORTED_MEDIA</code></dt><dd>
                            One of more of the streams within this
                            <a class="term" href="#dfn-session">session</a>
                            contains media not supported by the User
                            Agent.
                        </dd><dt id="idl-defs-MediaAccessEvent-STATUS_ERROR_CORRUPT_STREAM"><code>STATUS_ERROR_CORRUPT_STREAM</code></dt><dd>
                            One of more of the streams within this
                            <a class="term" href="#dfn-session">session</a>
                            is corrupt and playback is stopped.
                        </dd></dl></div><div class="section"><h4 class="idl-header" id="idl-meths-MediaAccessEvent">Attributes</h4><dl class="idl-attr"><dt id="dfn-bufferlevel"><code>bufferLevel</code>
      of type
      unsigned long, readonly</dt><dd><p>
                            Specifies a percentage value of the current buffer level. This value is only of
                            relevance for
                            
        '<a href="#event-DataReceptionProgress" class="event-name">DataReceptionProgress</a>'
      
                            events. If the
                            <a class="term" href="#dfn-session">session</a>
                            contains multiple streams, then the reported value is the minimum
                            buffer level over all the streams of the
                            <a class="term" href="#dfn-session">session</a>
                            .
                        </p></dd><dt id="dfn-bufferlevelvalid"><code>bufferLevelValid</code>
      of type
      boolean, readonly</dt><dd><p>
                            If
                            <code>false</code>
                            the buffer level is unknown and the value of
                            <code>bufferLevel</code>
                            <em class="rfc2119" title="Keyword in RFC 2119 context">SHOULD</em> be ignored.
                        </p></dd><dt id="dfn-bufferremainingtime"><code>bufferRemainingTime</code>
      of type
      float, readonly</dt><dd><p>
                            Specifies the playing time (in seconds) of the current content of buffer.
                            This value is only of relevance for
                            
        '<a href="#event-DataReceptionProgress" class="event-name">DataReceptionProgress</a>'
      
                            events. If the
                            <a class="term" href="#dfn-session">session</a>
                            contains multiple streams, then the reported value is the minimum
                            remaining time over all the streams of the
                            <a class="term" href="#dfn-session">session</a>
                            .
                        </p></dd><dt id="dfn-status"><code>status</code>
      of type
      unsigned short, readonly</dt><dd><p>
                            Specifies the error that has occured. One of
                            <a href="#idl-defs-MediaAccessEvent-STATUS_OK">STATUS_OK</a>
                            ,
                            <a href="#idl-defs-MediaAccessEvent-STATUS_ERROR_ON_SETUP">STATUS_ERROR_ON_SETUP</a>
                            ,
                            <a href="#idl-defs-MediaAccessEvent-STATUS_ERROR_UNSUPPORTED_MEDIA">
                                STATUS_ERROR_UNSUPPORTED_MEDIA</a>
                            or
                            <a href="#idl-defs-MediaAccessEvent-STATUS_ERROR_CORRUPT_STREAM">
                                STATUS_ERROR_CORRUPT_STREAM</a>
                            <em class="rfc2119" title="Keyword in RFC 2119 context">MUST</em> be
                            <a href="#idl-defs-MediaAccessEvent-STATUS_OK">STATUS_OK</a>
                            for every event type except
                            
        '<a href="#event-Error" class="event-name">Error</a>'
      
                            .
                        </p></dd></dl></div><div class="section"><h4 class="idl-header" id="idl-attrs-MediaAccessEvent">Methods</h4><dl class="idl-meth"><dt id="dfn-getmediastreams"><code>getMediaStreams</code></dt><dd><p>
                            Returns information about the different media streams in this
                            <a class="term" href="#dfn-session">session</a>
                            .
                        </p><dl><dt>No Parameters</dt><dt>Return Value</dt><dd><table><tr><td><code></code></td><td>
                            The list of streams in this
                            <a class="term" href="#dfn-session">session</a>
                            .
                        </td></tr></table></dd><dt>No Exceptions</dt></dl></dd><dt id="dfn-getsessionname"><code>getSessionName</code></dt><dd><p>
                            Returns the name of the media access
                            <a class="term" href="#dfn-session">session</a>
                            .
                        </p><dl><dt>No Parameters</dt><dt>Return Value</dt><dd><table><tr><td><code></code></td><td>
                            The media access
                            <a class="term" href="#dfn-session">session</a>
                            name.
                        </td></tr></table></dd><dt>No Exceptions</dt></dl></dd></dl></div></div>

        <p>The Media Access event types are listed below.</p>
        <p>Even if a state is not relevant to a particular delivery protocol or implementation, the corresponding events
            <em class="rfc2119" title="Keyword in RFC 2119 context">MUST</em> be fired. For example, if there is no
            <a class="term" href="#dfn-session">session</a>
            setup phase, then events
            
        '<a href="#event-BeginSessionSetup" class="event-name">BeginSessionSetup</a>'
      
            ,
            
        '<a href="#event-EndSessionSetup" class="event-name">EndSessionSetup</a>'
      
            and
            
        '<a href="#event-DataRequest" class="event-name">DataRequest</a>'
      
            <em class="rfc2119" title="Keyword in RFC 2119 context">MUST</em> be fired together in that order.
        </p>

        <div class="event-definition">
            <dl>
                <dt>
                    <a name="event-BeginSessionSetup" id="event-BeginSessionSetup"></a>
                    <a class="noxref" href="#event-BeginSessionSetup">BeginSessionSetup</a>
                </dt>
                <dd>
                    <table summary="This table contains information about the semantics of the given event type" border="0" cellpadding="2" cellspacing="0">
                        <tbody>
                            <tr>
                                <th rowspan="1" colspan="1">Type</th>
                                <td rowspan="1" colspan="1" style="background-color:#cfcfcf">
                                    <strong>
                                        <code>BeginSessionSetup</code>
                                    </strong>
                                </td>
                            </tr>
                            <tr>
                                <th rowspan="1" colspan="1">Namespace</th>
                                <td rowspan="1" colspan="1" valign="top">
                                    <code>http://www.w3.org/ns/media-access-event#</code>
                                </td>

                            </tr>
                            <tr>
                                <th rowspan="1" colspan="1">Interface</th>
                                <td rowspan="1" colspan="1" valign="top">
                                    <a href="#MediaAccessEvent-if">
                                        <code>MediaAccessEvent</code>
                                    </a>
                                </td>
                            </tr>
                            <tr>
                                <th rowspan="1" colspan="1">Cancelable</th>
                                <td rowspan="1" colspan="1" valign="top">Yes</td>
                            </tr>
                            <tr>
                                <th rowspan="1" colspan="1">Bubbles</th>
                                <td rowspan="1" colspan="1" valign="top">Yes</td>

                            </tr>
                            <tr>
                                <th rowspan="1" colspan="1">Target</th>
                                <td rowspan="1" colspan="1" valign="top">
                                    <code>the media element holding the URL to the delivered content</code>
                                </td>
                            </tr>
                            <tr>
                                <th rowspan="1" colspan="1">Context info</th>
                                <td rowspan="1" colspan="1" valign="top">none</td>
                            </tr>
                        </tbody>
                    </table>
                    <p>A
                        
        '<a href="#event-BeginSessionSetup" class="event-name">BeginSessionSetup</a>'
      
                        event <em class="rfc2119" title="Keyword in RFC 2119 context">MUST</em> be fired at the beginning of a streaming
                        <a class="term" href="#dfn-session">session</a>
                        .
                    </p>
                </dd>
            </dl>
        </div>


        <div class="event-definition">
            <dl>
                <dt>
                    <a name="event-EndSessionSetup" id="event-EndSessionSetup"></a>
                    <a class="noxref" href="#event-EndSessionSetup">EndSessionSetup</a>
                </dt>
                <dd>
                    <table summary="This table contains information about the semantics of the given event type" border="0" cellpadding="2" cellspacing="0">
                        <tbody>
                            <tr>
                                <th rowspan="1" colspan="1">Type</th>
                                <td rowspan="1" colspan="1" style="background-color:#cfcfcf">
                                    <strong>
                                        <code>EndSessionSetup</code>
                                    </strong>
                                </td>
                            </tr>
                            <tr>
                                <th rowspan="1" colspan="1">Namespace</th>
                                <td rowspan="1" colspan="1" valign="top">
                                    <code>http://www.w3.org/ns/media-access-event#</code>
                                </td>

                            </tr>
                            <tr>
                                <th rowspan="1" colspan="1">Interface</th>
                                <td rowspan="1" colspan="1" valign="top">
                                    <a href="#MediaAccessEvent-if">
                                        <code>MediaAccessEvent</code>
                                    </a>
                                </td>
                            </tr>
                            <tr>
                                <th rowspan="1" colspan="1">Cancelable</th>
                                <td rowspan="1" colspan="1" valign="top">Yes</td>
                            </tr>
                            <tr>
                                <th rowspan="1" colspan="1">Bubbles</th>
                                <td rowspan="1" colspan="1" valign="top">Yes</td>

                            </tr>
                            <tr>
                                <th rowspan="1" colspan="1">Target</th>
                                <td rowspan="1" colspan="1" valign="top">
                                    <code>the media element holding the URL to the delivered content</code>
                                </td>
                            </tr>
                            <tr>
                                <th rowspan="1" colspan="1">Context info</th>
                                <td rowspan="1" colspan="1" valign="top">none</td>
                            </tr>
                        </tbody>
                    </table>
                    <p>
                        An
                        
        '<a href="#event-EndSessionSetup" class="event-name">EndSessionSetup</a>'
      
                        event <em class="rfc2119" title="Keyword in RFC 2119 context">MUST</em> be fired after a
                        
        '<a href="#event-BeginSessionSetup" class="event-name">BeginSessionSetup</a>'
      
                        event when the initialisation of
                        a streaming
                        <a class="term" href="#dfn-session">session</a>
                        has been completed.

                    </p>
                </dd>
            </dl>
        </div>

        <div class="event-definition">
            <dl>
                <dt>
                    <a name="event-DataRequest" id="event-DataRequest"></a>
                    <a class="noxref" href="#event-DataRequest">DataRequest</a>
                </dt>
                <dd>
                    <table summary="This table contains information about the semantics of the given event type" border="1" cellpadding="2" cellspacing="0">
                        <tbody>
                            <tr>
                                <th rowspan="1" colspan="1">Type</th>
                                <td rowspan="1" colspan="1" style="background-color:#cfcfcf">
                                    <strong>
                                        <code>DataRequest</code>
                                    </strong>
                                </td>
                            </tr>
                            <tr>
                                <th rowspan="1" colspan="1">Namespace</th>
                                <td rowspan="1" colspan="1" valign="top">
                                    <code>http://www.w3.org/ns/media-access-event#</code>
                                </td>

                            </tr>
                            <tr>
                                <th rowspan="1" colspan="1">Interface</th>
                                <td rowspan="1" colspan="1" valign="top">
                                    <a href="#MediaAccessEvent-if">
                                        <code>MediaAccessEvent</code>
                                    </a>
                                </td>
                            </tr>
                            <tr>
                                <th rowspan="1" colspan="1">Cancelable</th>
                                <td rowspan="1" colspan="1" valign="top">Yes</td>
                            </tr>
                            <tr>
                                <th rowspan="1" colspan="1">Bubbles</th>
                                <td rowspan="1" colspan="1" valign="top">Yes</td>

                            </tr>
                            <tr>
                                <th rowspan="1" colspan="1">Target</th>
                                <td rowspan="1" colspan="1" valign="top">
                                    <code>the media element holding the URL to the delivered content</code>
                                </td>
                            </tr>
                            <tr>
                                <th rowspan="1" colspan="1">Context info</th>
                                <td rowspan="1" colspan="1" valign="top">none</td>
                            </tr>
                        </tbody>
                    </table>

                    <p>
                        A
                        
        '<a href="#event-DataRequest" class="event-name">DataRequest</a>'
      
                        event <em class="rfc2119" title="Keyword in RFC 2119 context">MUST</em> be fired when the UA sends the request for data to the server.
                    </p>
                </dd>
            </dl>
        </div>


        <div class="event-definition">
            <dl>
                <dt>
                    <a name="event-Playable" id="event-Playable"></a>
                    <a class="noxref" href="#event-Playable">Playable</a>
                </dt>
                <dd>
                    <table summary="This table contains information about the semantics of the given event type" border="1" cellpadding="2" cellspacing="0">
                        <tbody>
                            <tr>
                                <th rowspan="1" colspan="1">Type</th>
                                <td rowspan="1" colspan="1" style="background-color:#cfcfcf">
                                    <strong>
                                        <code>Playable</code>
                                    </strong>
                                </td>
                            </tr>
                            <tr>
                                <th rowspan="1" colspan="1">Namespace</th>
                                <td rowspan="1" colspan="1" valign="top">
                                    <code>http://www.w3.org/ns/media-access-event#</code>
                                </td>

                            </tr>
                            <tr>
                                <th rowspan="1" colspan="1">Interface</th>
                                <td rowspan="1" colspan="1" valign="top">
                                    <a href="#MediaAccessEvent-if">
                                        <code>MediaAccessEvent</code>
                                    </a>
                                </td>
                            </tr>
                            <tr>
                                <th rowspan="1" colspan="1">Cancelable</th>
                                <td rowspan="1" colspan="1" valign="top">Yes</td>
                            </tr>
                            <tr>
                                <th rowspan="1" colspan="1">Bubbles</th>
                                <td rowspan="1" colspan="1" valign="top">Yes</td>

                            </tr>
                            <tr>
                                <th rowspan="1" colspan="1">Target</th>
                                <td rowspan="1" colspan="1" valign="top">
                                    <code>the media element holding the URL to the delivered content</code>
                                </td>
                            </tr>
                            <tr>
                                <th rowspan="1" colspan="1">Context info</th>
                                <td rowspan="1" colspan="1" valign="top">none</td>
                            </tr>
                        </tbody>
                    </table>

                    <p>
                        An
                        
        '<a href="#event-Playable" class="event-name">Playable</a>'
      
                        event <em class="rfc2119" title="Keyword in RFC 2119 context">MUST</em> be fired after a
                        
        '<a href="#event-DataRequest" class="event-name">DataRequest</a>'
      
                        event when enough data is available to start or resume playing.
                    </p>
                </dd>
            </dl>
        </div>


        <div class="event-definition">
            <dl>
                <dt>
                    <a name="event-DataReceptionProgress" id="event-DataReceptionProgress"></a>
                    <a class="noxref" href="#event-DataReceptionProgress">DataReceptionProgress</a>
                </dt>
                <dd>
                    <table summary="This table contains information about the semantics of the given event type" border="1" cellpadding="2" cellspacing="0">
                        <tbody>
                            <tr>
                                <th rowspan="1" colspan="1">Type</th>
                                <td rowspan="1" colspan="1" style="background-color:#cfcfcf">
                                    <strong>
                                        <code>DataReceptionProgress</code>
                                    </strong>
                                </td>
                            </tr>
                            <tr>
                                <th rowspan="1" colspan="1">Namespace</th>
                                <td rowspan="1" colspan="1" valign="top">
                                    <code>http://www.w3.org/ns/media-access-event#</code>
                                </td>

                            </tr>
                            <tr>
                                <th rowspan="1" colspan="1">Interface</th>
                                <td rowspan="1" colspan="1" valign="top">
                                    <a href="#MediaAccessEvent-if">
                                        <code>MediaAccessEvent</code>
                                    </a>
                                </td>
                            </tr>
                            <tr>
                                <th rowspan="1" colspan="1">Cancelable</th>
                                <td rowspan="1" colspan="1" valign="top">Yes</td>
                            </tr>
                            <tr>
                                <th rowspan="1" colspan="1">Bubbles</th>
                                <td rowspan="1" colspan="1" valign="top">Yes</td>

                            </tr>
                            <tr>
                                <th rowspan="1" colspan="1">Target</th>
                                <td rowspan="1" colspan="1" valign="top">
                                    <code>the media element holding the URL to the delivered content</code>
                                </td>
                            </tr>
                            <tr>
                                <th rowspan="1" colspan="1">Context info</th>
                                <td rowspan="1" colspan="1" valign="top">none</td>
                            </tr>
                        </tbody>
                    </table>

                    <p>
                        The User Agent <em class="rfc2119" title="Keyword in RFC 2119 context">MAY</em> dispatch
                        
        '<a href="#event-DataReceptionProgress" class="event-name">DataReceptionProgress</a>'
      
                        when data is being received. Information on the current buffer level <em class="rfc2119" title="Keyword in RFC 2119 context">SHOULD</em> be
                        available.
                    </p>
                </dd>
            </dl>
        </div>


        <div class="event-definition">
            <dl>
                <dt>
                    <a name="event-NotPlayable" id="event-NotPlayable"></a>
                    <a class="noxref" href="#event-NotPlayable">NotPlayable</a>
                </dt>
                <dd>
                    <table summary="This table contains information about the semantics of the given event type" border="1" cellpadding="2" cellspacing="0">
                        <tbody>
                            <tr>
                                <th rowspan="1" colspan="1">Type</th>
                                <td rowspan="1" colspan="1" style="background-color:#cfcfcf">
                                    <strong>
                                        <code>NotPlayable</code>
                                    </strong>
                                </td>
                            </tr>
                            <tr>
                                <th rowspan="1" colspan="1">Namespace</th>
                                <td rowspan="1" colspan="1" valign="top">
                                    <code>http://www.w3.org/ns/media-access-event#</code>
                                </td>

                            </tr>
                            <tr>
                                <th rowspan="1" colspan="1">Interface</th>
                                <td rowspan="1" colspan="1" valign="top">
                                    <a href="#MediaAccessEvent-if">
                                        <code>MediaAccessEvent</code>
                                    </a>
                                </td>
                            </tr>
                            <tr>
                                <th rowspan="1" colspan="1">Cancelable</th>
                                <td rowspan="1" colspan="1" valign="top">Yes</td>
                            </tr>
                            <tr>
                                <th rowspan="1" colspan="1">Bubbles</th>
                                <td rowspan="1" colspan="1" valign="top">Yes</td>

                            </tr>
                            <tr>
                                <th rowspan="1" colspan="1">Target</th>
                                <td rowspan="1" colspan="1" valign="top">
                                    <code>the media element holding the URL to the delivered content</code>
                                </td>
                            </tr>
                            <tr>
                                <th rowspan="1" colspan="1">Context info</th>
                                <td rowspan="1" colspan="1" valign="top">none</td>
                            </tr>
                        </tbody>
                    </table>

                    <p>
                        An
                        
        '<a href="#event-NotPlayable" class="event-name">NotPlayable</a>'
      
                        event <em class="rfc2119" title="Keyword in RFC 2119 context">MUST</em> be fired when not enough data is available to continue playing.
                    </p>
                </dd>
            </dl>
        </div>


        <div class="event-definition">
            <dl>
                <dt>
                    <a name="event-EndOfDataReception" id="event-EndOfDataReception"></a>
                    <a class="noxref" href="#event-EndOfDataReception">EndOfDataReception</a>
                </dt>
                <dd>
                    <table summary="This table contains information about the semantics of the given event type" border="1" cellpadding="2" cellspacing="0">
                        <tbody>
                            <tr>
                                <th rowspan="1" colspan="1">Type</th>
                                <td rowspan="1" colspan="1" style="background-color:#cfcfcf">
                                    <strong>
                                        <code>EndOfDataReception</code>
                                    </strong>
                                </td>
                            </tr>
                            <tr>
                                <th rowspan="1" colspan="1">Namespace</th>
                                <td rowspan="1" colspan="1" valign="top">
                                    <code>http://www.w3.org/ns/media-access-event#</code>
                                </td>

                            </tr>
                            <tr>
                                <th rowspan="1" colspan="1">Interface</th>
                                <td rowspan="1" colspan="1" valign="top">
                                    <a href="#MediaAccessEvent-if">
                                        <code>MediaAccessEvent</code>
                                    </a>
                                </td>
                            </tr>
                            <tr>
                                <th rowspan="1" colspan="1">Cancelable</th>
                                <td rowspan="1" colspan="1" valign="top">Yes</td>
                            </tr>
                            <tr>
                                <th rowspan="1" colspan="1">Bubbles</th>
                                <td rowspan="1" colspan="1" valign="top">Yes</td>

                            </tr>
                            <tr>
                                <th rowspan="1" colspan="1">Target</th>
                                <td rowspan="1" colspan="1" valign="top">
                                    <code>the media element holding the URL to the delivered content</code>
                                </td>
                            </tr>
                            <tr>
                                <th rowspan="1" colspan="1">Context info</th>
                                <td rowspan="1" colspan="1" valign="top">none</td>
                            </tr>
                        </tbody>
                    </table>

                    <p>
                        An
                        
        '<a href="#event-EndOfDataReception" class="event-name">EndOfDataReception</a>'
      
                        event <em class="rfc2119" title="Keyword in RFC 2119 context">MUST</em> be fired when the data reception has finished.
                    </p>
                </dd>
            </dl>
        </div>


        <div class="event-definition">
            <dl>
                <dt>
                    <a name="event-Stop" id="event-Stop"></a>
                    <a class="noxref" href="#event-Stop">Stop</a>
                </dt>
                <dd>
                    <table summary="This table contains information about the semantics of the given event type" border="1" cellpadding="2" cellspacing="0">
                        <tbody>
                            <tr>
                                <th rowspan="1" colspan="1">Type</th>
                                <td rowspan="1" colspan="1" style="background-color:#cfcfcf">
                                    <strong>
                                        <code>Stop</code>
                                    </strong>
                                </td>
                            </tr>
                            <tr>
                                <th rowspan="1" colspan="1">Namespace</th>
                                <td rowspan="1" colspan="1" valign="top">
                                    <code>http://www.w3.org/ns/media-access-event#</code>
                                </td>

                            </tr>
                            <tr>
                                <th rowspan="1" colspan="1">Interface</th>
                                <td rowspan="1" colspan="1" valign="top">
                                    <a href="#MediaAccessEvent-if">
                                        <code>MediaAccessEvent</code>
                                    </a>
                                </td>
                            </tr>
                            <tr>
                                <th rowspan="1" colspan="1">Cancelable</th>
                                <td rowspan="1" colspan="1" valign="top">Yes</td>
                            </tr>
                            <tr>
                                <th rowspan="1" colspan="1">Bubbles</th>
                                <td rowspan="1" colspan="1" valign="top">Yes</td>

                            </tr>
                            <tr>
                                <th rowspan="1" colspan="1">Target</th>
                                <td rowspan="1" colspan="1" valign="top">
                                    <code>the media element holding the URL to the delivered content</code>
                                </td>
                            </tr>
                            <tr>
                                <th rowspan="1" colspan="1">Context info</th>
                                <td rowspan="1" colspan="1" valign="top">none</td>
                            </tr>
                        </tbody>
                    </table>

                    <p>
                        A
                        
        '<a href="#event-Stop" class="event-name">Stop</a>'
      
                        event <em class="rfc2119" title="Keyword in RFC 2119 context">MUST</em> be fired when the data reception has finished and all received data has been
                        presented.
                    </p>
                    <p>
                        An
                        
        '<a href="#event-Stop" class="event-name">Stop</a>'
      
                        event <em class="rfc2119" title="Keyword in RFC 2119 context">MUST</em> be fired when an end condition has been met within the media element, e.g.
                        one expression in the end attribute has become true or endElement() has been called on the media
                        element. In that case, the
                        
        '<a href="#event-Stop" class="event-name">Stop</a>'
      
                        event <em class="rfc2119" title="Keyword in RFC 2119 context">MUST</em> be sent before the endEvent to be dispatched
                        from the media element.
                    </p>
                </dd>
            </dl>
        </div>


        <div class="event-definition">
            <dl>
                <dt>
                    <a name="event-Error" id="event-Error"></a>
                    <a class="noxref" href="#event-Error">Error</a>
                </dt>
                <dd>
                    <table summary="This table contains information about the semantics of the given event type" border="1" cellpadding="2" cellspacing="0">
                        <tbody>
                            <tr>
                                <th rowspan="1" colspan="1">Type</th>
                                <td rowspan="1" colspan="1" style="background-color:#cfcfcf">
                                    <strong>
                                        <code>Error</code>
                                    </strong>
                                </td>
                            </tr>
                            <tr>
                                <th rowspan="1" colspan="1">Namespace</th>
                                <td rowspan="1" colspan="1" valign="top">
                                    <code>http://www.w3.org/ns/media-access-event#</code>
                                </td>

                            </tr>
                            <tr>
                                <th rowspan="1" colspan="1">Interface</th>
                                <td rowspan="1" colspan="1" valign="top">
                                    <a href="#MediaAccessEvent-if">
                                        <code>MediaAccessEvent</code>
                                    </a>
                                </td>
                            </tr>
                            <tr>
                                <th rowspan="1" colspan="1">Cancelable</th>
                                <td rowspan="1" colspan="1" valign="top">Yes</td>
                            </tr>
                            <tr>
                                <th rowspan="1" colspan="1">Bubbles</th>
                                <td rowspan="1" colspan="1" valign="top">Yes</td>

                            </tr>
                            <tr>
                                <th rowspan="1" colspan="1">Target</th>
                                <td rowspan="1" colspan="1" valign="top">
                                    <code>the media element holding the URL to the delivered content</code>
                                </td>
                            </tr>
                            <tr>
                                <th rowspan="1" colspan="1">Context info</th>
                                <td rowspan="1" colspan="1" valign="top">none</td>
                            </tr>
                        </tbody>
                    </table>

                    <p>
                        An
                        
        '<a href="#event-Error" class="event-name">Error</a>'
      
                        event <em class="rfc2119" title="Keyword in RFC 2119 context">MUST</em> be fired when an error occurs. The error code provides information about which kind
                        of error has occured.
                    </p>
                </dd>
            </dl>
        </div>

        <p>There <em class="rfc2119" title="Keyword in RFC 2119 context">MUST</em> be at most one event of each of the following types sent within one
            <a class="term" href="#dfn-session">session</a>
            :
            
        '<a href="#event-BeginSessionSetup" class="event-name">BeginSessionSetup</a>'
      
            ,
            
        '<a href="#event-EndSessionSetup" class="event-name">EndSessionSetup</a>'
      
            ,
            
        '<a href="#event-DataRequest" class="event-name">DataRequest</a>'
      
            ,
            
        '<a href="#event-EndOfDataReception" class="event-name">EndOfDataReception</a>'
      
            ,
            
        '<a href="#event-Stop" class="event-name">Stop</a>'
      
            ,
            
        '<a href="#event-Error" class="event-name">Error</a>'
      
        </p>
        <p>There <em class="rfc2119" title="Keyword in RFC 2119 context">MAY</em> be more than one event of each of the following types sent within one
            <a class="term" href="#dfn-session">session</a>
            :
            
        '<a href="#event-DataReceptionProgress" class="event-name">DataReceptionProgress</a>'
      
            ,
            
        '<a href="#event-Playable" class="event-name">Playable</a>'
      
            ,
            
        '<a href="#event-NotPlayable" class="event-name">NotPlayable</a>'
      
        </p>

    </div>


    <div class="section"><h2 id="MediaStreamInfo-if">5. The MediaStreamInfo interface</h2>
        
        <p>
            The
            <a href="#idl-if-MediaStreamInfo" class="if-name">MediaStreamInfo</a>
            interface stores information about a media stream.
        </p>

        <div class="boxed"><p><span class="idlTitle">The MediaStreamInfo interface</span></p><pre class="schema" title="The MediaStreamInfo interface">interface <a href="#idl-if-MediaStreamInfo">MediaStreamInfo</a> {
  readonly attribute DOMString  <a href="#dfn-mediatype">mediaType</a>;
  readonly attribute DOMString  <a href="#dfn-transport">transport</a>;
  readonly attribute DOMString  <a href="#dfn-format">format</a>;
};</pre></div><div class="section" id="idl-if-MediaStreamInfo"><div class="section"><h4 class="idl-header" id="idl-meths-MediaStreamInfo">Attributes</h4><dl class="idl-attr"><dt id="dfn-format"><code>format</code>
      of type
      DOMString, readonly</dt><dd><p>
                            The format of the media in this stream. E.g. "H264". This attribute <em class="rfc2119" title="Keyword in RFC 2119 context">MUST</em> match
                            the format as specified by
                            <a href="http://www.iana.org/">IANA</a>
                            ,
                            <a href="http://www.iana.org/assignments/media-types/">see
                                listing</a>
                            [<cite><a href="#MIME-Media-Types" class="bibref">MIME-Media-Types</a></cite>].
                        </p></dd><dt id="dfn-mediatype"><code>mediaType</code>
      of type
      DOMString, readonly</dt><dd><p>
                            The type of media in this stream, e.g. "video" or "audio". [Editor's note: this wording is
                            under discussion]
                        </p></dd><dt id="dfn-transport"><code>transport</code>
      of type
      DOMString, readonly</dt><dd><p>
                            The protocol this stream is being delivered over, e.g. "RTP" or "HTTP". [Editor's note: this wording is
                            under discussion]
                        </p></dd></dl></div></div>
    </div>


    <div class="section"><h2 id="MediaStreamInfoList-if">6. The MediaStreamInfoList interface</h2>
        
        <p>
            Returns the
            <code>index</code>
            th item in the collection. If
            <code>index</code>
            is greater than or equal to the
            number of
            <a href="#idl-if-MediaStreamInfo" class="if-name">MediaStreamInfo</a>
            s in the list, this returns
            <code>null</code>
            .
        </p>

        <div class="boxed"><p><span class="idlTitle">The MediaStreamInfoList interface</span></p><pre class="schema" title="The MediaStreamInfoList interface">interface <a href="#idl-if-MediaStreamInfoList">MediaStreamInfoList</a> {
  readonly attribute unsigned long  <a href="#dfn-length">length</a>;
  <a href="#idl-if-MediaStreamInfo">MediaStreamInfo</a>    <a href="#dfn-item">item</a>(in unsigned long index);
};</pre></div><div class="section" id="idl-if-MediaStreamInfoList"><div class="section"><h4 class="idl-header" id="idl-meths-MediaStreamInfoList">Attributes</h4><dl class="idl-attr"><dt id="dfn-length"><code>length</code>
      of type
      unsigned long, readonly</dt><dd><p>
                            Returns the
                            <code>number</code>
                            of items in the collection.
                        </p></dd></dl></div><div class="section"><h4 class="idl-header" id="idl-attrs-MediaStreamInfoList">Methods</h4><dl class="idl-meth"><dt id="dfn-item"><code>item</code></dt><dd><p>
                            Returns the
                            <code>index</code>
                            th item in the collection. If
                            <code>index</code>
                            is greater than or equal
                            to the number of
                            <a href="#idl-if-MediaStreamInfo" class="if-name">MediaStreamInfo</a>
                            s in the list, this returns
                            <code>null</code>
                            .
                        </p><dl><dt>Parameters</dt><dd class="idl-params"><dl><dt><code>index</code>
          of type
          unsigned long</dt><dd>
                            Index into the collection.
                        </dd></dl></dd><dt>Return Value</dt><dd><table><tr><td><code></code></td><td>
                            The
                            <a href="#idl-if-MediaStreamInfo" class="if-name">MediaStreamInfo</a>
                            at the
                            <code>index</code>
                            th position in the
                            <a href="#idl-if-MediaStreamInfoList" class="if-name">MediaStreamInfoList</a>
                            ,
                            or
                            <code>null</code>
                            if that is not a valid
                            <code>index</code>
                            .
                        </td></tr></table></dd><dt>No Exceptions</dt></dl></dd></dl></div></div>
    </div>

    <div class="section"><h2 id="conform">7. Conformance</h2>
        
        <p>
            The key words "<em class="rfc2119" title="Keyword in RFC 2119 context">MUST</em>", "<em class="rfc2119" title="Keyword in RFC 2119 context">MUST NOT</em>", "<em class="rfc2119" title="Keyword in RFC 2119 context">REQUIRED</em>", "<em class="rfc2119" title="Keyword in RFC 2119 context">SHALL</em>", "<em class="rfc2119" title="Keyword in RFC 2119 context">SHALL NOT</em>", "<em class="rfc2119" title="Keyword in RFC 2119 context">SHOULD</em>", "<em class="rfc2119" title="Keyword in RFC 2119 context">SHOULD NOT</em>",
            "<em class="rfc2119" title="Keyword in RFC 2119 context">RECOMMENDED</em>", "<em class="rfc2119" title="Keyword in RFC 2119 context">MAY</em>", and "<em class="rfc2119" title="Keyword in RFC 2119 context">OPTIONAL</em>" in this document are to be interpreted as described in
            RFC 2119 [<cite><a href="#RFC2119" class="bibref">RFC2119</a></cite>].
        </p>
        <p>
            Unless otherwise specified immediately following the header, all sections in this
            document - to the exclusion of examples which are all informative - are normative.
        </p>
    </div>


    <div class="section"><h2 id="example">8. Examples of usage</h2><p><strong>This section is informative.</strong></p>
        
        <p>Three examples to illustrate the usage of streaming events.</p>

        <div class="section"><h3 id="example-1">8.1. Simple state information display</h3>
            
            <p>The following example shows the streaming of video. When the playback of the video is stalled due to
                network congestion, a simple text is displayed. When the playback resumes, the text is removed.</p>
            <div class="boxed"><div><span class="exampleTitle">Example: Using MediaAccessEvents in SVG to display a simple message</span></div><pre class="example" title="Using MediaAccessEvents in SVG to display a simple message">&lt;svg xmlns="http://www.w3.org/2000/svg" version="1.2" baseProfile="tiny"
xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:ev="http://www.w3.org/2001/xml-events"
xmlns:se="http://www.w3.org/ns/media-access-event#" width="100%" height="100%"
viewBox="0 0 400 300"&gt;
    &lt;video id="exampleMovie" type="video/h264" xlink:href="rtsp://example.org/movies/exampleMovie.sdp"
           x="0" y="0" width="400" height="300"/&gt;
    &lt;text display="none" id="information" fill="white" x="50" y="50" font-size="30"&gt;
         &lt;set attributeName="display" to="inline" begin="exampleMovie.NotPlayable" fill="freeze"/&gt;
         &lt;set attributeName="display" to="none" begin="exampleMovie.Playable" fill="freeze"/&gt;
        Buffering
    &lt;/text&gt;
&lt;/svg&gt;</pre></div>
        </div>

        <div class="section"><h3 id="example-2">8.2. Buffering progress bar</h3>
            
            <p>The following example shows streaming of video within svg. When playback of the video is stalled due to a
                lack
                of video data a progress bar is displayed. The progress bar indicates how much buffering that is needed
                before
                playback can be resumed. The example is not runnable as is since the intention is to show an example of
                using
                streaming events, not to give a complete svg example.</p>
            <div class="boxed"><div><span class="exampleTitle">Example: Using MediaAccessEvents in SVG to display a buffering progress bar</span></div><pre class="example" title="Using MediaAccessEvents in SVG to display a buffering progress bar">&lt;svg xmlns="http://www.w3.org/2000/svg" version="1.2" baseProfile="tiny"
xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:ev="http://www.w3.org/2001/xml-events"
xmlns:se="http://www.w3.org/ns/media-access-event#"&gt;
    &lt;script type="application/ecmascript"&gt;&lt;![CDATA[
        function initSetup (evt) {
            var setupAnimation = document.getElementById('setupAnimation');
            setupAnimation.setAttributeNS("http://www.w3.org/2000/svg", "visibility", "visible");
            setupAnimation.beginElement();
        }

        function exitSetup (evt) {
            var setupAnimation = document.getElementById('setupAnimation');
            setupAnimation.setAttributeNS("http://www.w3.org/2000/svg", "visibility", "hidden");
            setupAnimation.endElement();
        }

        function bufferStart (evt) {
            var progressBar = document.getElementById('progressBar');
            progressBar.setAttributeNS("http://www.w3.org/2000/svg", "width", "0");
            progressBar.setAttributeNS("http://www.w3.org/2000/svg", "visibility", "visible");
            var bufferAnimation = document.getElementById('bufferAnimation');
            bufferAnimation.setAttributeNS("http://www.w3.org/2000/svg", "visibility", "visible");
            bufferAnimation.beginElement();
        }

        function bufferProgress (evt) {
            var progressBar = document.getElementById('progressBar');
            progressBar.setAttributeNS("http://www.w3.org/2000/svg", "width", 100*(evt.bufferFillLevel));
        }

        function bufferComplete (evt) {
            var progressBar = document.getElementById('progressBar');
            progressBar.setAttributeNS("http://www.w3.org/2000/svg", "visibility", "hidden");
            var bufferAnimation = document.getElementById('bufferAnimation');
            bufferAnimation.setAttributeNS("http://www.w3.org/2000/svg", "visibility", "hidden");
            bufferAnimation.endElement();
        }
    ]]&gt;&lt;/script&gt;

    &lt;video id="exampleMovie" type="video/h264" xlink:href="rtsp://example.org/movies/exampleMovie.sdp"
           x="0" y="0" width="400" height="300"&gt;
        &lt;handler type="application/ecmascript" ev:event="me:BeginSessionSetup"&gt;
            initSetup(evt);
        &lt;/handler&gt;

        &lt;handler type="application/ecmascript" ev:event="me:EndSessionSetup"&gt;
            exitSetup(evt);
        &lt;/handler&gt;

        &lt;handler type="application/ecmascript" ev:event="me:NotPlayable"&gt;
            bufferStart(evt);
        &lt;/handler&gt;

        &lt;handler type="application/ecmascript" ev:event="me:DataRequest"&gt;
            bufferStart(evt);
        &lt;/handler&gt;

        &lt;handler type="application/ecmascript" ev:event="me:DataReceptionProgress"&gt;
            bufferProgress(evt);
        &lt;/handler&gt;

        &lt;handler type="application/ecmascript" ev:event="me:Playable"&gt;
            bufferComplete(evt);
        &lt;/handler&gt;
    &lt;/video&gt;

    &lt;g&gt; ...
        &lt;animate id="bufferAnimation" ... /&gt;
    &lt;/g&gt;

    &lt;g&gt; ...
        &lt;animate id="setupAnimation" ... /&gt;
    &lt;/g&gt;

    &lt;rect id="progressBar" ... /&gt;
&lt;/svg&gt;</pre></div>
        </div>


        <div class="section"><h3 id="example-3">8.3. Stream info box</h3>
            


            <table summary="Layout table" border="0" cellpadding="0" cellspacing="0">
                <tbody>
                    <tr>
                        <td style="width:50%" rowspan="1" colspan="1" valign="top">This example shows streaming of video
                            within svg. An
                            svg-button is available and when clicked it displays a box with information about the video
                            stream. As with
                            the example above this one isn't runnable as is since the svg markup isn't complete. The
                            image to the right
                            shows a possible rendering of the info box in this example.</td>
                        <td rowspan="1" colspan="1" valign="top">
                            <img src="images/example2.jpg" alt="Example of info box" width="385" height="289" />
                        </td>
                    </tr>
                </tbody>
            </table>


            <div class="boxed"><div><span class="exampleTitle">Example: Using MediaAccessEvents in SVG to display a stream info box</span></div><pre class="example" title="Using MediaAccessEvents in SVG to display a stream info box">&lt;svg xmlns="http://www.w3.org/2000/svg" version="1.2" baseProfile="tiny"
xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:ev="http://www.w3.org/2001/xml-events"
xmlns:se="http://www.w3.org/ns/media-access-event#"&gt;
    &lt;script type="application/ecmascript"&gt;&lt;![CDATA[
        function sessionSetupComplete (evt) {
            var sessionName, sessionProtocol;
            var streamFormat, mediaType;
            sessionName = evt.sessionName;
            if (sessionName == 0) sessionName = "No session name available";
            var streamList = evt.getMediaStreams();
            var stream = streamList.item(0);
            if (stream == 0){
                sessionProtocol = "N/A";
                streamFormat = "N/A";
                mediaType = "N/A";
            }
            else{
                sessionProtocol = stream.transport;
                streamFormat = stream.format;
                mediaType = stream.mediaType;
            }
            document.getElementById('sessionNameText').textContent = "Session name: " + sessionName;
            document.getElementById('sessionProtocolText').textContent = "Streaming protocol: " + sessionProtocol;
            document.getElementById('sessionTypeText').textContent = "Streaming media: " + mediaType;
            document.getElementById('sessionFormatText').textContent = "Format/codec: " + streamFormat;
        }

        function showInfo (evt) {
            var infoBox = document.getElementById('infoBox');
            setupAnimation.setAttributeNS("http://www.w3.org/2000/svg", "visibility", "visible");
        }

        function hideInfo (evt) {
            var infoBox = document.getElementById('infoBox');
            setupAnimation.setAttributeNS("http://www.w3.org/2000/svg", "visibility", "hidden");
        }
    ]]&gt;&lt;/script&gt;

    &lt;video id="exampleMovie" type="video/h264" xlink:href="rtsp://example.org/movies/exampleMovie.sdp"
           x="0" y="0" width="400" height="300"&gt;
        &lt;handler type="application/ecmascript" ev:event="me:EndSessionSetup"&gt;
            sessionSetupComplete(evt);
        &lt;/handler&gt;
    &lt;/video&gt;

    &lt;g id="infoButton"&gt; ...
        &lt;handler type="application/ecmascript" ev:event="ev:DOMActivate"&gt;
            showInfo(evt);
        &lt;/handler&gt;
    &lt;/g&gt;

    &lt;g id="infoBox"&gt; ...
        &lt;text id="sessionNameText" ...&gt;&lt;/text&gt;
        &lt;text id="sessionProtocolText" ...&gt;&lt;/text&gt;
        &lt;text id="sessionTypeText" ...&gt;&lt;/text&gt;
        &lt;text id="sessionFormatText" ...&gt;&lt;/text&gt;

        &lt;g id="okButton"&gt; ...
            &lt;handler type="application/ecmascript" ev:event="ev:DOMActivate"&gt;
                hideInfo(evt);
            &lt;/handler&gt;
        &lt;/g&gt;
    &lt;/g&gt;
&lt;/svg&gt;</pre></div>


        </div>

    </div>


    <div class="section"><h2 id="ack">9. Acknowledgements</h2><p><strong>This section is informative.</strong></p>
        
        <p>
            The authors would like to thank Cyril Concolato for his thorough review and excellent contribution.
            We would also like to thank Robin Berjon for ReSpec, the editorial framework upon
            which this specification is written.
        </p>
    </div>

    <div class="section"><h2 id="bibref">A. References</h2>
        
        <dl class="bibliography">

            


        <dt id="DOM3EV">DOM3EV</dt><dd><cite><a href="http://www.w3.org/TR/DOM-Level-3-Events/">Document Object Model (DOM) Level 3 Events Specification</a></cite>,
    <span class="person">Philippe Le Hégaret (W3C)</span>, and <span class="person">Tom Pixley (Netscape Communications Corporation)</span>.</dd><dt id="MIME-Media-Types">MIME-Media-Types</dt><dd><cite><a href="http://www.iana.org/assignments/media-types/">IANA MIME Media Types</a></cite>,
    </dd><dt id="RFC2119">RFC2119</dt><dd><cite><a href="http://www.ietf.org/rfc/rfc2119.txt">Key words for use in RFCs to Indicate Requirement Levels</a></cite>,
    <span class="person">S. Bradner</span>.</dd><dt id="SVGT12">SVGT12</dt><dd><cite><a href="http://www.w3.org/TR/SVGMobile12/">Scalable Vector Graphics (SVG) Tiny 1.2 Specification</a></cite>,
    <span class="person">Ola Andersson &lt;<a href="mailto:ola.andersson@ikivo.com">ola.andersson@ikivo.com</a>&gt;</span>, <span class="person">Robin Berjon &lt;<a href="mailto:robin.berjon@expway.fr">robin.berjon@expway.fr</a>&gt;</span>, <span class="person">Jon Ferraiolo &lt;<a href="mailto:jon.ferraiolo@adobe.com">jon.ferraiolo@adobe.com</a>&gt;</span>, <span class="person">Vincent Hardy &lt;<a href="mailto:vincent.hardy@sun.com">vincent.hardy@sun.com</a>&gt;</span>, <span class="person">Scott Hayman</span>, <span class="person">Dean Jackson &lt;<a href="mailto:dean@w3.org">dean@w3.org</a>&gt;</span>, <span class="person">Craig Northway &lt;<a href="mailto:craign@cisra.canon.com.au">craign@cisra.canon.com.au</a>&gt;</span>, and <span class="person">Antoine Quint &lt;<a href="mailto:aq@fuchsia-design.com">aq@fuchsia-design.com</a>&gt;</span>.</dd></dl>
    </div>
    
</body>
</html>