├── ECHIDNA ├── README.markdown ├── index.html └── w3c.json /ECHIDNA: -------------------------------------------------------------------------------- 1 | # ECHIDNA configuration 2 | index.html?specStatus=WG-NOTE;shortName=tvcontrol-api respec 3 | -------------------------------------------------------------------------------- /README.markdown: -------------------------------------------------------------------------------- 1 | TV Control API 2 | ============== 3 | 4 | This repository contains the editor's draft of the [TV Control API](https://w3c.github.io/tvcontrol-api) specification, developed by the [W3C TV Control Working Group](https://www.w3.org/2016/tvcontrol/). 5 | 6 | Work on the specification has been discontinued in May 2017 and the Working Group was closed. The TV Control API should not be considered as stable, referenced or used as a basis for implementation. Discussions on scope, use cases and requirements have now moved to the [W3C Web and TV Interest Group](https://www.w3.org/2011/webtv/). 7 | 8 | ## Use cases and requirements 9 | 10 | * [High-level Use Cases](http://www.w3.org/2011/webtv/wiki/Media_APIs/Use_Cases) 11 | * [Requirements](http://www.w3.org/2011/webtv/wiki/Media_APIs/Requirements) 12 | * [Technical Requirements](http://www.w3.org/community/tvapi/wiki/Main_Page/Technical_Requirement) 13 | 14 | ## History 15 | 16 | The Final Community Report of the [TV Control API specification](http://www.w3.org/2015/tvapi/Overview.html), published by the [TV Control API Community Group](https://www.w3.org/community/tvapi/), served as starting point for this specification. 17 | 18 | The W3C TV Control Working Group developed the TV Control API specification between May 2016 and May 2017. The group is now closed. 19 | -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 |<video>
and <audio>
102 | HTML elements. The API is agnostic of any underlying audio or video
103 | sourcing technologies.
104 | 108 | Work on this document has been discontinued and it should not be 109 | considered as stable, referenced or used as a basis for 110 | implementation. 111 |
112 | 113 |114 | The API did not significantly change since publication as Working 115 | Draft on 16 March 2017. 118 |
119 |120 | Further discussions on scope, use cases and requirements are needed for 121 | this work to succeed on the Recommendation track. At the time of 122 | publication, these discussions are being held in the 123 | Web and TV Interest Group. 124 | The TV Control Working Group invites interested parties to join and 125 | contribute to that group. Technical work on this document has been 126 | discontinued in the meantime and the TV Control Working Group has 127 | been closed as a result. 128 |
129 |
136 | This specification defines the TV Control API, which aims to enable web
137 | applications to present audio and video media from broadcast TV and
138 | radio, IPTV, or other sources, using the <audio>
and
139 | <video>
HTML elements. The API provides access to
140 | programme and service information and allows media recordings to be
141 | scheduled and replayed.
142 |
144 | TV functionality is accessed through the TVManager object which,
145 | via the TVSource object allows applications
146 | to select and present a TV or Radio channel. Presentation is achieved
147 | by obtaining a TVMediaStream object from the TVSource and
148 | assigning this to the srcObject
attribute of an
149 | HTMLMediaElement
. The TVMediaStream
150 | interface extends MediaStream
to allow buffering of
151 | the received media, to enable pause/resume and timeshifted playback.
152 |
154 | The TVTuner
class has been removed from this draft. See this issue for
156 | details.
157 |
159 | TVManager also allows recordings to be scheduled and replayed, 160 | and application control of the parental lock, to prevent unwanted 161 | viewing of particular channels or programs. 162 |
163 |164 | TVSource gives access to lists of available channels and 165 | programs, and allows applications to set the current channel to be 166 | presented. TVChannel contains TV and Radio channel attributes, 167 | and program schedule information, as a collection of TVProgram 168 | objects. 169 |
170 |The following terms are defined in [[!HTML]]:
177 |audio
elementEventHandler
Navigator
HTMLMediaElement
TimeRanges
TextTrack
TextTrackCue
video
element
190 | The Event
and
191 | EventTarget
192 | interfaces are defined in [[!DOM]].
193 |
195 | The Promise
196 | interface, the concepts of a resolver,
197 | a resolver's fulfill
198 | algorithm and a resolver's reject
199 | algorithm are defined in [[ECMAScript]].
200 |
202 | The MediaStream
203 | interface and the ConstrainLong
204 | type are defined in [[!MediaCapture-Streams]].
205 |
207 | The MediaRecorder
208 | interface is defined in [[MediaStream-Recording]].
209 |
partial interface Navigator { 217 | [SameObject] 218 | readonly attribute TVControl tv; 219 | };220 |
tv
of type TVControl, readonly
228 | 242 | The TVControl interface represents the entry point in to the TV 243 | Control API for applications. 244 |
245 |interface TVControl { 246 | Promise<TVManager> getTVManager(); 247 | Promise<TVManager> getRadioManager(); 248 | };249 |
getTVManager
257 | TVManager
that can be used for
261 | interacting with TV services available through the device. Note that
262 | these services may include radio services delivered via a digital TV
263 | system.
264 | getRadioManager
274 | TVManager
that can be used for
278 | interacting with radio services (e.g. delivered via AM, FM or DAB)
279 | available through the device.
280 | 299 | The TVManager interface represents the set of operations that can 300 | be used to manage the TV/Radio device. 301 |
302 |The location of the
303 | getChannelList()
method is still under discussion: this draft
304 | includes versions of this method on both the TVManager and
305 | TVSource interfaces. It is highly likely that one of these
306 | will be removed in a future draft.
interface TVManager : EventTarget { 308 | TVSourceCapabilities getCapabilities(); 309 | TVSourceSupportedConstraints getSupportedConstraints(); 310 | Promise<TVSource> getSource(TVSourceConstraints constraints); 311 | boolean isSourceAvailable(TVSourceConstraints constraints); 312 | 313 | Promise<sequence<TVChannel>> getChannelList(TVSourceConstraints constraints); 314 | 315 | Promise<TVRecording> addRecording (TVAddRecordingOptions option); 316 | Promise<void> removeRecording (DOMString id); 317 | Promise<sequence<TVRecording>> getRecordings (optional TVGetRecordingsOptions options); 318 | Promise<void> setParentalControlPin (DOMString oldPin, DOMString newPin); 319 | Promise<void> setParentalControl (DOMString pin, boolean isLocked); 320 | Promise<sequence<TVCICard>> getCICards (); 321 | readonly attribute unsigned long long totalRecordingSize; 322 | readonly attribute unsigned long long availableRecordingSize; 323 | readonly attribute boolean isParentalControlled; 324 | attribute EventHandler ontunerchange; 325 | attribute EventHandler onrecordingchange; 326 | attribute EventHandler onparentalcontrolchange; 327 | attribute EventHandler oncicardchange; 328 | };329 |
totalRecordingSize
of type unsigned long long, readonly
338 | availableRecordingSize
of type unsigned long long, readonly
345 | isParentalControlled
of type boolean, readonly
352 | ontunerchange
of type EventHandler
361 | onrecordingchange
of type EventHandler
370 | onparentalcontrolchange
of type
378 | EventHandler
379 | oncicardchange
of type EventHandler
387 | getCapabilities
401 | TVSourceCapabilities
405 | object that describes the capabilities of the device for receiving
406 | and decoding TV or radio services.
407 | getSupportedConstraints
417 | TVSourceSupportedConstraints
421 | object that describes the set of constraints that may be specified when
422 | requesting a TVSource object.
423 | getSource
433 | Promise
that will be used to notify the
438 | caller about the result of the operation, which is a TVSource
439 | obect.
440 | 444 | Parameter 445 | | 446 |447 | Type 448 | | 449 |450 | Nullable 451 | | 452 |453 | Optional 454 | | 455 |456 | Description 457 | | 458 |
---|---|---|---|---|
461 | option 462 | | 463 |464 | TVSourceConstraints 465 | | 466 |467 | ✘ 468 | | 469 |470 | ✘ 471 | | 472 |473 | Specifies the constraints for the requested TV source. 474 | | 475 |
isSourceAvailable
486 | true
if a TV/Radio source that
489 | matches the specified constraints is currently available, and
490 | false
otherwise. Note that the availability of a
491 | TVSource will depend on the number of streams being
492 | decoded by the device, and may also depend on other factors.
493 | 497 | Parameter 498 | | 499 |500 | Type 501 | | 502 |503 | Nullable 504 | | 505 |506 | Optional 507 | | 508 |509 | Description 510 | | 511 |
---|---|---|---|---|
514 | option 515 | | 516 |517 | TVSourceConstraints 518 | | 519 |520 | ✘ 521 | | 522 |523 | ✘ 524 | | 525 |526 | Specifies the constraints for the requested TV source. 527 | | 528 |
boolean
535 | getChannelList
539 | Promise
that
544 | will be used to notify the caller about the result of the
545 | operation, which is a sequence of TVChannel elements.
546 | 550 | Parameter 551 | | 552 |553 | Type 554 | | 555 |556 | Nullable 557 | | 558 |559 | Optional 560 | | 561 |562 | Description 563 | | 564 |
---|---|---|---|---|
567 | option 568 | | 569 |570 | TVSourceConstraints 571 | | 572 |573 | ✘ 574 | | 575 |576 | ✘ 577 | | 578 |579 | Specifies the constraints for the requested channel list. 580 | | 581 |
addRecording
594 | Promise
that will be used to notify the caller
600 | about the result of the operation, which is a newly-created
601 | TVRecording object.Promise
should be rejected. Applications may
610 | handle this situation with their own strategy, such as explicitly
611 | removing the conflicts and re-adding the one to conserve.
612 | 616 | Parameter 617 | | 618 |619 | Type 620 | | 621 |622 | Nullable 623 | | 624 |625 | Optional 626 | | 627 |628 | Description 629 | | 630 |
---|---|---|---|---|
633 | option 634 | | 635 |636 | TVAddRecordingOptions 637 | | 638 |639 | ✘ 640 | | 641 |642 | ✘ 643 | | 644 |645 | Specifies the options for adding recording. 646 | | 647 |
Promise<TVRecording>
652 | removeRecording
656 | Promise
that will be used to notify the
660 | caller about the result of the operation.
661 | 665 | Parameter 666 | | 667 |668 | Type 669 | | 670 |671 | Nullable 672 | | 673 |674 | Optional 675 | | 676 |677 | Description 678 | | 679 |
---|---|---|---|---|
682 | id 683 | | 684 |
685 | DOMString
686 | |
687 | 688 | ✘ 689 | | 690 |691 | ✘ 692 | | 693 |694 | Specifies the ID of the recording to be removed. 695 | | 696 |
Promise<void>
701 | getRecordings
705 | Promise
that will be used to notify the caller
710 | about the result of the operation.
711 | 715 | Parameter 716 | | 717 |718 | Type 719 | | 720 |721 | Nullable 722 | | 723 |724 | Optional 725 | | 726 |727 | Description 728 | | 729 |
---|---|---|---|---|
732 | options 733 | | 734 |735 | TVGetRecordingsOptions 736 | | 737 |738 | ✘ 739 | | 740 |741 | ✔ 742 | | 743 |744 | Specifies the options for getting recordings. 745 | | 746 |
Promise<sequence<TVRecording>>
752 | setParentalControlPin
756 | Promise
may be rejected with an
763 | InvalidAccessError
if the old PIN does not match the
764 | current one.
765 | 769 | Parameter 770 | | 771 |772 | Type 773 | | 774 |775 | Nullable 776 | | 777 |778 | Optional 779 | | 780 |781 | Description 782 | | 783 |
---|---|---|---|---|
786 | oldPin 787 | | 788 |
789 | DOMString
790 | |
791 | 792 | ✘ 793 | | 794 |795 | ✘ 796 | | 797 |798 | Specifies the old PIN used for parental control. 799 | | 800 |
803 | newPin 804 | | 805 |
806 | DOMString
807 | |
808 | 809 | ✘ 810 | | 811 |812 | ✘ 813 | | 814 |815 | Specifies the new PIN used for parental control. 816 | | 817 |
Promise<void>
822 | setParentalControl
826 | Promise
may be rejected with an
832 | InvalidAccessError
if the PIN does not match the
833 | current one.
834 | 838 | Parameter 839 | | 840 |841 | Type 842 | | 843 |844 | Nullable 845 | | 846 |847 | Optional 848 | | 849 |850 | Description 851 | | 852 |
---|---|---|---|---|
855 | pin 856 | | 857 |
858 | DOMString
859 | |
860 | 861 | ✘ 862 | | 863 |864 | ✘ 865 | | 866 |867 | Specifies the PIN used for parental control. 868 | | 869 |
872 | isLocked 873 | | 874 |
875 | boolean
876 | |
877 | 878 | ✘ 879 | | 880 |881 | ✘ 882 | | 883 |884 | Specifies the parental control status. 885 | | 886 |
Promise<void>
891 | getCICards
895 | Promise
that will be used to
900 | notify the caller about the result of the operation, which is an
901 | array of TVCICard elements.
902 | 917 | The addRecording method when invoked MUST run 918 | the following steps: 919 |
920 |Promise
922 | object and resolver be its associated
923 | resolver.
924 | options
parameter.
929 | value
argument.
933 | value
argument.
941 | 946 | The removeRecording method when invoked MUST 947 | run the following steps: 948 |
949 |Promise
951 | object and resolver be its associated
952 | resolver.
953 | value
argument.
961 | value
argument.
966 | 971 | The getRecordings method when invoked MUST 972 | run the following steps: 973 |
974 |Promise
976 | object and resolver be its associated
977 | resolver.
978 | options
983 | parameter.
984 | value
argument.
988 | value
argument.
996 | 1001 | The setParentalControlPin method when invoked 1002 | MUST run the following steps: 1003 |
1004 |Promise
1006 | object and resolver be its associated
1007 | resolver.
1008 | newPin
parameter.
1013 | value
argument.
1017 | value
argument.
1022 | 1027 | The setParentalControl method when invoked 1028 | MUST run the following steps: 1029 |
1030 |Promise
1032 | object and resolver be its associated
1033 | resolver.
1034 | isLocked
parameter.
1039 | value
argument.
1043 | value
argument.
1048 | 1053 | The getCICards method when invoked MUST run 1054 | the following steps: 1055 |
1056 |Promise
1058 | object and resolver be its associated
1059 | resolver.
1060 | value
argument.
1069 | value
argument.
1077 | 1087 | The following are the event handlers (and their corresponding 1088 | event types) that MUST be supported as attributes by the 1089 | TVManager object. 1090 |
1091 |1095 | Event handler 1096 | | 1097 |1098 | Event name 1099 | | 1100 |1101 | Event type 1102 | | 1103 |1104 | Short description 1105 | | 1106 |
---|---|---|---|
1111 | ontunerchange
1112 | |
1113 |
1114 | tunerchange
1116 | |
1117 |
1118 | TVTunerChangeEvent
1119 | |
1120 | 1121 | Handles the information of the TV/Radio tuner that is 1122 | added/removed by the device. 1123 | | 1124 |
1127 | onrecordingchange
1128 | |
1129 |
1130 | recordingchange
1132 | |
1133 |
1134 | TVRecordingChangeEvent
1135 | |
1136 | 1137 | Handles the information of the updates for TV/Radio recordings. 1138 | | 1139 |
1142 | onparentalcontrolchange
1143 | |
1144 |
1145 | parentalcontrolchange
1147 | |
1148 |
1149 | Event
1150 | |
1151 | 1152 | Handles the information of the status changes for parental 1153 | control. 1154 | | 1155 |
1158 | oncicardchange
1159 | |
1160 |
1161 | cicardchange
1163 | |
1164 |
1165 | TVCICardChangeEvent
1166 | |
1167 | 1168 | Handles the information of the status changes of the TV CI 1169 | (Common Interface) card in the TV device. 1170 | | 1171 |
1182 | The TVSource interface represents a logical source of TV/Radio 1183 | channels. This may represent a physical tuner or a "virtual" tuner 1184 | for channels delivered via IP. The TVSource exposes the list 1185 | of TVChannel objects available through that source. For 1186 | devices with more than one type of tuner (e.g. cable and 1187 | terrestrial), each tuner type may be represented by a different 1188 | TVSource. 1189 |
1190 |interface TVSource : EventTarget { 1191 | TVSourceConstraints getConstraints (); 1192 | TVSourceSettings getSettings (); 1193 | 1194 | Promise<sequence<TVChannel>> getChannels (); 1195 | Promise<TVMediaStream> tuneToChannel (TVChannel channel); 1196 | Promise<TVMediaStream> tuneTo (DOMString tuningParams); 1197 | 1198 | Promise<void> startScanning (optional TVStartScanningOptions options); 1199 | Promise<void> stopScanning (); 1200 | readonly attribute TVSourceType type; 1201 | readonly attribute TVMediaStream? stream; 1202 | readonly attribute boolean isScanning; 1203 | readonly attribute TVChannel? currentChannel; 1204 | attribute EventHandler oncurrentchannelchange; 1205 | attribute EventHandler oneitbroadcast; 1206 | attribute EventHandler onemergencyalert; 1207 | attribute EventHandler onscanningstatechange; 1208 | };1209 |
type
of type TVSourceType, readonly
1218 | stream
of type TVMediaStream, readonly, nullable
1225 | TVMediaStream
object extended
1228 | from MediaStream
and currently streamed by the
1229 | source, which can be played by the video
1230 | element by assigning the TVMediaStream
1231 | (MediaStream
) to the
1232 | HTMLMediaElement
's srcObject
1233 | attribute and can be recorded by the
1234 | MediaRecorder
.null
if the source is not streaming any
1236 | data, which happens when the streaming signal is broken or due to
1237 | any reason that makes the TV source fail to do so.isScanning
of type boolean, readonly
1244 | currentChannel
of type TVChannel, readonly, nullable
1252 | null
if the
1256 | TV/Radio tuner is not streaming any data.
1257 | oncurrentchannelchange
of type
1260 | EventHandler
1261 | oneitbroadcast
of type EventHandler
1271 | onemergencyalert
of type EventHandler
1280 | onscanningstatechange
of type EventHandler
1290 | startScanning
or
1296 | the method stopScanning
starts or stops
1297 | scanning the TV/Radio channels, or when a channel is found during
1298 | the channel scan.
1299 | getConstraints
1309 | TVSourceConstraints
1318 | getSettings
1322 | TVSourceSettings
1331 | getChannels
1335 | Promise
that will be used to notify the caller
1340 | about the result of the operation, which is an array of
1341 | TVChannel elements that belong to the source. And if
1342 | parental control is enabled, the array of TVChannel elements
1343 | should exclude the locked channels. Note that the
1344 | Promise
may be rejected with an
1345 | InvalidStateError
if this method gets called during
1346 | channel scanning.
1347 | tuneToChannel
1357 | channel
parameter. It returns a
1361 | new Promise
that will be used to notify the
1362 | caller about the result of the operation. Note that the
1363 | Promise
may be rejected with an
1364 | InvalidStateError
if this method is called during
1365 | channel scanning, or be rejected with an
1366 | InvalidAccessError
if parental control is enabled and
1367 | the channel is locked.
1368 | 1372 | Parameter 1373 | | 1374 |1375 | Type 1376 | | 1377 |1378 | Nullable 1379 | | 1380 |1381 | Optional 1382 | | 1383 |1384 | Description 1385 | | 1386 |
---|---|---|---|---|
1389 | channel 1390 | | 1391 |1392 | TVChannel 1393 | | 1394 |1395 | ✘ 1396 | | 1397 |1398 | ✘ 1399 | | 1400 |1401 | Specifies the TV/Radio channel to be tuned to. 1402 | | 1403 |
Promise<TVMediaStream>
1408 | tuneTo
1412 | tuningParams
parameter. It returns a
1416 | new Promise
that will be used to notify the
1417 | caller about the result of the operation. Note that the
1418 | Promise
may be rejected with an
1419 | InvalidStateError
if this method is called during
1420 | channel scanning, or be rejected with an
1421 | InvalidAccessError
if parental control is enabled and
1422 | the channel is locked.
1423 | 1427 | Parameter 1428 | | 1429 |1430 | Type 1431 | | 1432 |1433 | Nullable 1434 | | 1435 |1436 | Optional 1437 | | 1438 |1439 | Description 1440 | | 1441 |
---|---|---|---|---|
1444 | tuningParams 1445 | | 1446 |
1447 | DOMString
1448 | |
1449 | 1450 | ✘ 1451 | | 1452 |1453 | ✘ 1454 | | 1455 |1456 | Specifies the tuning parameters of the TV/Radio channel to be tuned to. 1457 | | 1458 |
Promise<TVMediaStream>
1463 | startScanning
1467 | options
parameter. It returns a new
1472 | Promise
that will be used to notify the caller
1473 | about the result of the operation. Note that this method has to be
1474 | called first at some setup stages, so that the method
1475 | getChannels
can retrieve the channels that have
1476 | successfully been scanned by the source. Besides, due to some
1477 | constraints of tuner modules, scanning and streaming are not
1478 | encouraged to run at the same time.
1479 | 1483 | Parameter 1484 | | 1485 |1486 | Type 1487 | | 1488 |1489 | Nullable 1490 | | 1491 |1492 | Optional 1493 | | 1494 |1495 | Description 1496 | | 1497 |
---|---|---|---|---|
1500 | options 1501 | | 1502 |1503 | TVStartScanningOptions 1504 | | 1505 |1506 | ✘ 1507 | | 1508 |1509 | ✔ 1510 | | 1511 |
1512 | Specifies the options for scanning the TV/Radio channels.
1513 | The isRescanned option in the
1514 | options parameter specifies whether or not the
1515 | process of scanning the TV/Radio channels has to clear the
1516 | currently scanned TV/Radio channels before scanning; if it
1517 | is not passed, this method will rescan all the TV/Radio
1518 | channels as if it is passed as true .
1519 | |
1520 |
Promise<void>
1525 | stopScanning
1529 | Promise
that
1533 | will be used to notify the caller about the result of the
1534 | operation.
1535 | Promise<void>
1540 | 1549 | The getChannels method when invoked MUST run 1550 | the following steps: 1551 |
1552 |Promise
1554 | object and resolver be its associated
1555 | resolver.
1556 | value
argument.
1565 | value
argument.
1573 | 1578 | The tuneToChannel method when invoked 1579 | MUST run the following steps: 1580 |
1581 |Promise
1583 | object and resolver be its associated
1584 | resolver.
1585 | channel
1590 | parameter.
1591 | value
argument.
1595 | value
argument.
1603 | 1608 | The tuneTo method when invoked 1609 | MUST run the following steps: 1610 |
1611 |Promise
1613 | object and resolver be its associated
1614 | resolver.
1615 | tuningParams
1620 | parameter.
1621 | value
argument.
1625 | value
argument.
1633 | 1638 | The startScanning method when invoked MUST 1639 | run the following steps: 1640 |
1641 |Promise
1643 | object and resolver be its associated
1644 | resolver.
1645 | options
parameter. If the
1651 | isRescanned
option in the options
parameter
1652 | is not passed or it is passed as true
, the user
1653 | agent MUST clear the currently scanned TV/Radio channels before
1654 | scanning; if it is passed as false
, the user
1655 | agent will simply scan additional TV/Radio channels which haven't
1656 | been scanned yet.
1657 | value
argument.
1661 | value
argument.
1666 | 1671 | The stopScanning method when invoked MUST run 1672 | the following steps: 1673 |
1674 |Promise
1676 | object and resolver be its associated
1677 | resolver.
1678 | value
argument.
1687 | value
argument.
1692 | 1702 | The following are the event handlers (and their corresponding 1703 | event types) that MUST be supported as attributes by the 1704 | TVSource object. 1705 |
1706 |1710 | Event handler 1711 | | 1712 |1713 | Event name 1714 | | 1715 |1716 | Event type 1717 | | 1718 |1719 | Short description 1720 | | 1721 |
---|---|---|---|
1726 | oncurrentchannelchange
1727 | |
1728 |
1729 | currentchannelchange
1731 | |
1732 |
1733 | TVCurrentChannelChangeEvent
1734 | |
1735 | 1736 | Handles the information of the currently streamed TV/Radio 1737 | channel that is tuned by the method 1738 | tuneTo or tuneToChannel. 1739 | | 1740 |
1743 | oneitbroadcast
1744 | |
1745 |
1746 | eitbroadcast
1748 | |
1749 |
1750 | TVEITBroadcastEvent
1751 | |
1752 | 1753 | Handles the information of the available TV programs in the EIT 1754 | that is broadcast by the TV source. 1755 | | 1756 |
1759 | onemergencyalert
1760 | |
1761 |
1762 | emergencyalert
1764 | |
1765 |
1766 | TVEmergencyAlertEvent
1767 | |
1768 | 1769 | Handles the information of the emergency alert when an 1770 | emergency, such as earthquake or tsunami, occurs and is 1771 | broadcast by the TV/Radio source. 1772 | | 1773 |
1776 | onscanningstatechange
1777 | |
1778 |
1779 | scanningstatechange
1781 | |
1782 |
1783 | TVScanningStateChangeEvent
1784 | |
1785 | 1786 | Handles the information of the state of scanning the TV/Radio 1787 | channels, which is changed by the source. 1788 | | 1789 |
1800 | TVSourceSupportedConstraints represents the list of constraints 1801 | recognized by a User Agent for controlling the Capabilities of a 1802 | TVSource object. This dictionary is used as a function return 1803 | value, and never as an operation argument. 1804 | 1805 | 1806 |
1807 |dictionary TVSourceSupportedConstraints { 1808 | boolean deliverySystem = true; 1809 | boolean height = true; 1810 | boolean channel = true; 1811 | boolean tuningStep = true; 1812 | 1813 | };1814 |
deliverySystem
of type boolean defaulting to true
1823 | height
of type boolean defaulting to true
1831 | channel
of type boolean defaulting to true
1839 | tuningStep
of type boolean defaulting to true
1847 | 1862 | TVSourceCapabilities represents the capabilities of a TVSource object 1863 |
1864 |dictionary TVSourceCapabilities { 1865 | sequence <TVSourceType> deliverySystem; 1866 | long height; 1867 | long tuningStep; 1868 | };1869 |
deliverySystem
of type sequence <TVSourceType>
1878 | height
of type long
1885 | tuningStep
of type long
1892 | 1906 | TVSourceConstraints represents the list of constraints 1907 | recognized by a User Agent for controlling the Capabilities of a 1908 | TVSource object. 1909 | 1910 | 1911 |
1912 |dictionary TVSourceConstraints { 1913 | sequence<TVSourceType> deliverySystem; 1914 | ConstrainLong height; 1915 | TVChannel channel; 1916 | ConstrainLong tuningStep; 1917 | 1918 | };1919 |
deliverySystem
of type sequence <TVSourceType>
1928 | height
of type ConstrainLong
1935 | channel
of type TVChannel
1942 | tuningStep
of type ConstrainLong
1949 | 1963 | TVSourceSettings represents the Settings of a 1964 | TVSource object. 1965 | 1966 |
1967 |dictionary TVSourceSettings { 1968 | sequence <TVSourceType> deliverySystem; 1969 | ConstrainLong height; 1970 | TVChannel channel; 1971 | ConstrainLong tuningStep; 1972 | 1973 | };1974 |
deliverySystem
of type sequence <TVSourceType>
1983 | height
of type long
1990 | channel
of type TVChannel
1996 | tuningStep
of type long
2003 | The names of the initial set of constrainable properties for 2013 | TVSource are defined below.
2014 | 2015 |Property Name | 2019 |Values | 2020 |Notes | 2021 |
---|---|---|
deliverySystem | 2026 |sequence <TVSourceType> |
2027 | The delivery system or systems that must be supported. | 2028 |
height | 2031 |ConstrainLong | 2032 |The height or height range, in pixels. As a capability, the 2033 | range should span the video source's pre-set height values with 2034 | min being the smallest height and max being the largest 2035 | height. | 2036 |
channel | 2039 |TVChannel | 2040 |A channel that must be able to be received and decoded by the source. | 2041 |
The delivery system may be one of the following values of 2045 | TVSourceType:
2046 |enum TVSourceType { 2048 | "dvb-t", 2049 | "dvb-t2", 2050 | "dvb-c", 2051 | "dvb-c2", 2052 | "dvb-s", 2053 | "dvb-s2", 2054 | "dvb-h", 2055 | "dvb-sh", 2056 | "atsc", 2057 | "atsc-m/h", 2058 | "isdb-t", 2059 | "isdb-tb", 2060 | "isdb-s", 2061 | "isdb-c", 2062 | "1seg", 2063 | "dtmb", 2064 | "cmmb", 2065 | "t-dmb", 2066 | "s-dmb", 2067 | "dab", 2068 | "drm", 2069 | "fm", 2070 | "AM" 2071 | };2072 |
2077 | Enumeration description 2078 | | 2079 ||
---|---|
2082 | dvb-t 2083 | | 2084 |2085 | The source works for DVB-T (terrestrial). 2086 | | 2087 |
2090 | dvb-t2 2091 | | 2092 |2093 | The source works for DVB-T2 (terrestrial). 2094 | | 2095 |
2098 | dvb-c 2099 | | 2100 |2101 | The source works for DVB-C (cable). 2102 | | 2103 |
2106 | dvb-c2 2107 | | 2108 |2109 | The source works for DVB-C2 (cable). 2110 | | 2111 |
2114 | dvb-s 2115 | | 2116 |2117 | The source works for DVB-S (satellite). 2118 | | 2119 |
2122 | dvb-s2 2123 | | 2124 |2125 | The source works for DVB-S2 (satellite). 2126 | | 2127 |
2130 | dvb-h 2131 | | 2132 |2133 | The source works for DVB-H (handheld). 2134 | | 2135 |
2138 | dvb-sh 2139 | | 2140 |2141 | The source works for DVB-SH (satellite). 2142 | | 2143 |
2146 | atsc 2147 | | 2148 |2149 | The source works for ATSC (terrestrial/cable). 2150 | | 2151 |
2154 | atsc-m/h 2155 | | 2156 |2157 | The source works for ATSC-M/H (mobile/handheld). 2158 | | 2159 |
2162 | isdb-t 2163 | | 2164 |2165 | The source works for ISDB-T (terrestrial). 2166 | | 2167 |
2170 | isdb-tb 2171 | | 2172 |2173 | The source works for ISDB-Tb (terrestrial, Brazil). 2174 | | 2175 |
2178 | isdb-s 2179 | | 2180 |2181 | The source works for ISDB-S (satellite). 2182 | | 2183 |
2186 | isdb-c 2187 | | 2188 |2189 | The source works for ISDB-C (cable). 2190 | | 2191 |
2194 | 1seg 2195 | | 2196 |2197 | The source works for 1seg (handheld). 2198 | | 2199 |
2202 | dtmb 2203 | | 2204 |2205 | The source works for DTMB (terrestrial). 2206 | | 2207 |
2210 | cmmb 2211 | | 2212 |2213 | The source works for CMMB (handheld). 2214 | | 2215 |
2218 | t-dmb 2219 | | 2220 |2221 | The source works for T-DMB (terrestrial). 2222 | | 2223 |
2226 | s-dmb 2227 | | 2228 |2229 | The source works for S-DMB (satellite). 2230 | | 2231 |
2234 | dab 2235 | | 2236 |2237 | The source works for DAB (terrestrial). 2238 | | 2239 |
2242 | drm 2243 | | 2244 |2245 | The source works for DRM (terrestrial). 2246 | | 2247 |
2250 | fm 2251 | | 2252 |2253 | The source works for FM (terrestrial). 2254 | | 2255 |
2258 | AM 2259 | | 2260 |2261 | The source works for AM (terrestrial). 2262 | | 2263 |
The following constrainable properties are defined to apply only to 2268 | radio TVSource objects:
2269 |Property Name | 2273 |Values | 2274 |Notes | 2275 |
---|---|---|
tuningStep | 2280 |ConstrainLong | 2281 |The exact tuning step size (in KHz) supported by the tuner. 2282 | | 2283 |
2294 | The TVChannel interface represents a single TV or radio channel 2295 | and provides metadata about it. Each TVChannel object represents 2296 | a single channel that is available through one TVSource, for 2297 | instance a DVB Service or ATSC Virtual Channel. If the same channel is 2298 | available through two different sources (e.g. over cable and 2299 | terrestrial) then each TVSource will return a different 2300 | TVChannel object. 2301 |
2302 |interface TVChannel: EventTarget { 2303 | Promise<sequence<TVProgram>> getPrograms (optional TVGetProgramsOptions options); 2304 | Promise<TVProgram> getCurrentProgram (); 2305 | Promise<sequence<TVApplication>> getApplications (); 2306 | Promise<void> setParentalLock (DOMString pin, boolean isLocked); 2307 | readonly attribute TVSource source; 2308 | readonly attribute TVChannelType type; 2309 | readonly attribute TVChannelAttributes attributes; 2310 | readonly attribute DOMString name; 2311 | readonly attribute DOMString number; 2312 | readonly attribute boolean isEmergency; 2313 | readonly attribute boolean isEncrypted; 2314 | readonly attribute DOMString? casSystemId; 2315 | readonly attribute boolean isParentalLocked; 2316 | attribute EventHandler onparentallockchange; 2317 | };2318 |
source
of type TVSource, readonly
2327 | type
of type TVChannelType, readonly
2334 | attributes
of type TVChannelAttributes, readonly
2341 | "NHK"
, etc.
2345 | name
of type DOMString, readonly
2349 | "CNN"
, "NHK"
, etc.
2353 | number
of type DOMString, readonly
2357 | "12-1"
, "12-2"
, etc.
2361 | isEmergency
of type boolean, readonly
2365 | isEncrypted
of type boolean, readonly
2373 | casSystemId
of type DOMString, readonly, nullable
2380 | isParentalLocked
of type boolean, readonly
2389 | onparentallockchange
of type EventHandler
2397 | getPrograms
2411 | options
2415 | parameter. It returns a new Promise
that will
2416 | be used to notify the caller about the result of the operation,
2417 | which is an array of TVProgram elements that belong to the
2418 | TV/Radio channel.
2419 | 2423 | Parameter 2424 | | 2425 |2426 | Type 2427 | | 2428 |2429 | Nullable 2430 | | 2431 |2432 | Optional 2433 | | 2434 |2435 | Description 2436 | | 2437 |
---|---|---|---|---|
2440 | options 2441 | | 2442 |2443 | TVGetProgramsOptions 2444 | | 2445 |2446 | ✘ 2447 | | 2448 |2449 | ✔ 2450 | | 2451 |2452 | Specifies the options for retrieving the TV/Radio programs. 2453 | If this parameter is not passed, this method will return 2454 | all the available TV/Radio programs. 2455 | | 2456 |
getCurrentProgram
2466 | Promise
that will be used to notify the caller
2471 | about the result of the operation, which is a TVProgram
2472 | element that belongs to the channel.
2473 | getApplications
2482 | Promise
that will be used to notify the caller
2487 | about the result of the operation, which is an array of
2488 | TVApplication elements that belong to the TV/Radio channel.
2489 | Promise<sequence<TVApplication>>
2495 | setParentalLock
2499 | 2508 | Parameter 2509 | | 2510 |2511 | Type 2512 | | 2513 |2514 | Nullable 2515 | | 2516 |2517 | Optional 2518 | | 2519 |2520 | Description 2521 | | 2522 |
---|---|---|---|---|
2525 | pin 2526 | | 2527 |
2528 | DOMString
2529 | |
2530 | 2531 | ✘ 2532 | | 2533 |2534 | ✘ 2535 | | 2536 |2537 | Specifies the PIN used for parental control. 2538 | | 2539 |
2542 | isLocked 2543 | | 2544 |
2545 | boolean
2546 | |
2547 | 2548 | ✘ 2549 | | 2550 |2551 | ✘ 2552 | | 2553 |2554 | Specifies the parental lock status for the channel. 2555 | | 2556 |
Promise<void>
2561 | 2570 | The getPrograms method when invoked MUST run 2571 | the following steps: 2572 |
2573 |Promise
2575 | object and resolver be its associated
2576 | resolver.
2577 | options
parameter.
2583 | value
argument.
2587 | value
argument.
2595 | 2600 | The getCurrentProgram method when invoked 2601 | MUST run the following steps: 2602 |
2603 |Promise
2605 | object and resolver be its associated
2606 | resolver.
2607 | value
argument.
2616 | value
argument.
2624 | 2629 | The setParentalLock method when invoked MUST 2630 | run the following steps: 2631 |
2632 |Promise
2634 | object and resolver be its associated
2635 | resolver.
2636 | isLocked
parameter.
2641 | pin
parameter does not match the current PIN
2643 | or an error occurs invoke resolver's reject
2644 | algorithm with error as the value
argument.
2645 | value
argument.
2650 | 2660 | The following are the event handlers (and their corresponding 2661 | event types) that MUST be supported as attributes by the 2662 | TVChannel object. 2663 |
2664 |2668 | Event handler 2669 | | 2670 |2671 | Event name 2672 | | 2673 |2674 | Event type 2675 | | 2676 |2677 | Short description 2678 | | 2679 |
---|---|---|---|
2684 | onparentallockchange
2685 | |
2686 |
2687 | parentallockchange
2689 | |
2690 |
2691 | Event
2692 | |
2693 | 2694 | Handles the information of the parental control status change 2695 | for the TV/Radio channel. 2696 | | 2697 |
2703 | In general the current API design is agnostic towards the supported 2704 | underlying transmission and systems technology. Just the 2705 | TVSourceType enumeration refers to specific technology. However 2706 | IMHO there must be a mechanism when it comes to returning technology 2707 | specific data. The idea here is to introduce a general 2708 | TVChannelAttributes structure which acts as a base interface, from which 2709 | technology-dependent sub interfaces (in this proposal for DVB and DAB) 2710 | are derived. 2711 |
2712 | 2713 |2718 | The TVChannelAttributes interface represents a bunch of 2719 | properties and a set of operations related to technology related 2720 | functions of different TV/Radio transmission and system specifications. 2721 | The TVChannelAttributes interface is the parent interface for a 2722 | hierarchy of technology specific subinterfaces determined by 2723 | TVSource and its TVSourceType properties. 2724 |
2725 |interface TVChannelAttributes : EventTarget { 2726 | attribute EventHandler onattributeschange; 2727 | };2728 |
onattributeschange
of type EventHandler
2737 | onattributeschange
event, fired when the
2740 | attributes of the TV/Radio channel are changed.
2741 | 2751 | The TVDVBChannelAttributes interface represents DVB channel 2752 | attributes 2753 |
2754 |2755 | interface TVDVBChannelAttributes : TVChannelAttributes { 2756 | readonly attribute DOMString originalNetworkId; 2757 | readonly attribute DOMString networkId; 2758 | readonly attribute DOMString transportStreamId; 2759 | readonly attribute DOMString serviceId; 2760 | };2761 |
originalNetworkId
of type DOMString, readonly
2770 | networkID
of the operator that originated this
2775 | channel.
2776 | networkId
of type DOMString, readonly
2780 | networkId
2784 | corresponds to an operator. On cable and terrestrial, where
2785 | different radio frequencies might be used in different regions,
2786 | operators typically use one networkId
per such region.
2787 | transportStreamId
of type DOMString, readonly
2791 | serviceId
of type DOMString, readonly
2801 | 2816 | The TVDABChannelAttributes interface represents DVB channel 2817 | attributes 2818 |
2819 |2820 | interface TVDABChannelAttributes : TVChannelAttributes { 2821 | readonly attribute DOMString ensembleId; 2822 | readonly attribute DOMString serviceId; 2823 | };2824 |
ensembleId
of type DOMString, readonly
2833 | serviceId
of type DOMString, readonly
2841 | 2852 | Should we introduce more specific application type interfaces here. e.g. 2853 | for the DAB/DVB User applications (Slideshow, DL, Journaline, HbbTV, 2854 | MHEG)? Or are we happy with just delivering the applicationData to the 2855 | developers. 2856 |
2857 |2862 | The TVApplication interface represents a bunch of properties and 2863 | a set of operations related to technology related functions of 2864 | different TV/Radio applications. The TVApplication interface can 2865 | be the parent interface for a hierarchy of technology specific 2866 | subinterfaces TVApplicationType 2867 |
2868 |interface TVApplication : EventTarget { 2869 | readonly attribute TVApplicationType type; 2870 | readonly attribute object? applicationData; 2871 | attribute EventHandler onapplicationchange; 2872 | };2873 |
type
of type TVApplicationType, readonly
2882 | applicationData
of type object, readonly, nullable
2889 | onapplicationchange
of type EventHandler
2898 | onapplicationchange
event, fired when the
2901 | application of the TV/Radio channel is changed.
2902 | 2912 | The TVProgram interface represents a set of properties and 2913 | operations related to a TV/Radio program (e.g. a DVB or ATSC 2914 | Event). An instance of a TVProgram corresponds to one 2915 | showing of that program: if the same program is shown at two 2916 | different times or on different channels then each showing is 2917 | represented by a different TVProgram instance. 2918 |
2919 |interface TVProgram { 2920 | sequence<DOMString> getAudioLanguages (); 2921 | sequence<DOMString> getSubtitleLanguages (); 2922 | sequence<DOMString> getGenres (); 2923 | readonly attribute DOMString eventId; 2924 | readonly attribute TVChannel channel; 2925 | readonly attribute DOMString title; 2926 | readonly attribute DOMTimeStamp startTime; 2927 | readonly attribute DOMTimeStamp duration; 2928 | readonly attribute DOMString? shortDescription; 2929 | readonly attribute DOMString? longDescription; 2930 | readonly attribute DOMString? parentalRating; 2931 | readonly attribute boolean isEncrypted; 2932 | readonly attribute DOMString? seriesId; 2933 | };2934 |
eventId
of type DOMString, readonly
2943 | channel
of type TVChannel, readonly
2951 | title
of type DOMString, readonly
2958 | startTime
of type DOMTimeStamp, readonly
2965 | duration
of type DOMTimeStamp, readonly
2974 | shortDescription
of type DOMString, readonly, nullable
2982 | longDescription
of type DOMString, readonly, nullable
2989 | parentalRating
of type DOMString, readonly, nullable
2997 | isEncrypted
of type boolean, readonly
3004 | seriesId
of type DOMString, readonly, nullable
3012 | getAudioLanguages
3026 | sequence<DOMString>
3035 | getSubtitleLanguages
3039 | sequence<DOMString>
3048 | getGenres
3052 | sequence<DOMString>
3062 |
3073 | The TVTriggerCue interface represents a bunch of properties and
3074 | a set of operations related to the TV/Radio trigger, which may be used
3075 | to carry some information via in-band or out-of-band mechanism based on
3076 | the current playing content. It's inherited from the
3077 | TextTrackCue
interface, which requires
3078 | startTime
and endTime
, and can be accessed by
3079 | the video
or audio
element by
3080 | adding the TextTrackCue
to the
3081 | TextTrack
associated with the
3082 | HTMLMediaElement
. Besides, the
3083 | TextTrack
can rely on its
3085 | cuechange
event to realize a TV/Radio trigger becomes
3086 | active or dismissed.
3087 |
interface TVTriggerCue : TextTrackCue { 3089 | readonly attribute TVTriggerType type; 3090 | readonly attribute DOMString? title; 3091 | readonly attribute DOMString? url; 3092 | readonly attribute TVChannel? channel; 3093 | readonly attribute TVMediaStream? stream; 3094 | readonly attribute object? additionalData; 3095 | };3096 |
type
of type TVTriggerType, readonly
3105 | title
of type DOMString, readonly, nullable
3112 | url
of type DOMString, readonly, nullable
3119 | channel
of type TVChannel, readonly, nullable
3126 | stream
of type TVMediaStream, readonly, nullable
3133 | additionalData
of type object, readonly, nullable
3141 |
3157 | The TVRecording interface represents a bunch of properties and a
3158 | set of operations related to the TV/Radio recording. The recording
3159 | should automatically start recording at the specified start time. And
3160 | it may stop either at the specified end time, by an explicit
3161 | stop()
call, or be interrupted by the user agent due to a
3162 | channel switch against the required underlying resource (i.e. the same
3163 | tuner which the recording channel belongs to since watching takes
3164 | priority over recording), or an error.
3165 |
interface TVRecording { 3167 | Promise<TVMediaStream> getStream (); 3168 | Promise<void> stop (); 3169 | readonly attribute DOMString id; 3170 | readonly attribute TVChannel channel; 3171 | readonly attribute TVProgram? program; 3172 | 3173 | readonly attribute DOMTimeStamp startTime; 3174 | readonly attribute DOMTimeStamp endTime; 3175 | readonly attribute TVRecordingState state; 3176 | readonly attribute unsigned long long size; 3177 | readonly attribute DOMTimeStamp duration; 3178 | attribute DOMString description; 3179 | attribute EventHandler onrecordingchange; 3180 | };3181 |
id
of type DOMString, readonly
3190 | channel
of type TVChannel, readonly
3197 | program
of type TVProgram, readonly, nullable
3204 | stopped
.
3215 | startTime
of type DOMTimeStamp, readonly
3219 | endTime
of type DOMTimeStamp, readonly
3227 | state
of type TVRecordingState, readonly
3236 | size
of type unsigned long long, readonly
3243 | duration
of type DOMTimeStamp, readonly
3252 | description
of type DOMString
3261 | onrecordingchange
of type EventHandler
3268 | recordingchange
event of type
3271 | TVRecordingChangeEvent, fired when the recording time frame
3272 | or the state of the TV/Radio recording has been changed.
3273 | getStream
3284 | MediaStream
and can be played by the
3289 | video
element by assigning the
3290 | TVMediaStream to the HTMLMediaElement
's
3291 | srcObject
attribute. MUST return null
if the
3292 | TV/Radio recording hasn't actually recorded anything. Note that the
3293 | Promise
may be rejected with an
3294 | InvalidAccessError
if parental control is enabled and
3295 | the recorded channel is locked.
3296 | Promise<TVMediaStream>
3301 | stop
3305 | Promise<void>
3313 | 3322 | The getStream method when invoked MUST run 3323 | the following steps: 3324 |
3325 |Promise
3327 | object and resolver be its associated
3328 | resolver.
3329 | value
argument.
3338 | value
argument.
3346 | 3351 | The stop method when invoked MUST run the 3352 | following steps: 3353 |
3354 |Promise
3356 | object and resolver be its associated
3357 | resolver.
3358 | value
argument.
3366 | value
argument.
3371 | 3381 | The following are the event handlers (and their corresponding 3382 | event types) that MUST be supported as attributes by the 3383 | TVRecording object. 3384 |
3385 |3389 | Event handler 3390 | | 3391 |3392 | Event name 3393 | | 3394 |3395 | Event type 3396 | | 3397 |3398 | Short description 3399 | | 3400 |
---|---|---|---|
3405 | onrecordingchange
3406 | |
3407 |
3408 | recordingchange
3409 | |
3410 |
3411 | TVRecordingChangeEvent
3412 | |
3413 | 3414 | Handles the information of the updates for TV/Radio recordings. 3415 | | 3416 |
3427 | The TVMediaStream interface is an extended
3428 | MediaStream
with a buffering mechanism to support
3429 | basic seekability. It can be played by the video
3430 | or audio
element by assigning the
3431 | TVMediaStream to the HTMLMediaElement
's
3432 | srcObject
attribute.
3433 |
A TVMediaStream represents the stream data for all components 3435 | within a channel being presented. It is obtained from a TVSource, 3436 | and when a TVMediaStream object is created it means that all of the 3437 | resources needed to receive and present that channel have been 3438 | successfully allocated. 3439 |
3440 |interface TVMediaStream : MediaStream { 3441 | sequence<TextTrack> getTextTracks (); 3442 | void addTextTrack (TextTrack textTrack); 3443 | void removeTextTrack (TextTrack textTrack); 3444 | };3445 |
getTextTracks
3453 | sequence<TextTrack>
3461 | addTextTrack
3465 | 3471 | Parameter 3472 | | 3473 |3474 | Type 3475 | | 3476 |3477 | Nullable 3478 | | 3479 |3480 | Optional 3481 | | 3482 |3483 | Description 3484 | | 3485 |
---|---|---|---|---|
3488 | textTrack 3489 | | 3490 |3491 | TextTrack 3492 | | 3493 |3494 | ✘ 3495 | | 3496 |3497 | ✘ 3498 | | 3499 |3500 | The TextTrack object to be added. 3501 | | 3502 |
void
3507 | removeTextTrack
3511 | 3517 | Parameter 3518 | | 3519 |3520 | Type 3521 | | 3522 |3523 | Nullable 3524 | | 3525 |3526 | Optional 3527 | | 3528 |3529 | Description 3530 | | 3531 |
---|---|---|---|---|
3534 | textTrack 3535 | | 3536 |3537 | TextTrack 3538 | | 3539 |3540 | ✘ 3541 | | 3542 |3543 | ✘ 3544 | | 3545 |3546 | The TextTrack object to be removed. 3547 | | 3548 |
void
3553 | HTMLMediaElement
Attributes When Playing a
3560 | TVMediaStream
3561 |
3563 | The nature of no buffering of the MediaStream
3564 | places certain restrictions on the behavior and attribute values of
3565 | the associated HTMLMediaElement
and on the
3566 | operations that can be performed on it. Yet since
3567 | TVMediaStream is with a buffered mechanism to support basic
3568 | seekability, it may be less restrictive to some extent, as shown
3569 | below:
3570 |
3575 | Attribute Name 3576 | | 3577 |3578 | Attribute Type 3579 | | 3580 |3581 | Valid Values When Using a TVMediaStream 3582 | | 3583 |3584 | Additional considerations 3585 | | 3586 |
---|---|---|---|
3591 |
3593 | currentSrc
3594 | |
3595 |
3596 | DOMString
3597 | |
3598 | 3599 | The empty string 3600 | | 3601 |
3602 | When srcObject is specified the User Agent MUST
3603 | set this to the empty string. (Same as
3604 | MediaStream .)
3605 | |
3606 |
3609 |
3611 | preload
3612 | |
3613 |
3614 | DOMString
3615 | |
3616 | 3617 | none 3618 | | 3619 |
3620 | A TVMediaStream cannot be preloaded. (Same as
3621 | MediaStream .)
3622 | |
3623 |
3626 |
3628 | buffered
3629 | |
3630 |
3631 | TimeRanges
3632 | |
3633 |
3634 | Same as HTMLMediaElement .
3635 | |
3636 |
3637 | Unlock the restriction applied by
3638 | MediaStream .
3639 | |
3640 |
3643 |
3645 | networkState
3646 | |
3647 |
3648 | unsigned short
3649 | |
3650 | 3651 | NETWORK_IDLE 3652 | | 3653 |
3654 | The media element does not fetch the TVMediaStream so
3655 | there is no network traffic. (Same as
3656 | MediaStream .)
3657 | |
3658 |
3661 |
3663 | readyState
3664 | |
3665 |
3666 | unsigned short
3667 | |
3668 | 3669 | HAVE_NOTHING, HAVE_ENOUGH_DATA 3670 | | 3671 |
3672 | A TVMediaStream may be created before there is any data
3673 | available, for example when a stream is received from a remote
3674 | peer. The value of the readyState of the media
3675 | element MUST be HAVE_NOTHING before the first media
3676 | arrives and HAVE_ENOUGH_DATA once the first media has
3677 | arrived. (Same as MediaStream .)
3678 | |
3679 |
3682 |
3684 | currentTime
3685 | |
3686 |
3687 | double
3688 | |
3689 |
3690 | Same as HTMLMediaElement .
3691 | |
3692 |
3693 | Unlock the restriction applied by
3694 | MediaStream .
3695 | |
3696 |
3699 |
3701 | duration
3702 | |
3703 |
3704 | unrestricted double
3705 | |
3706 |
3707 | Same as HTMLMediaElement .
3708 | |
3709 |
3710 | Unlock the restriction applied by
3711 | MediaStream .
3712 | |
3713 |
3716 |
3718 | seeking
3719 | |
3720 |
3721 | boolean
3722 | |
3723 |
3724 | Same as HTMLMediaElement .
3725 | |
3726 |
3727 | Unlock the restriction applied by
3728 | MediaStream .
3729 | |
3730 |
3733 |
3735 | defaultPlaybackRate
3736 | |
3737 |
3738 | double
3739 | |
3740 |
3741 | Same as HTMLMediaElement .
3742 | |
3743 |
3744 | Unlock the restriction applied by
3745 | MediaStream .
3746 | |
3747 |
3750 |
3752 | playbackRate
3753 | |
3754 |
3755 | double
3756 | |
3757 |
3758 | Same as HTMLMediaElement .
3759 | |
3760 |
3761 | Unlock the restriction applied by
3762 | MediaStream .
3763 | |
3764 |
3767 |
3769 | played
3770 | |
3771 |
3772 | TimeRanges
3773 | |
3774 |
3775 | Same as HTMLMediaElement .
3776 | |
3777 |
3778 | Unlock the restriction applied by
3779 | MediaStream .
3780 | |
3781 |
3784 |
3786 | seekable
3787 | |
3788 |
3789 | TimeRanges
3790 | |
3791 |
3792 | Same as HTMLMediaElement .
3793 | |
3794 |
3795 | Unlock the restriction applied by
3796 | MediaStream .
3797 | |
3798 |
3801 |
3803 | loop
3804 | |
3805 |
3806 | boolean
3807 | |
3808 |
3809 | Same as HTMLMediaElement .
3810 | |
3811 |
3812 | Unlock the restriction applied by
3813 | MediaStream .
3814 | |
3815 |
3824 | Applications may utilize TVRecording and TVMediaStream
3825 | to fulfill time-shifting scenarios. When time-shifting is enabled, it
3826 | may add a TV/Radio recording for the current playing channel without
3827 | specifying start time, which makes the recording starts from now on,
3828 | or instead by specifying the live TV/Radio program. (The user agent
3829 | should be able to play and record the same channel at the same time.)
3830 | Then when it comes to switch to the time-shifted content, the
3831 | TVMediaStream generated from the TV/Radio recording can be
3832 | assigned to the video
or
3833 | audio
element used for playing the current
3834 | MediaStream
. So the application may play with the
3835 | video
or audio
element to set
3836 | proper playback rates, seek to specific time, play/pause the buffered
3837 | stream, and listen to some correspondent events. And when
3838 | time-shifting is switched off (i.e. the recorded content has been
3839 | fast forwarded to the current end), the application should assign the
3840 | original MediaStream
back to the
3841 | video
or audio
element.
3842 | Please note applications may need to regularly clean up old TV/Radio
3843 | recordings used for time-shifting.
3844 |
3853 | The TVCICard interface represents a bunch of properties related 3854 | to CI (Common Interface) card which is used to decrypt encrypted TV 3855 | channel. 3856 |
3857 |interface TVCICard { 3858 | readonly attribute TVCICardState state; 3859 | readonly attribute DOMString casSystemId; 3860 | readonly attribute boolean isInUse; 3861 | };3862 |
state
of type TVCICardState, readonly
3871 | casSystemId
of type DOMString, readonly
3878 | isInUse
of type boolean, readonly
3886 | 3901 | The TVStartScanningOptions dictionary contains the information 3902 | for scanning the TV/Radio channels. 3903 |
3904 |dictionary TVStartScanningOptions { 3905 | boolean isRescanned; 3906 | };3907 |
isRescanned
of type boolean
3916 | 3931 | The TVGetProgramsOptions dictionary contains the information for 3932 | retrieving the TV/Radio programs. 3933 |
3934 |dictionary TVGetProgramsOptions { 3935 | 3936 | DOMTimeStamp startTime; 3937 | DOMTimeStamp endTime; 3938 | DOMString genre; 3939 | };3940 |
startTime
of type DOMTimeStamp
3949 | endTime
of type DOMTimeStamp
3958 | genre
of type DOMString
3967 | 3980 | The TVAddRecordingOptions dictionary contains the information 3981 | for adding a TV/Radio recording. 3982 |
3983 |dictionary TVAddRecordingOptions { 3984 | required DOMString description; 3985 | required TVChannel channel; 3986 | TVProgram? program; 3987 | DOMTimeStamp? startTime; 3988 | DOMTimeStamp? endTime; 3989 | };3990 |
description
of type DOMString, required
3999 | channel
of type TVChannel, required
4006 | program
of type TVProgram, nullable
4013 | startTime
and endTime
.
4018 | startTime
of type DOMTimeStamp, nullable
4022 | program
is specified.
4028 | endTime
of type DOMTimeStamp, nullable
4032 | stop()
call of
4037 | TVRecording or the user agent forces it to stop due to
4038 | resource control. Please note this could also be omitted and auto
4039 | determined if program
is specified.
4040 | 4050 | The TVGetRecordingsOptions dictionary contains the information 4051 | for retrieving the TV/Radio recordings. 4052 |
4053 |dictionary TVGetRecordingsOptions { 4054 | TVRecordingState? state; 4055 | DOMString? id; 4056 | };4057 |
state
of type TVRecordingState, nullable
4066 | id
of type DOMString, nullable
4073 | 4086 | The TVTunerChangeEvent interface represents the event related 4087 | to the TV/Radio tuner that is added/removed by the device. 4088 |
4089 |interface TVTunerChangeEvent : Event { 4090 | readonly attribute TVTunerChangeEventOperation operation; 4091 | readonly attribute DOMString id; 4092 | };4093 |
operation
of type TVTunerChangeEventOperation, readonly
4102 | id
of type DOMString, readonly
4109 |
4122 | The TVCurrentSourceChangeEvent interface represents the event
4123 | related to the current TV/Radio source that is configured by the method
4124 | setCurrentSource
.
4125 |
interface TVCurrentSourceChangeEvent : Event { 4127 | readonly attribute TVSource? source; 4128 | };4129 |
source
of type TVSource, readonly, nullable
4138 | null
if the TV/Radio source is not
4142 | configured.
4143 | 4153 | The TVEITBroadcastEvent interface represents the event related 4154 | to the available TV programs in the EIT that is broadcast by the TV 4155 | source. 4156 |
4157 |interface TVEITBroadcastEvent : Event { 4158 | readonly attribute object programs; 4159 | };4160 |
programs
of type object, readonly
4169 | 4187 | The TVEmergencyAlertEvent interface represents the event 4188 | related to the emergency alert that is broadcast by the TV/Radio 4189 | source. 4190 |
4191 |interface TVEmergencyAlertEvent : Event { 4192 | readonly attribute DOMString? type; 4193 | readonly attribute DOMString? severityLevel; 4194 | readonly attribute DOMString? description; 4195 | readonly attribute TVChannel? channel; 4196 | readonly attribute DOMString? url; 4197 | sequence<DOMString> getRegions (); 4198 | };4199 |
type
of type DOMString, readonly, nullable
4208 | severityLevel
of type DOMString, readonly, nullable
4217 | null
when
4222 | the emergency announcement is over.
4223 | description
of type DOMString, readonly, nullable
4227 | channel
of type TVChannel, readonly, nullable
4234 | url
of type DOMString, readonly, nullable
4242 | getRegions
4256 | sequence<DOMString>
4267 | 4278 | The TVScanningStateChangeEvent interface represents the event 4279 | related to the state of channel scanning, which is changed by the 4280 | TV/Radio source. 4281 |
4282 |interface TVScanningStateChangeEvent : Event { 4283 | readonly attribute TVScanningState state; 4284 | readonly attribute TVChannel? channel; 4285 | };4286 |
state
of type TVScanningState, readonly
4295 | channel
of type TVChannel, readonly, nullable
4303 | null
if the state
is not
4307 | "scanned"
.
4308 | 4318 | The TVCurrentChannelChangeEvent interface represents the event 4319 | related to the currently streamed TV/Radio channel that is tuned by the 4320 | method tuneTo or 4321 | tuneToChannel. 4322 |
4323 |interface TVCurrentChannelChangeEvent : Event { 4324 | readonly attribute TVChannel? channel; 4325 | };4326 |
channel
of type TVChannel, readonly, nullable
4335 | null
if the TV/Radio tuner is
4339 | not streaming any data.
4340 | 4350 | The TVRecordingChangeEvent interface represents the event 4351 | related to the update of a TV/Radio recording. 4352 |
4353 |interface TVRecordingChangeEvent : Event { 4354 | readonly attribute DOMString id; 4355 | readonly attribute boolean isTimeChange; 4356 | readonly attribute boolean isStateChange; 4357 | readonly attribute DOMString? errorName; 4358 | };4359 |
id
of type DOMString, readonly
4368 | isTimeChange
of type boolean, readonly
4375 | isStateChange
of type boolean, readonly
4383 | errorName
of type DOMString, readonly, nullable
4391 | 4405 | The TVCICardChangeEvent interface represents the event related 4406 | to the changes in the state of the CI (Common Interface) card. 4407 |
4408 |interface TVCICardChangeEvent : Event { 4409 | readonly attribute TVCICardState state; 4410 | readonly attribute DOMString casSystemId; 4411 | };4412 |
state
of type TVCICardState, readonly
4421 | casSystemId
of type DOMString, readonly
4428 | 4442 | The attribute type in a TVChannel 4443 | can have one of the following values of TVChannelType: 4444 |
4445 |enum TVChannelType { 4447 | "tv", 4448 | "radio", 4449 | "data" 4450 | };4451 |
4456 | Enumeration description 4457 | | 4458 ||
---|---|
4461 | tv 4462 | | 4463 |4464 | The channel is broadcast as a regular TV type. 4465 | | 4466 |
4469 | radio 4470 | | 4471 |4472 | The channel is broadcast as a radio type. 4473 | | 4474 |
4477 | data 4478 | | 4479 |4480 | The channel is broadcast as a data type. 4481 | | 4482 |
4487 | The attribute type in a TVApplication 4488 | can have one of the following values of TVApplicationType: 4489 |
4490 |enum TVApplicationType { 4492 | "hbbtv", 4493 | "mheg", 4494 | "sls", 4495 | "dl", 4496 | "jl" 4497 | };4498 |
4503 | Enumeration description 4504 | | 4505 ||
---|---|
4508 | hbbtv 4509 | | 4510 |4511 | The application is a tv hbbtv application 4512 | | 4513 |
4516 | mheg 4517 | | 4518 |4519 | The application is a tv mheg application 4520 | | 4521 |
4524 | sls 4525 | | 4526 |4527 | The application radio slideshow application 4528 | | 4529 |
4532 | dl 4533 | | 4534 |4535 | The application radio dynamic label application 4536 | | 4537 |
4540 | jl 4541 | | 4542 |4543 | The application radio journaline application 4544 | | 4545 |
4550 | The attribute operation in the TVTunerChangeEvent 4551 | which can have one of the following values of TVTunerChangeEventOperation: 4552 |
4553 |enum TVTunerChangeEventOperation { 4555 | "added", 4556 | "removed" 4557 | };4558 |
4563 | Enumeration description 4564 | | 4565 ||
---|---|
4568 | added 4569 | | 4570 |4571 | A tuner is added. 4572 | | 4573 |
4576 | removed 4577 | | 4578 |4579 | A tuner is removed. 4580 | | 4581 |
4586 | The attribute state in the 4587 | TVScanningStateChangeEvent can have one the following values of 4588 | TVScanningState: 4589 |
4590 |enum TVScanningState { 4592 | "cleared", 4593 | "scanned", 4594 | "completed", 4595 | "stopped" 4596 | };4597 |
4602 | Enumeration description 4603 | | 4604 ||
---|---|
4607 | cleared
4609 | |
4610 | 4611 | The currently scanned TV/Radio channels have been cleared. This 4612 | event may be fired before a channel scan is started. 4613 | | 4614 |
4617 | scanned 4618 | | 4619 |4620 | A TV/Radio channel has been found by the source during the 4621 | channel scan. The channel attribute in the 4622 | TVScanningStateChangeEvent object references the 4623 | channel found. 4624 | | 4625 |
4628 | completed 4629 | | 4630 |4631 | The channel scan has completed. 4632 | | 4633 |
4636 | stopped 4637 | | 4638 |4639 | The channel scan has been stopped. 4640 | | 4641 |
4646 | The attribute type in TVTriggerCue 4647 | can have one of the following values of TVTriggerType: 4648 |
4649 |enum TVTriggerType { 4651 | "channel-change", 4652 | "time", 4653 | "content-boundary", 4654 | "fingerprint", 4655 | "watermark", 4656 | "context", 4657 | "segment", 4658 | "caption" 4659 | };4660 |
4665 | Enumeration description 4666 | | 4667 ||
---|---|
4670 | channel-change 4671 | | 4672 |4673 | Triggers when channel is switched. 4674 | | 4675 |
4678 | time 4679 | | 4680 |4681 | Triggers based on date and time. 4682 | | 4683 |
4686 | content-boundary 4687 | | 4688 |4689 | Triggers based on content boundary. 4690 | | 4691 |
4694 | fingerprint 4695 | | 4696 |4697 | Triggers based on content fingerprints. 4698 | | 4699 |
4702 | watermark 4703 | | 4704 |4705 | Triggers based on content watermarks. 4706 | | 4707 |
4710 | context 4711 | | 4712 |4713 | Triggers based on contextual information in content. 4714 | | 4715 |
4718 | segment 4719 | | 4720 |4721 | Triggers based on program chapters or other segments within the 4722 | program. 4723 | | 4724 |
4727 | caption 4728 | | 4729 |4730 | Triggers based on subtitle captions. 4731 | | 4732 |
4738 | The attribute state in TVRecording 4739 | if of type TVRecordingState, which can have the following values: 4740 |
4741 |enum TVRecordingState { 4743 | "scheduled", 4744 | "recording", 4745 | "stopped" 4746 | };4747 |
4752 | Enumeration description 4753 | | 4754 ||
---|---|
4757 | scheduled 4758 | | 4759 |4760 | The state of recording is scheduled. 4761 | | 4762 |
4765 | recording 4766 | | 4767 |4768 | The state of recording is currently on. 4769 | | 4770 |
4773 | stopped 4774 | | 4775 |4776 | The state of recording is stopped from scheduled or 4777 | canceled from recording. 4778 | | 4779 |
4784 | The attribute state in TVCICard 4785 | can have one of the following values of TVCICardState: 4786 |
4787 |enum TVCICardState { 4789 | "inserted", 4790 | "accepted", 4791 | "removed", 4792 | "error" 4793 | };4794 |
4799 | Enumeration description 4800 | | 4801 ||
---|---|
4804 | inserted 4805 | | 4806 |4807 | The CI card is inserted. 4808 | | 4809 |
4812 | accepted 4813 | | 4814 |4815 | The CI card is accepted. 4816 | | 4817 |
4820 | removed 4821 | | 4822 |4823 | The CI card is removed. 4824 | | 4825 |
4828 | error 4829 | | 4830 |4831 | The CI Card has encountered an error. 4832 | | 4833 |
4843 | This section will be completed in a future draft of the specification. See 4844 | this issue for 4845 | details. 4846 |
4847 |4854 | Thanks to the following people for their contribution to this draft 4855 | specification, and for providing review feedback: Kazuyuki Ashimura, David 4856 | Baron, Marco Chen, Daniel Davis, Ryan Davis, Alexander Erk, Jean-Pierre 4857 | Evain, Francois Daoust, Yoshiharu Dewa, Paul Higgs, Bin Hu, Travis Leithead, 4858 | Shelly Lin, Sangwhan Moon, Chris Needham, Jon Piesing, Michael Probst. 4859 |
4860 |4864 | All of the text of this specification is normative except sections 4865 | explicitly marked as non-normative, examples, and notes. 4866 |
4867 |4868 | This specification defines conformance criteria that apply to a single 4869 | product: the user agent that implements the interfaces that 4870 | it contains. 4871 |
4872 |4873 | Implementations that use ECMAScript to implement the APIs defined in 4874 | this specification MUST implement them in a manner consistent with the 4875 | ECMAScript Bindings defined in the Web IDL specification [[!WEBIDL]], 4876 | as this specification uses that specification and terminology. 4877 |
4878 |