├── 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 | 6 | TV Control API Specification 7 | 8 | 11 | 94 | 95 | 96 | 97 |
98 | This specification defines an API for sourcing audio and video media, 99 | such as TV and radio from broadcast, IPTV, or other sources, with 100 | associated channel and program metadata, and allows presentation of the 101 | media using the <video> and <audio> 102 | HTML elements. The API is agnostic of any underlying audio or video 103 | sourcing technologies. 104 |
105 | 106 |
107 |

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 |
130 | 131 |
132 |

133 | Introduction 134 |

135 |

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 |

143 |

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 |

153 |

154 | The TVTuner class has been removed from this draft. See this issue for 156 | details. 157 |

158 |

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 |
171 | 172 |
173 |

174 | Terminology 175 |

176 |

The following terms are defined in [[!HTML]]:

177 | 189 |

190 | The Event and 191 | EventTarget 192 | interfaces are defined in [[!DOM]]. 193 |

194 |

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 |

201 |

202 | The MediaStream 203 | interface and the ConstrainLong 204 | type are defined in [[!MediaCapture-Streams]]. 205 |

206 |

207 | The MediaRecorder 208 | interface is defined in [[MediaStream-Recording]]. 209 |

210 |
211 | 212 |
213 |

214 | Navigator Interface 215 |

216 |
partial interface Navigator {
 217 |     [SameObject]
 218 |     readonly        attribute TVControl tv;
 219 | };
220 |
221 |

222 | Attributes 223 |

224 |
226 |
227 | tv of type TVControl, readonly 228 |
229 |
230 | MUST return the object that exposes the interface to the TV control 231 | service. 232 |
233 |
234 |
235 |
236 | 237 |
238 |

239 | TVControl Interface 240 |

241 |

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 |
250 |

251 | Methods 252 |

253 |
255 |
256 | getTVManager 257 |
258 |
259 | This method makes a request to retrieve a manager for TV services. It 260 | returns a new 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 |
265 | No parameters. 266 |
267 |
268 | Return type: 269 | Promise<TVManager> 270 |
271 |
272 |
273 | getRadioManager 274 |
275 |
276 | This method makes a request to retrieve a manager for radio services. 277 | It returns a new 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 |
281 | No parameters. 282 |
283 |
284 | Return type: 285 | Promise<TVManager> 286 |
287 |
288 |
289 |
290 |
291 | 292 | 293 | 294 |
295 |

296 | TVManager Interface 297 |

298 |

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.

307 |
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 |
330 |

331 | Attributes 332 |

333 |
335 |
336 | totalRecordingSize of type unsigned long long, readonly 338 |
339 |
340 | MUST return the total recording size of the TV device in bytes. 341 |
342 |
343 | availableRecordingSize of type unsigned long long, readonly 345 |
346 |
347 | MUST return the current available recording size of the TV device in bytes. 348 |
349 |
350 | isParentalControlled of type boolean, readonly 352 |
353 |
354 | MUST return the current state of the TV parental control, which is 355 | applied system-wide to the TV device. Once the parental control is 356 | unset, all the locked TV channels/programs will become accessible. 357 |
358 |
359 | ontunerchange of type EventHandler 361 |
362 |
363 | Handles the tunerchange event of type 364 | TVTunerChangeEvent, fired when the TV/Radio device detects 365 | a tuner is added/removed. 366 |
367 |
368 | onrecordingchange of type EventHandler 370 |
371 |
372 | Handles the recordingchange event of type 373 | TVRecordingChangeEvent, fired when the recording time frame 374 | or the state of the TV/Radio recording has been changed. 375 |
376 |
377 | onparentalcontrolchange of type 378 | EventHandler 379 |
380 |
381 | Handles the parentalcontrolchange event, fired when 382 | the parental control status is changed. 383 |
384 |
385 | oncicardchange of type EventHandler 387 |
388 |
389 | Handles the cicardchange event, fired when the CI 390 | (Common Interface) card status is changed. 391 |
392 |
393 |
394 |
395 |

396 | Methods 397 |

398 |
399 |
400 | getCapabilities 401 |
402 |
403 | This method makes a request to retrieve the capabilities of the 404 | device. It returns a new TVSourceCapabilities 405 | object that describes the capabilities of the device for receiving 406 | and decoding TV or radio services. 407 |
408 | No parameters. 409 |
410 |
411 | Return type: 412 | TVSourceCapabilities 413 |
414 |
415 |
416 | getSupportedConstraints 417 |
418 |
419 | This method makes a request to retrieve the set of constraints supported by the 420 | device. It returns a new TVSourceSupportedConstraints 421 | object that describes the set of constraints that may be specified when 422 | requesting a TVSource object. 423 |
424 | No parameters. 425 |
426 |
427 | Return type: 428 | TVSourceSupportedConstraints 429 |
430 |
431 |
432 | getSource 433 |
434 |
435 | This method makes a request to retrieve a TV/Radio source that matches 436 | the specified constraints that are available in the device. It returns 437 | a new Promise that will be used to notify the 438 | caller about the result of the operation, which is a TVSource 439 | obect. 440 | 441 | 442 | 443 | 446 | 449 | 452 | 455 | 458 | 459 | 460 | 463 | 466 | 469 | 472 | 475 | 476 | 477 |
444 | Parameter 445 | 447 | Type 448 | 450 | Nullable 451 | 453 | Optional 454 | 456 | Description 457 |
461 | option 462 | 464 | TVSourceConstraints 465 | 467 | 468 | 470 | 471 | 473 | Specifies the constraints for the requested TV source. 474 |
478 | 479 |
480 | Return type: 481 | Promise<TVSource> 482 |
483 |
484 |
485 | isSourceAvailable 486 |
487 |
488 | This method returns 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 | 494 | 495 | 496 | 499 | 502 | 505 | 508 | 511 | 512 | 513 | 516 | 519 | 522 | 525 | 528 | 529 | 530 |
497 | Parameter 498 | 500 | Type 501 | 503 | Nullable 504 | 506 | Optional 507 | 509 | Description 510 |
514 | option 515 | 517 | TVSourceConstraints 518 | 520 | 521 | 523 | 524 | 526 | Specifies the constraints for the requested TV source. 527 |
531 | 532 |
533 | Return type: 534 | boolean 535 |
536 |
537 |
538 | getChannelList 539 |
540 |
541 | This method makes a request to retrieve the list of TV/Radio 542 | channels that matches the specified constraints that are available 543 | in the device. It returns a new 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 | 547 | 548 | 549 | 552 | 555 | 558 | 561 | 564 | 565 | 566 | 569 | 572 | 575 | 578 | 581 | 582 | 583 |
550 | Parameter 551 | 553 | Type 554 | 556 | Nullable 557 | 559 | Optional 560 | 562 | Description 563 |
567 | option 568 | 570 | TVSourceConstraints 571 | 573 | 574 | 576 | 577 | 579 | Specifies the constraints for the requested channel list. 580 |
584 | 585 |
586 | Return type: 587 | Promise<sequence<TVChannel>> 588 |
589 |
590 | 591 | 592 |
593 | addRecording 594 |
595 |
596 | This method adds a recording request for a given channel with 597 | explicitly specified start time and end time, or instead an 598 | associated TVProgram object. It returns a new 599 | Promise that will be used to notify the caller 600 | about the result of the operation, which is a newly-created 601 | TVRecording object.
602 | Please note the user agent should have a recording scheduler which 603 | handles time conflicts between recording requests. If this method 604 | tries to add a new request with a time frame overlapped with some 605 | existent ones, and given sufficient resource (i.e. tuner), a new 606 | TV/Radio recording should be created and the scheduler should 607 | ensure multiple TV/Radio recordings run at the same time. However, 608 | if the resource is not sufficient to meet the new request, the 609 | 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 | 613 | 614 | 615 | 618 | 621 | 624 | 627 | 630 | 631 | 632 | 635 | 638 | 641 | 644 | 647 | 648 | 649 |
616 | Parameter 617 | 619 | Type 620 | 622 | Nullable 623 | 625 | Optional 626 | 628 | Description 629 |
633 | option 634 | 636 | TVAddRecordingOptions 637 | 639 | 640 | 642 | 643 | 645 | Specifies the options for adding recording. 646 |
650 |
651 | Return type: Promise<TVRecording> 652 |
653 |
654 |
655 | removeRecording 656 |
657 |
658 | This method makes a request to remove a given recording. It returns 659 | a new Promise that will be used to notify the 660 | caller about the result of the operation. 661 | 662 | 663 | 664 | 667 | 670 | 673 | 676 | 679 | 680 | 681 | 684 | 687 | 690 | 693 | 696 | 697 | 698 |
665 | Parameter 666 | 668 | Type 669 | 671 | Nullable 672 | 674 | Optional 675 | 677 | Description 678 |
682 | id 683 | 685 | DOMString 686 | 688 | 689 | 691 | 692 | 694 | Specifies the ID of the recording to be removed. 695 |
699 |
700 | Return type: Promise<void> 701 |
702 |
703 |
704 | getRecordings 705 |
706 |
707 | This method makes a request to retrieve the available TV/Radio 708 | recordings according to the given criteria. It returns a new 709 | Promise that will be used to notify the caller 710 | about the result of the operation. 711 | 712 | 713 | 714 | 717 | 720 | 723 | 726 | 729 | 730 | 731 | 734 | 737 | 740 | 743 | 746 | 747 | 748 |
715 | Parameter 716 | 718 | Type 719 | 721 | Nullable 722 | 724 | Optional 725 | 727 | Description 728 |
732 | options 733 | 735 | TVGetRecordingsOptions 736 | 738 | 739 | 741 | 742 | 744 | Specifies the options for getting recordings. 745 |
749 |
750 | Return type: 751 | Promise<sequence<TVRecording>> 752 |
753 |
754 |
755 | setParentalControlPin 756 |
757 |
758 | This method makes a request to set the TV/Radio parental control 759 | PIN used for enabling or disabling parental control. It returns a 760 | new Promise that will be used to notify the caller 761 | about the result of the operation. Note that the 762 | Promise may be rejected with an 763 | InvalidAccessError if the old PIN does not match the 764 | current one. 765 | 766 | 767 | 768 | 771 | 774 | 777 | 780 | 783 | 784 | 785 | 788 | 791 | 794 | 797 | 800 | 801 | 802 | 805 | 808 | 811 | 814 | 817 | 818 | 819 |
769 | Parameter 770 | 772 | Type 773 | 775 | Nullable 776 | 778 | Optional 779 | 781 | Description 782 |
786 | oldPin 787 | 789 | DOMString 790 | 792 | 793 | 795 | 796 | 798 | Specifies the old PIN used for parental control. 799 |
803 | newPin 804 | 806 | DOMString 807 | 809 | 810 | 812 | 813 | 815 | Specifies the new PIN used for parental control. 816 |
820 |
821 | Return type: Promise<void> 822 |
823 |
824 |
825 | setParentalControl 826 |
827 |
828 | This method makes a request to set the TV/Radio parental control 829 | status. It returns a new Promise that will be used to 830 | notify the caller about the result of the operation. Note that the 831 | Promise may be rejected with an 832 | InvalidAccessError if the PIN does not match the 833 | current one. 834 | 835 | 836 | 837 | 840 | 843 | 846 | 849 | 852 | 853 | 854 | 857 | 860 | 863 | 866 | 869 | 870 | 871 | 874 | 877 | 880 | 883 | 886 | 887 | 888 |
838 | Parameter 839 | 841 | Type 842 | 844 | Nullable 845 | 847 | Optional 848 | 850 | Description 851 |
855 | pin 856 | 858 | DOMString 859 | 861 | 862 | 864 | 865 | 867 | Specifies the PIN used for parental control. 868 |
872 | isLocked 873 | 875 | boolean 876 | 878 | 879 | 881 | 882 | 884 | Specifies the parental control status. 885 |
889 |
890 | Return type: Promise<void> 891 |
892 |
893 |
894 | getCICards 895 |
896 |
897 | This method makes a request to retrieve a list of CI (Common 898 | Interface) cards available in the TV device (e.g. set-top box). It 899 | returns a new 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 |
903 | No parameters. 904 |
905 |
906 | Return type: 907 | Promise<sequence<TVCICard>> 908 |
909 |
910 |
911 |
912 |
913 |

914 | Procedures 915 |

916 |

917 | The addRecording method when invoked MUST run 918 | the following steps: 919 |

920 |
    921 |
  1. Let promise be a new Promise 922 | object and resolver be its associated 923 | resolver. 924 |
  2. 925 |
  3. Return promise to the caller. 926 |
  4. 927 |
  5. Make a recording request to the TV/Radio recording scheduler 928 | according to the options parameter. 929 |
  6. 930 |
  7. If an error occurs invoke resolver's 931 | reject algorithm with error as the 932 | value argument. 933 |
  8. 934 |
  9. When the request has been successfully completed: 935 |
      936 |
    1. Let recording be the newly-created 937 | TVRecording object. 938 |
    2. 939 |
    3. Invoke resolver's fulfill algorithm with 940 | recording as the value argument. 941 |
    4. 942 |
    943 |
  10. 944 |
945 |

946 | The removeRecording method when invoked MUST 947 | run the following steps: 948 |

949 |
    950 |
  1. Let promise be a new Promise 951 | object and resolver be its associated 952 | resolver. 953 |
  2. 954 |
  3. Return promise to the caller. 955 |
  4. 956 |
  5. Make a request to the TV/Radio device to remove the given record. 957 |
  6. 958 |
  7. If an error occurs invoke resolver's 959 | reject algorithm with error as the 960 | value argument. 961 |
  8. 962 |
  9. When the request has been successfully completed: 963 |
      964 |
    1. Invoke resolver's fulfill algorithm without 965 | assigning a value to the value argument. 966 |
    2. 967 |
    968 |
  10. 969 |
970 |

971 | The getRecordings method when invoked MUST 972 | run the following steps: 973 |

974 |
    975 |
  1. Let promise be a new Promise 976 | object and resolver be its associated 977 | resolver. 978 |
  2. 979 |
  3. Return promise to the caller. 980 |
  4. 981 |
  5. Make a request to the recording scheduler to retrieve the 982 | available TV/Radio recordings according to the options 983 | parameter. 984 |
  6. 985 |
  7. If an error occurs invoke resolver's 986 | reject algorithm with error as the 987 | value argument. 988 |
  8. 989 |
  9. When the request has been successfully completed: 990 |
      991 |
    1. Let recordings be the array of the retrieved 992 | TVRecording elements. 993 |
    2. 994 |
    3. Invoke resolver's fulfill algorithm with 995 | recordings as the value argument. 996 |
    4. 997 |
    998 |
  10. 999 |
1000 |

1001 | The setParentalControlPin method when invoked 1002 | MUST run the following steps: 1003 |

1004 |
    1005 |
  1. Let promise be a new Promise 1006 | object and resolver be its associated 1007 | resolver. 1008 |
  2. 1009 |
  3. Return promise to the caller. 1010 |
  4. 1011 |
  5. Make a request to set the new PIN for parental control according 1012 | to the newPin parameter. 1013 |
  6. 1014 |
  7. If an error occurs invoke resolver's 1015 | reject algorithm with error as the 1016 | value argument. 1017 |
  8. 1018 |
  9. When the request has been successfully completed: 1019 |
      1020 |
    1. Invoke resolver's fulfill algorithm without 1021 | assigning a value to the value argument. 1022 |
    2. 1023 |
    1024 |
  10. 1025 |
1026 |

1027 | The setParentalControl method when invoked 1028 | MUST run the following steps: 1029 |

1030 |
    1031 |
  1. Let promise be a new Promise 1032 | object and resolver be its associated 1033 | resolver. 1034 |
  2. 1035 |
  3. Return promise to the caller. 1036 |
  4. 1037 |
  5. Make a request to set the new status for parental control 1038 | according to the isLocked parameter. 1039 |
  6. 1040 |
  7. If an error occurs invoke resolver's 1041 | reject algorithm with error as the 1042 | value argument. 1043 |
  8. 1044 |
  9. When the request has been successfully completed: 1045 |
      1046 |
    1. Invoke resolver's fulfill algorithm without 1047 | assigning a value to the value argument. 1048 |
    2. 1049 |
    1050 |
  10. 1051 |
1052 |

1053 | The getCICards method when invoked MUST run 1054 | the following steps: 1055 |

1056 |
    1057 |
  1. Let promise be a new Promise 1058 | object and resolver be its associated 1059 | resolver. 1060 |
  2. 1061 |
  3. Return promise to the caller. 1062 |
  4. 1063 |
  5. Make a request to the TV device to retrieve all the CI (Common 1064 | Interface) cards that are available in the TV device. 1065 |
  6. 1066 |
  7. If an error occurs invoke resolver's 1067 | reject algorithm with error as the 1068 | value argument. 1069 |
  8. 1070 |
  9. When the request has been successfully completed: 1071 |
      1072 |
    1. Let cicards be the array of the retrieved 1073 | TVCICard elements. 1074 |
    2. 1075 |
    3. Invoke resolver's fulfill algorithm with 1076 | cicards as the value argument. 1077 |
    4. 1078 |
    1079 |
  10. 1080 |
1081 |
1082 |
1083 |

1084 | Event handlers 1085 |

1086 |

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 | 1092 | 1093 | 1094 | 1097 | 1100 | 1103 | 1106 | 1107 | 1108 | 1109 | 1110 | 1113 | 1117 | 1120 | 1124 | 1125 | 1126 | 1129 | 1133 | 1136 | 1139 | 1140 | 1141 | 1144 | 1148 | 1151 | 1155 | 1156 | 1157 | 1160 | 1164 | 1167 | 1171 | 1172 | 1173 |
1095 | Event handler 1096 | 1098 | Event name 1099 | 1101 | Event type 1102 | 1104 | Short description 1105 |
1111 | ontunerchange 1112 | 1114 | tunerchange 1116 | 1118 | TVTunerChangeEvent 1119 | 1121 | Handles the information of the TV/Radio tuner that is 1122 | added/removed by the device. 1123 |
1127 | onrecordingchange 1128 | 1130 | recordingchange 1132 | 1134 | TVRecordingChangeEvent 1135 | 1137 | Handles the information of the updates for TV/Radio recordings. 1138 |
1142 | onparentalcontrolchange 1143 | 1145 | parentalcontrolchange 1147 | 1149 | Event 1150 | 1152 | Handles the information of the status changes for parental 1153 | control. 1154 |
1158 | oncicardchange 1159 | 1161 | cicardchange 1163 | 1165 | TVCICardChangeEvent 1166 | 1168 | Handles the information of the status changes of the TV CI 1169 | (Common Interface) card in the TV device. 1170 |
1174 |
1175 |
1176 | 1177 |
1178 |

1179 | TVSource Interface 1180 |

1181 |

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 |
1210 |

1211 | Attributes 1212 |

1213 |
1215 |
1216 | type of type TVSourceType, readonly 1218 |
1219 |
1220 | MUST return the type of the TV/Radio source. 1221 |
1222 |
1223 | stream of type TVMediaStream, readonly, nullable 1225 |
1226 |
1227 | MUST return a 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.
1235 | MUST return 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.
1238 | Note that the stream instance should be the same even after the 1239 | current selected TV channel has been changed. 1240 |
1241 |
1242 | isScanning of type boolean, readonly 1244 |
1245 |
1246 | MUST indicate whether the source is scanning the TV/Radio channels 1247 | or not. 1248 |
1249 |
1250 | currentChannel of type TVChannel, readonly, nullable 1252 |
1253 |
1254 | MUST return the channel that is currently streamed by the TV/Radio 1255 | tuner which owns the source. MUST return null if the 1256 | TV/Radio tuner is not streaming any data. 1257 |
1258 |
1259 | oncurrentchannelchange of type 1260 | EventHandler 1261 |
1262 |
1263 | Handles the currentchannelchange event of type 1264 | TVCurrentChannelChangeEvent, fired when the method 1265 | tuneTo or tuneToChannel is invoked to tune the 1266 | currently streamed TV/Radio channel. 1267 |
1268 |
1269 | oneitbroadcast of type EventHandler 1271 |
1272 |
1273 | Handles the eitbroadcast event of type 1274 | TVEITBroadcastEvent, fired when the Event Information 1275 | Table (EIT) is broadcast by the TV source. 1276 |
1277 |
1278 | onemergencyalert of type EventHandler 1280 |
1281 |
1282 | Handles the emergencyalert event of type 1283 | TVEmergencyAlertEvent, fired when an emergency, such as 1284 | earthquake or tsunami, occurs and is broadcast by the TV/Radio 1285 | source. 1286 |
1287 |
1288 | onscanningstatechange of type EventHandler 1290 |
1291 |
1292 | Handles the scanningstatechange event of type 1293 | TVScanningStateChangeEvent, fired when the state of 1294 | scanning the TV/Radio channels is changed by the source. E.g., it 1295 | can be fired when the method 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 |
1300 |
1301 |
1302 |
1303 |

1304 | Methods 1305 |

1306 |
1307 |
1308 | getConstraints 1309 |
1310 |
1311 | See ConstrainablePattern Interface for the definition of this method. 1312 |
1313 | No parameters. 1314 |
1315 |
1316 | Return type: 1317 | TVSourceConstraints 1318 |
1319 |
1320 |
1321 | getSettings 1322 |
1323 |
1324 | See ConstrainablePattern Interface for the definition of this method. 1325 |
1326 | No parameters. 1327 |
1328 |
1329 | Return type: 1330 | TVSourceSettings 1331 |
1332 |
1333 |
1334 | getChannels 1335 |
1336 |
1337 | This method makes a request to retrieve all the TV/Radio channels 1338 | that are available in the source. It returns a new 1339 | 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 |
1348 | No parameters. 1349 |
1350 |
1351 | Return type: 1352 | Promise<sequence<TVChannel>> 1353 |
1354 |
1355 |
1356 | tuneToChannel 1357 |
1358 |
1359 | This method makes a request to tune to the TV/Radio channel 1360 | specified by the 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 | 1369 | 1370 | 1371 | 1374 | 1377 | 1380 | 1383 | 1386 | 1387 | 1388 | 1391 | 1394 | 1397 | 1400 | 1403 | 1404 | 1405 |
1372 | Parameter 1373 | 1375 | Type 1376 | 1378 | Nullable 1379 | 1381 | Optional 1382 | 1384 | Description 1385 |
1389 | channel 1390 | 1392 | TVChannel 1393 | 1395 | 1396 | 1398 | 1399 | 1401 | Specifies the TV/Radio channel to be tuned to. 1402 |
1406 |
1407 | Return type: Promise<TVMediaStream> 1408 |
1409 |
1410 |
1411 | tuneTo 1412 |
1413 |
1414 | This method makes a request to tune to the TV/Radio channel 1415 | specified by the 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 | 1424 | 1425 | 1426 | 1429 | 1432 | 1435 | 1438 | 1441 | 1442 | 1443 | 1446 | 1449 | 1452 | 1455 | 1458 | 1459 | 1460 |
1427 | Parameter 1428 | 1430 | Type 1431 | 1433 | Nullable 1434 | 1436 | Optional 1437 | 1439 | Description 1440 |
1444 | tuningParams 1445 | 1447 | DOMString 1448 | 1450 | 1451 | 1453 | 1454 | 1456 | Specifies the tuning parameters of the TV/Radio channel to be tuned to. 1457 |
1461 |
1462 | Return type: Promise<TVMediaStream> 1463 |
1464 |
1465 |
1466 | startScanning 1467 |
1468 |
1469 | This method makes a request to start scanning all the TV/Radio 1470 | channels that are available in the source by the 1471 | 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 | 1480 | 1481 | 1482 | 1485 | 1488 | 1491 | 1494 | 1497 | 1498 | 1499 | 1502 | 1505 | 1508 | 1511 | 1520 | 1521 | 1522 |
1483 | Parameter 1484 | 1486 | Type 1487 | 1489 | Nullable 1490 | 1492 | Optional 1493 | 1495 | Description 1496 |
1500 | options 1501 | 1503 | TVStartScanningOptions 1504 | 1506 | 1507 | 1509 | 1510 | 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 |
1523 |
1524 | Return type: Promise<void> 1525 |
1526 |
1527 |
1528 | stopScanning 1529 |
1530 |
1531 | This method makes a request to stop scanning the TV/Radio channels 1532 | for the source. It returns a new Promise that 1533 | will be used to notify the caller about the result of the 1534 | operation. 1535 |
1536 | No parameters. 1537 |
1538 |
1539 | Return type: Promise<void> 1540 |
1541 |
1542 |
1543 |
1544 |
1545 |

1546 | Procedures 1547 |

1548 |

1549 | The getChannels method when invoked MUST run 1550 | the following steps: 1551 |

1552 |
    1553 |
  1. Let promise be a new Promise 1554 | object and resolver be its associated 1555 | resolver. 1556 |
  2. 1557 |
  3. Return promise to the caller. 1558 |
  4. 1559 |
  5. Make a request to the source to retrieve all the TV/Radio 1560 | channels that are available in the source. 1561 |
  6. 1562 |
  7. If an error occurs invoke resolver's 1563 | reject algorithm with error as the 1564 | value argument. 1565 |
  8. 1566 |
  9. When the request has been successfully completed: 1567 |
      1568 |
    1. Let channels be the array of the retrieved 1569 | TVChannel elements. 1570 |
    2. 1571 |
    3. Invoke resolver's fulfill algorithm with 1572 | channels as the value argument. 1573 |
    4. 1574 |
    1575 |
  10. 1576 |
1577 |

1578 | The tuneToChannel method when invoked 1579 | MUST run the following steps: 1580 |

1581 |
    1582 |
  1. Let promise be a new Promise 1583 | object and resolver be its associated 1584 | resolver. 1585 |
  2. 1586 |
  3. Return promise to the caller. 1587 |
  4. 1588 |
  5. Make a request to the source to tune the currently streamed 1589 | TV/Radio channel according to the channel 1590 | parameter. 1591 |
  6. 1592 |
  7. If an error occurs invoke resolver's 1593 | reject algorithm with error as the 1594 | value argument. 1595 |
  8. 1596 |
  9. When the request has been successfully completed: 1597 |
      1598 |
    1. Let stream an instance of a TVMediaStream 1599 | representing the media data of the specified channel. 1600 |
    2. 1601 |
    3. Invoke resolver's fulfill algorithm with 1602 | stream as the value argument. 1603 |
    4. 1604 |
    1605 |
  10. 1606 |
1607 |

1608 | The tuneTo method when invoked 1609 | MUST run the following steps: 1610 |

1611 |
    1612 |
  1. Let promise be a new Promise 1613 | object and resolver be its associated 1614 | resolver. 1615 |
  2. 1616 |
  3. Return promise to the caller. 1617 |
  4. 1618 |
  5. Make a request to the source to tune the currently streamed 1619 | TV/Radio channel according to the tuningParams 1620 | parameter. 1621 |
  6. 1622 |
  7. If an error occurs invoke resolver's 1623 | reject algorithm with error as the 1624 | value argument. 1625 |
  8. 1626 |
  9. When the request has been successfully completed: 1627 |
      1628 |
    1. Let stream an instance of a TVMediaStream 1629 | representing the media data of the channel found at the 1630 | specified tuning parameters. 1631 |
    2. Invoke resolver's fulfill algorithm with 1632 | stream as the value argument. 1633 |
    3. 1634 |
    1635 |
  10. 1636 |
1637 |

1638 | The startScanning method when invoked MUST 1639 | run the following steps: 1640 |

1641 |
    1642 |
  1. Let promise be a new Promise 1643 | object and resolver be its associated 1644 | resolver. 1645 |
  2. 1646 |
  3. Return promise to the caller. 1647 |
  4. 1648 |
  5. Make a request to the source to start scanning all the TV/Radio 1649 | channels that are available in the source according to the scanning 1650 | options specified in the 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 |
  6. 1658 |
  7. If an error occurs invoke resolver's 1659 | reject algorithm with error as the 1660 | value argument. 1661 |
  8. 1662 |
  9. When the request has been successfully completed: 1663 |
      1664 |
    1. Invoke resolver's fulfill algorithm without 1665 | assigning a value to the value argument. 1666 |
    2. 1667 |
    1668 |
  10. 1669 |
1670 |

1671 | The stopScanning method when invoked MUST run 1672 | the following steps: 1673 |

1674 |
    1675 |
  1. Let promise be a new Promise 1676 | object and resolver be its associated 1677 | resolver. 1678 |
  2. 1679 |
  3. Return promise to the caller. 1680 |
  4. 1681 |
  5. Make a request to the source to stop scanning the TV/Radio 1682 | channels. 1683 |
  6. 1684 |
  7. If an error occurs invoke resolver's 1685 | reject algorithm with error as the 1686 | value argument. 1687 |
  8. 1688 |
  9. When the request has been successfully completed: 1689 |
      1690 |
    1. Invoke resolver's fulfill algorithm without 1691 | assigning a value to the value argument. 1692 |
    2. 1693 |
    1694 |
  10. 1695 |
1696 |
1697 |
1698 |

1699 | Event handlers 1700 |

1701 |

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 | 1707 | 1708 | 1709 | 1712 | 1715 | 1718 | 1721 | 1722 | 1723 | 1724 | 1725 | 1728 | 1732 | 1735 | 1740 | 1741 | 1742 | 1745 | 1749 | 1752 | 1756 | 1757 | 1758 | 1761 | 1765 | 1768 | 1773 | 1774 | 1775 | 1778 | 1782 | 1785 | 1789 | 1790 | 1791 |
1710 | Event handler 1711 | 1713 | Event name 1714 | 1716 | Event type 1717 | 1719 | Short description 1720 |
1726 | oncurrentchannelchange 1727 | 1729 | currentchannelchange 1731 | 1733 | TVCurrentChannelChangeEvent 1734 | 1736 | Handles the information of the currently streamed TV/Radio 1737 | channel that is tuned by the method 1738 | tuneTo or tuneToChannel. 1739 |
1743 | oneitbroadcast 1744 | 1746 | eitbroadcast 1748 | 1750 | TVEITBroadcastEvent 1751 | 1753 | Handles the information of the available TV programs in the EIT 1754 | that is broadcast by the TV source. 1755 |
1759 | onemergencyalert 1760 | 1762 | emergencyalert 1764 | 1766 | TVEmergencyAlertEvent 1767 | 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 |
1776 | onscanningstatechange 1777 | 1779 | scanningstatechange 1781 | 1783 | TVScanningStateChangeEvent 1784 | 1786 | Handles the information of the state of scanning the TV/Radio 1787 | channels, which is changed by the source. 1788 |
1792 |
1793 | 1794 | 1795 |
1796 |

1797 | TVSourceSupportedConstraints Dictionary 1798 |

1799 |

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 |
1815 |

1816 | Dictionary TVSourceSupportedConstraints Members 1817 |

1818 |
1820 |
1821 | deliverySystem of type boolean defaulting to true 1823 |
1824 |
1825 | Indicates whether the deliverySystem 1826 | constraint is supported. 1827 |
1828 |
1829 | height of type boolean defaulting to true 1831 |
1832 |
1833 | Indicates whether the height constraint is 1834 | supported. 1835 |
1836 |
1837 | channel of type boolean defaulting to true 1839 |
1840 |
1841 | Indicates whether the channel constraint is 1842 | supported. 1843 |
1844 |
1845 | tuningStep of type boolean defaulting to true 1847 |
1848 |
1849 | Indicates whether the tuningStep 1850 | constraint is supported. 1851 |
1852 | 1853 |
1854 |
1855 |
1856 | 1857 |
1858 |

1859 | TVSourceCapabilities Dictionary 1860 |

1861 |

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 |
1870 |

1871 | Dictionary TVSourceCapabilities Members 1872 |

1873 |
1875 |
1876 | deliverySystem of type sequence <TVSourceType> 1878 |
1879 |
1880 | See deliverySystem for details. If the device supports multiple delivery systems then the capabilities will consist of a sequence of entries. The order of entries in the sequence is implementation-dependent. 1881 |
1882 |
1883 | height of type long 1885 |
1886 |
1887 | See height for details. 1888 |
1889 |
1890 | tuningStep of type long 1892 |
1893 |
1894 | See tuningStep for details. 1895 |
1896 | 1897 |
1898 |
1899 |
1900 | 1901 |
1902 |

1903 | TVSourceConstraints Dictionary 1904 |

1905 |

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 |
1920 |

1921 | Dictionary TVSourceConstraints Members 1922 |

1923 |
1925 |
1926 | deliverySystem of type sequence <TVSourceType> 1928 |
1929 |
1930 | See deliverySystem for details. 1931 |
1932 |
1933 | height of type ConstrainLong 1935 |
1936 |
1937 | See height for details. 1938 |
1939 |
1940 | channel of type TVChannel 1942 |
1943 |
1944 | See channel for details. 1945 |
1946 |
1947 | tuningStep of type ConstrainLong 1949 |
1950 |
1951 | See tuningStep for details. 1952 |
1953 | 1954 |
1955 |
1956 |
1957 | 1958 |
1959 |

1960 | TVSourceSettings Dictionary 1961 |

1962 |

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 |
1975 |

1976 | Dictionary TVSourceSettings Members 1977 |

1978 |
1980 |
1981 | deliverySystem of type sequence <TVSourceType> 1983 |
1984 |
1985 | See deliverySystem for details. 1986 |
1987 |
1988 | height of type long 1990 |
1991 |
1992 | See height for details. 1993 |
1994 |
1995 | channel of type TVChannel 1996 |
1997 |
1998 | See channel for details. 1999 |
2000 |
2001 | tuningStep of type long 2003 |
2004 |
2005 | See tuningStep for details. 2006 |
2007 |
2008 |
2009 |
2010 |
2011 |

Constrainable Properties

2012 |

The names of the initial set of constrainable properties for 2013 | TVSource are defined below.

2014 | 2015 | 2016 | 2017 | 2018 | 2019 | 2020 | 2021 | 2022 | 2023 | 2024 | 2025 | 2026 | 2027 | 2028 | 2029 | 2030 | 2031 | 2032 | 2036 | 2037 | 2038 | 2039 | 2040 | 2041 | 2042 | 2043 |
Property NameValuesNotes
deliverySystemsequence <TVSourceType>The delivery system or systems that must be supported.
heightConstrainLongThe 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.
channelTVChannelA channel that must be able to be received and decoded by the source.
2044 |

The delivery system may be one of the following values of 2045 | TVSourceType:

2046 |
2047 |
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 | 2074 | 2075 | 2076 | 2079 | 2080 | 2081 | 2084 | 2087 | 2088 | 2089 | 2092 | 2095 | 2096 | 2097 | 2100 | 2103 | 2104 | 2105 | 2108 | 2111 | 2112 | 2113 | 2116 | 2119 | 2120 | 2121 | 2124 | 2127 | 2128 | 2129 | 2132 | 2135 | 2136 | 2137 | 2140 | 2143 | 2144 | 2145 | 2148 | 2151 | 2152 | 2153 | 2156 | 2159 | 2160 | 2161 | 2164 | 2167 | 2168 | 2169 | 2172 | 2175 | 2176 | 2177 | 2180 | 2183 | 2184 | 2185 | 2188 | 2191 | 2192 | 2193 | 2196 | 2199 | 2200 | 2201 | 2204 | 2207 | 2208 | 2209 | 2212 | 2215 | 2216 | 2217 | 2220 | 2223 | 2224 | 2225 | 2228 | 2231 | 2232 | 2233 | 2236 | 2239 | 2240 | 2241 | 2244 | 2247 | 2248 | 2249 | 2252 | 2255 | 2256 | 2257 | 2260 | 2263 | 2264 | 2265 |
2077 | Enumeration description 2078 |
2082 | dvb-t 2083 | 2085 | The source works for DVB-T (terrestrial). 2086 |
2090 | dvb-t2 2091 | 2093 | The source works for DVB-T2 (terrestrial). 2094 |
2098 | dvb-c 2099 | 2101 | The source works for DVB-C (cable). 2102 |
2106 | dvb-c2 2107 | 2109 | The source works for DVB-C2 (cable). 2110 |
2114 | dvb-s 2115 | 2117 | The source works for DVB-S (satellite). 2118 |
2122 | dvb-s2 2123 | 2125 | The source works for DVB-S2 (satellite). 2126 |
2130 | dvb-h 2131 | 2133 | The source works for DVB-H (handheld). 2134 |
2138 | dvb-sh 2139 | 2141 | The source works for DVB-SH (satellite). 2142 |
2146 | atsc 2147 | 2149 | The source works for ATSC (terrestrial/cable). 2150 |
2154 | atsc-m/h 2155 | 2157 | The source works for ATSC-M/H (mobile/handheld). 2158 |
2162 | isdb-t 2163 | 2165 | The source works for ISDB-T (terrestrial). 2166 |
2170 | isdb-tb 2171 | 2173 | The source works for ISDB-Tb (terrestrial, Brazil). 2174 |
2178 | isdb-s 2179 | 2181 | The source works for ISDB-S (satellite). 2182 |
2186 | isdb-c 2187 | 2189 | The source works for ISDB-C (cable). 2190 |
2194 | 1seg 2195 | 2197 | The source works for 1seg (handheld). 2198 |
2202 | dtmb 2203 | 2205 | The source works for DTMB (terrestrial). 2206 |
2210 | cmmb 2211 | 2213 | The source works for CMMB (handheld). 2214 |
2218 | t-dmb 2219 | 2221 | The source works for T-DMB (terrestrial). 2222 |
2226 | s-dmb 2227 | 2229 | The source works for S-DMB (satellite). 2230 |
2234 | dab 2235 | 2237 | The source works for DAB (terrestrial). 2238 |
2242 | drm 2243 | 2245 | The source works for DRM (terrestrial). 2246 |
2250 | fm 2251 | 2253 | The source works for FM (terrestrial). 2254 |
2258 | AM 2259 | 2261 | The source works for AM (terrestrial). 2262 |
2266 |
2267 |

The following constrainable properties are defined to apply only to 2268 | radio TVSource objects:

2269 | 2270 | 2271 | 2272 | 2273 | 2274 | 2275 | 2276 | 2277 | 2278 | 2279 | 2280 | 2281 | 2283 | 2284 | 2285 |
Property NameValuesNotes
tuningStepConstrainLongThe exact tuning step size (in KHz) supported by the tuner. 2282 |
2286 |
2287 |
2288 | 2289 |
2290 |

2291 | TVChannel Interface 2292 |

2293 |

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 |
2319 |

2320 | Attributes 2321 |

2322 |
2324 |
2325 | source of type TVSource, readonly 2327 |
2328 |
2329 | MUST return the source which the TV/Radio channel belongs to. 2330 |
2331 |
2332 | type of type TVChannelType, readonly 2334 |
2335 |
2336 | MUST return the type of the channel. 2337 |
2338 |
2339 | attributes of type TVChannelAttributes, readonly 2341 |
2342 |
2343 | MUST return TVChannelAttributes belonging to this TV/Radio channel. 2344 | "NHK", etc. 2345 |
2346 |
2347 | name of type DOMString, readonly 2349 |
2350 |
2351 | MUST return the name of the TV/Radio channel. E.g., 2352 | "CNN", "NHK", etc. 2353 |
2354 |
2355 | number of type DOMString, readonly 2357 |
2358 |
2359 | MUST return the Logical Channel Number (LCN) of the TV/Radio 2360 | channel. E.g., "12-1", "12-2", etc. 2361 |
2362 |
2363 | isEmergency of type boolean, readonly 2365 |
2366 |
2367 | MUST indicate whether the TV/Radio channel is for the emergency 2368 | purpose. 2369 |
2370 |
2371 | isEncrypted of type boolean, readonly 2373 |
2374 |
2375 | MUST indicate whether the TV/Radio channel is encrypted. 2376 |
2377 |
2378 | casSystemId of type DOMString, readonly, nullable 2380 |
2381 |
2382 | MUST return the system ID if it requires to use a specific CAS 2383 | (Conditional Access System) to decrypt the stream from the 2384 | encrypted TV/Radio channel. 2385 |
2386 |
2387 | isParentalLocked of type boolean, readonly 2389 |
2390 |
2391 | MUST indicate whether the TV/Radio channel is locked for parental 2392 | control. 2393 |
2394 |
2395 | onparentallockchange of type EventHandler 2397 |
2398 |
2399 | Handles the parentallockchange event, fired when the 2400 | parental lock status of the TV/Radio channel is changed. 2401 |
2402 |
2403 |
2404 |
2405 |

2406 | Methods 2407 |

2408 |
2409 |
2410 | getPrograms 2411 |
2412 |
2413 | This method makes a request to retrieve all the TV/Radio programs 2414 | that are available in the channel by the 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 | 2420 | 2421 | 2422 | 2425 | 2428 | 2431 | 2434 | 2437 | 2438 | 2439 | 2442 | 2445 | 2448 | 2451 | 2456 | 2457 | 2458 |
2423 | Parameter 2424 | 2426 | Type 2427 | 2429 | Nullable 2430 | 2432 | Optional 2433 | 2435 | Description 2436 |
2440 | options 2441 | 2443 | TVGetProgramsOptions 2444 | 2446 | 2447 | 2449 | 2450 | 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 |
2459 |
2460 | Return type: 2461 | Promise<sequence<TVProgram>> 2462 |
2463 |
2464 |
2465 | getCurrentProgram 2466 |
2467 |
2468 | This method makes a request to retrieve the current TV/Radio 2469 | program available in the channel. It returns a new 2470 | 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 |
2474 | No parameters. 2475 |
2476 |
2477 | Return type: Promise<TVProgram> 2478 |
2479 |
2480 |
2481 | getApplications 2482 |
2483 |
2484 | This method makes a request to retrieve all the TV/Radio 2485 | applications that are available in the channel. It returns a new 2486 | 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 |
2490 | No parameters. 2491 |
2492 |
2493 | Return type: 2494 | Promise<sequence<TVApplication>> 2495 |
2496 |
2497 |
2498 | setParentalLock 2499 |
2500 |
2501 | This method makes a request to set the parental lock status for the 2502 | channel. It returns a new Promise that will be used to 2503 | notify the caller about the result of the operation. 2504 | 2505 | 2506 | 2507 | 2510 | 2513 | 2516 | 2519 | 2522 | 2523 | 2524 | 2527 | 2530 | 2533 | 2536 | 2539 | 2540 | 2541 | 2544 | 2547 | 2550 | 2553 | 2556 | 2557 | 2558 |
2508 | Parameter 2509 | 2511 | Type 2512 | 2514 | Nullable 2515 | 2517 | Optional 2518 | 2520 | Description 2521 |
2525 | pin 2526 | 2528 | DOMString 2529 | 2531 | 2532 | 2534 | 2535 | 2537 | Specifies the PIN used for parental control. 2538 |
2542 | isLocked 2543 | 2545 | boolean 2546 | 2548 | 2549 | 2551 | 2552 | 2554 | Specifies the parental lock status for the channel. 2555 |
2559 |
2560 | Return type: Promise<void> 2561 |
2562 |
2563 |
2564 |
2565 |
2566 |

2567 | Procedures 2568 |

2569 |

2570 | The getPrograms method when invoked MUST run 2571 | the following steps: 2572 |

2573 |
    2574 |
  1. Let promise be a new Promise 2575 | object and resolver be its associated 2576 | resolver. 2577 |
  2. 2578 |
  3. Return promise to the caller. 2579 |
  4. 2580 |
  5. Make a request to the channel to retrieve all the TV/Radio 2581 | programs that are available in the channel according to the 2582 | retrieving options specified in the options parameter. 2583 |
  6. 2584 |
  7. If an error occurs invoke resolver's 2585 | reject algorithm with error as the 2586 | value argument. 2587 |
  8. 2588 |
  9. When the request has been successfully completed: 2589 |
      2590 |
    1. Let programs be the array of the retrieved 2591 | TVProgram elements. 2592 |
    2. 2593 |
    3. Invoke resolver's fulfill algorithm with 2594 | programs as the value argument. 2595 |
    4. 2596 |
    2597 |
  10. 2598 |
2599 |

2600 | The getCurrentProgram method when invoked 2601 | MUST run the following steps: 2602 |

2603 |
    2604 |
  1. Let promise be a new Promise 2605 | object and resolver be its associated 2606 | resolver. 2607 |
  2. 2608 |
  3. Return promise to the caller. 2609 |
  4. 2610 |
  5. Make a request to the channel to retrieve the current TV/Radio 2611 | program available in the channel. 2612 |
  6. 2613 |
  7. If an error occurs invoke resolver's 2614 | reject algorithm with error as the 2615 | value argument. 2616 |
  8. 2617 |
  9. When the request has been successfully completed: 2618 |
      2619 |
    1. Let program be the retrieved TVProgram 2620 | element. 2621 |
    2. 2622 |
    3. Invoke resolver's fulfill algorithm with 2623 | program as the value argument. 2624 |
    4. 2625 |
    2626 |
  10. 2627 |
2628 |

2629 | The setParentalLock method when invoked MUST 2630 | run the following steps: 2631 |

2632 |
    2633 |
  1. Let promise be a new Promise 2634 | object and resolver be its associated 2635 | resolver. 2636 |
  2. 2637 |
  3. Return promise to the caller. 2638 |
  4. 2639 |
  5. Make a request to set the new parental lock status for this 2640 | channel according to the isLocked parameter. 2641 |
  6. 2642 |
  7. If the 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 |
  8. 2646 |
  9. When the request has been successfully completed: 2647 |
      2648 |
    1. Invoke resolver's fulfill algorithm without 2649 | assigning a value to the value argument. 2650 |
    2. 2651 |
    2652 |
  10. 2653 |
2654 |
2655 |
2656 |

2657 | Event handlers 2658 |

2659 |

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 | 2665 | 2666 | 2667 | 2670 | 2673 | 2676 | 2679 | 2680 | 2681 | 2682 | 2683 | 2686 | 2690 | 2693 | 2697 | 2698 | 2699 |
2668 | Event handler 2669 | 2671 | Event name 2672 | 2674 | Event type 2675 | 2677 | Short description 2678 |
2684 | onparentallockchange 2685 | 2687 | parentallockchange 2689 | 2691 | Event 2692 | 2694 | Handles the information of the parental control status change 2695 | for the TV/Radio channel. 2696 |
2700 |
2701 |
2702 |

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 |
2714 |

2715 | TVChannelAttributes Interface 2716 |

2717 |

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 |
2729 |

2730 | Attributes 2731 |

2732 |
2734 |
2735 | onattributeschange of type EventHandler 2737 |
2738 |
2739 | Handles the onattributeschange event, fired when the 2740 | attributes of the TV/Radio channel are changed. 2741 |
2742 |
2743 |
2744 |
2745 | 2746 |
2747 |

2748 | TVDVBChannelAttributes Interface 2749 |

2750 |

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 |
2762 |

2763 | Attributes 2764 |

2765 |
2767 |
2768 | originalNetworkId of type DOMString, readonly 2770 |
2771 |
2772 | MUST return the identification of the originating broadcast 2773 | transmission network for this channel. This is the 2774 | networkID of the operator that originated this 2775 | channel. 2776 |
2777 |
2778 | networkId of type DOMString, readonly 2780 |
2781 |
2782 | MUST return the identification of a broadcast transmission network. 2783 | On satellite and IP broadband, typically one 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 |
2788 |
2789 | transportStreamId of type DOMString, readonly 2791 |
2792 |
2793 | MUST return the identification of a time-domain multiplex of 2794 | several programmes carried in Transport Stream (TS) packets. One or 2795 | more multiplexes can be transmitted on any given radio frequency in 2796 | a DVB network. 2797 |
2798 |
2799 | serviceId of type DOMString, readonly 2801 |
2802 |
2803 | MUST return the identification of a TV, radio or data programme 2804 | within a TS multiplex. The number of programmes is limited by the 2805 | capacity of the underlying physical channel. 2806 |
2807 |
2808 |
2809 |
2810 | 2811 |
2812 |

2813 | TVDABChannelAttributes Interface 2814 |

2815 |

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 |
2825 |

2826 | Attributes 2827 |

2828 |
2830 |
2831 | ensembleId of type DOMString, readonly 2833 |
2834 |
2835 | MUST return the identification of a time-domain multiplex of 2836 | several programmes carried in DAB ensemble. 2837 |
2838 |
2839 | serviceId of type DOMString, readonly 2841 |
2842 |
2843 | MUST return the identification of aDAB radio or data service within 2844 | a DAB ensemble. The number of programmes is limited by the capacity 2845 | of the underlying physical channel. 2846 |
2847 |
2848 |
2849 |
2850 | 2851 |

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 |
2858 |

2859 | TVApplication Interface 2860 |

2861 |

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 |
2874 |

2875 | Attributes 2876 |

2877 |
2879 |
2880 | type of type TVApplicationType, readonly 2882 |
2883 |
2884 | MUST return the type of associated application. 2885 |
2886 |
2887 | applicationData of type object, readonly, nullable 2889 |
2890 |
2891 | MUST return application specific data. Please note that the 2892 | detailed syntax and semantic might vary between different 2893 | broadcasting standards or only known by private agreements. 2894 |
2895 |
2896 | onapplicationchange of type EventHandler 2898 |
2899 |
2900 | Handles the onapplicationchange event, fired when the 2901 | application of the TV/Radio channel is changed. 2902 |
2903 |
2904 |
2905 |
2906 | 2907 |
2908 |

2909 | TVProgram Interface 2910 |

2911 |

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 |
2935 |

2936 | Attributes 2937 |

2938 |
2940 |
2941 | eventId of type DOMString, readonly 2943 |
2944 |
2945 | MUST return the event ID of the TV/Radio program. It has to be 2946 | unique only within a TV/Radio channel. 2947 |
2948 |
2949 | channel of type TVChannel, readonly 2951 |
2952 |
2953 | MUST return the TV/Radio channel which the program belongs to. 2954 |
2955 |
2956 | title of type DOMString, readonly 2958 |
2959 |
2960 | MUST return the title of the TV/Radio program. 2961 |
2962 |
2963 | startTime of type DOMTimeStamp, readonly 2965 |
2966 |
2967 | MUST return the start time of the TV/Radio 2968 | program, in milliseconds relative to 1970-01-01T00:00:00Z. 2969 | 2970 |
2971 |
2972 | duration of type DOMTimeStamp, readonly 2974 |
2975 |
2976 | MUST return the duration of the TV/Radio program, in milliseconds 2977 | relative to 1970-01-01T00:00:00Z. 2978 |
2979 |
2980 | shortDescription of type DOMString, readonly, nullable 2982 |
2983 |
2984 | MUST return the short description of the TV/Radio program. 2985 |
2986 |
2987 | longDescription of type DOMString, readonly, nullable 2989 |
2990 |
2991 | MUST return the long description of the TV/Radio program. 2992 |
2993 |
2994 | parentalRating of type DOMString, readonly, nullable 2997 |
2998 |
2999 | MUST return the parental rating of the TV/Radio program. 3000 |
3001 |
3002 | isEncrypted of type boolean, readonly 3004 |
3005 |
3006 | MUST indicate whether the TV/Radio program is encrypted by 3007 | a content protection mechanism. 3008 |
3009 |
3010 | seriesId of type DOMString, readonly, nullable 3012 |
3013 |
3014 | MUST return the ID of the series (if applicable) which the TV/Radio 3015 | program belongs to. 3016 |
3017 |
3018 |
3019 |
3020 |

3021 | Methods 3022 |

3023 |
3024 |
3025 | getAudioLanguages 3026 |
3027 |
3028 | MUST return the audio languages of the TV/Radio program in 3-digit 3029 | language codes specified by [[!ISO639-2]]. 3030 |
3031 | No parameters. 3032 |
3033 |
3034 | Return type: sequence<DOMString> 3035 |
3036 |
3037 |
3038 | getSubtitleLanguages 3039 |
3040 |
3041 | MUST return the subtitle languages of the TV/Radio program in 3042 | 3-digit language codes specified by [[!ISO639-2]]. 3043 |
3044 | No parameters. 3045 |
3046 |
3047 | Return type: sequence<DOMString> 3048 |
3049 |
3050 |
3051 | getGenres 3052 |
3053 |
3054 | MUST return the genres of the TV/Radio program. Please note that 3055 | the classification might vary between different broadcasting 3056 | standards. 3057 |
3058 | No parameters. 3059 |
3060 |
3061 | Return type: sequence<DOMString> 3062 |
3063 |
3064 |
3065 |
3066 |
3067 | 3068 |
3069 |

3070 | TVTriggerCue Interface 3071 |

3072 |

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 |

3088 |
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 |
3097 |

3098 | Attributes 3099 |

3100 |
3102 |
3103 | type of type TVTriggerType, readonly 3105 |
3106 |
3107 | MUST return the type of the TV/Radio trigger. 3108 |
3109 |
3110 | title of type DOMString, readonly, nullable 3112 |
3113 |
3114 | MUST return the human readable title for the TV/Radio trigger. 3115 |
3116 |
3117 | url of type DOMString, readonly, nullable 3119 |
3120 |
3121 | MUST return the URL for the TV/Radio trigger. 3122 |
3123 |
3124 | channel of type TVChannel, readonly, nullable 3126 |
3127 |
3128 | MUST return the channel associated with the TV/Radio trigger. 3129 |
3130 |
3131 | stream of type TVMediaStream, readonly, nullable 3133 |
3134 |
3135 | MUST return the TVMediaStream object that could be played for the 3136 | TV trigger. 3137 |
3138 |
3139 | additionalData of type object, readonly, nullable 3141 |
3142 |
3143 | MUST return the content source information or other supplemental 3144 | information for the TV trigger. Please note that the detailed data 3145 | might vary between different broadcasting standards or only known 3146 | by private agreements. 3147 |
3148 |
3149 |
3150 |
3151 | 3152 |
3153 |

3154 | TVRecording Interface 3155 |

3156 |

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 |

3166 |
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 |
3182 |

3183 | Attributes 3184 |

3185 |
3187 |
3188 | id of type DOMString, readonly 3190 |
3191 |
3192 | MUST return the ID of the TV/Radio recording. 3193 |
3194 |
3195 | channel of type TVChannel, readonly 3197 |
3198 |
3199 | MUST return the associated channel of the TV/Radio recording. 3200 |
3201 |
3202 | program of type TVProgram, readonly, nullable 3204 |
3205 |
3206 | MUST return the associated program of the TV/Radio recording if 3207 | applicable. Please note the recording should keep track of the 3208 | relevant updates in Event Information Table (EIT) in the case of 3209 | DVB or ProgramInfo in the case of DAB while TVProgram is 3210 | specified, and then update correspondent attributes and fire a 3211 | TVRecordingChangeEvent accordingly. Furthermore, if the 3212 | updated time frame conflicts with some existent ones, and there's 3213 | no sufficient resource (i.e. tuner) to meet this, then the 3214 | recording should change its state to stopped. 3215 |
3216 |
3217 | startTime of type DOMTimeStamp, readonly 3219 |
3220 |
3221 | MUST return the start time of the TV/Radio recording, in 3222 | milliseconds relative to 1970-01-01T00:00:00Z. 3223 |
3224 |
3225 | endTime of type DOMTimeStamp, readonly 3227 |
3228 |
3229 | 3230 | MUST return the end time of the TV/Radio recording, in 3231 | milliseconds relative to 1970-01-01T00:00:00Z. 3232 |
3233 |
3234 | state of type TVRecordingState, readonly 3236 |
3237 |
3238 | MUST return the current state of the TV/Radio recording. 3239 |
3240 |
3241 | size of type unsigned long long, readonly 3243 |
3244 |
3245 | MUST return the actual size of the TV/Radio recording. Please note 3246 | the value should be zero if the TV recording hasn't actually 3247 | recorded anything. 3248 |
3249 |
3250 | duration of type DOMTimeStamp, readonly 3252 |
3253 |
3254 | MUST return the actual duration of the TV/Radio recording, in 3255 | milliseconds. Please note the value should be zero if the TV 3256 | recording hasn't actually recorded anything. 3257 |
3258 |
3259 | description of type DOMString 3261 |
3262 |
3263 | MUST return the description of the TV/Radio recording. 3264 |
3265 |
3266 | onrecordingchange of type EventHandler 3268 |
3269 |
3270 | Handles the 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 |
3274 |
3275 |
3276 |
3277 |

3278 | Methods 3279 |

3280 |
3282 |
3283 | getStream 3284 |
3285 |
3286 | This method makes a request to retrieve the recorded content as a 3287 | TVMediaStream object, which is extended from 3288 | 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 |
3297 | No parameters. 3298 |
3299 |
3300 | Return type: Promise<TVMediaStream> 3301 |
3302 |
3303 |
3304 | stop 3305 |
3306 |
3307 | This method makes a request to stop the TV/Radio recording. 3308 |
3309 | No parameters. 3310 |
3311 |
3312 | Return type: Promise<void> 3313 |
3314 |
3315 |
3316 |
3317 |
3318 |

3319 | Procedures 3320 |

3321 |

3322 | The getStream method when invoked MUST run 3323 | the following steps: 3324 |

3325 |
    3326 |
  1. Let promise be a new Promise 3327 | object and resolver be its associated 3328 | resolver. 3329 |
  2. 3330 |
  3. Return promise to the caller. 3331 |
  4. 3332 |
  5. Make a request to the source to retrieve the recorded content 3333 | that is available in the TV/Radio recording. 3334 |
  6. 3335 |
  7. If an error occurs invoke resolver's 3336 | reject algorithm with error as the 3337 | value argument. 3338 |
  8. 3339 |
  9. When the request has been successfully completed: 3340 |
      3341 |
    1. Let stream be the retrieved TVMediaStream 3342 | object. 3343 |
    2. 3344 |
    3. Invoke resolver's fulfill algorithm with 3345 | stream as the value argument. 3346 |
    4. 3347 |
    3348 |
  10. 3349 |
3350 |

3351 | The stop method when invoked MUST run the 3352 | following steps: 3353 |

3354 |
    3355 |
  1. Let promise be a new Promise 3356 | object and resolver be its associated 3357 | resolver. 3358 |
  2. 3359 |
  3. Return promise to the caller. 3360 |
  4. 3361 |
  5. Make a request to the TV/Radio recording to stop it. 3362 |
  6. 3363 |
  7. If an error occurs invoke resolver's 3364 | reject algorithm with error as the 3365 | value argument. 3366 |
  8. 3367 |
  9. When the request has been successfully completed: 3368 |
      3369 |
    1. Invoke resolver's fulfill algorithm without 3370 | assigning a value to value argument. 3371 |
    2. 3372 |
    3373 |
  10. 3374 |
3375 |
3376 |
3377 |

3378 | Event handlers 3379 |

3380 |

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 | 3386 | 3387 | 3388 | 3391 | 3394 | 3397 | 3400 | 3401 | 3402 | 3403 | 3404 | 3407 | 3410 | 3413 | 3416 | 3417 | 3418 |
3389 | Event handler 3390 | 3392 | Event name 3393 | 3395 | Event type 3396 | 3398 | Short description 3399 |
3405 | onrecordingchange 3406 | 3408 | recordingchange 3409 | 3411 | TVRecordingChangeEvent 3412 | 3414 | Handles the information of the updates for TV/Radio recordings. 3415 |
3419 |
3420 |
3421 | 3422 |
3423 |

3424 | TVMediaStream Interface 3425 |

3426 |

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 |

3434 |

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 |
3446 |

3447 | Methods 3448 |

3449 |
3451 |
3452 | getTextTracks 3453 |
3454 |
3455 | MUST return the text tracks in this stream. 3456 |
3457 | No parameters. 3458 |
3459 |
3460 | Return type: sequence<TextTrack> 3461 |
3462 |
3463 |
3464 | addTextTrack 3465 |
3466 |
3467 | 3468 | 3469 | 3470 | 3473 | 3476 | 3479 | 3482 | 3485 | 3486 | 3487 | 3490 | 3493 | 3496 | 3499 | 3502 | 3503 | 3504 |
3471 | Parameter 3472 | 3474 | Type 3475 | 3477 | Nullable 3478 | 3480 | Optional 3481 | 3483 | Description 3484 |
3488 | textTrack 3489 | 3491 | TextTrack 3492 | 3494 | 3495 | 3497 | 3498 | 3500 | The TextTrack object to be added. 3501 |
3505 |
3506 | Return type: void 3507 |
3508 |
3509 |
3510 | removeTextTrack 3511 |
3512 |
3513 | 3514 | 3515 | 3516 | 3519 | 3522 | 3525 | 3528 | 3531 | 3532 | 3533 | 3536 | 3539 | 3542 | 3545 | 3548 | 3549 | 3550 |
3517 | Parameter 3518 | 3520 | Type 3521 | 3523 | Nullable 3524 | 3526 | Optional 3527 | 3529 | Description 3530 |
3534 | textTrack 3535 | 3537 | TextTrack 3538 | 3540 | 3541 | 3543 | 3544 | 3546 | The TextTrack object to be removed. 3547 |
3551 |
3552 | Return type: void 3553 |
3554 |
3555 |
3556 |
3557 |
3558 |

3559 | HTMLMediaElement Attributes When Playing a 3560 | TVMediaStream 3561 |

3562 |

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 |

3571 | 3572 | 3573 | 3574 | 3577 | 3580 | 3583 | 3586 | 3587 | 3588 | 3589 | 3590 | 3595 | 3598 | 3601 | 3606 | 3607 | 3608 | 3613 | 3616 | 3619 | 3623 | 3624 | 3625 | 3630 | 3633 | 3636 | 3640 | 3641 | 3642 | 3647 | 3650 | 3653 | 3658 | 3659 | 3660 | 3665 | 3668 | 3671 | 3679 | 3680 | 3681 | 3686 | 3689 | 3692 | 3696 | 3697 | 3698 | 3703 | 3706 | 3709 | 3713 | 3714 | 3715 | 3720 | 3723 | 3726 | 3730 | 3731 | 3732 | 3737 | 3740 | 3743 | 3747 | 3748 | 3749 | 3754 | 3757 | 3760 | 3764 | 3765 | 3766 | 3771 | 3774 | 3777 | 3781 | 3782 | 3783 | 3788 | 3791 | 3794 | 3798 | 3799 | 3800 | 3805 | 3808 | 3811 | 3815 | 3816 | 3817 |
3575 | Attribute Name 3576 | 3578 | Attribute Type 3579 | 3581 | Valid Values When Using a TVMediaStream 3582 | 3584 | Additional considerations 3585 |
3591 | 3593 | currentSrc 3594 | 3596 | DOMString 3597 | 3599 | The empty string 3600 | 3602 | When srcObject is specified the User Agent MUST 3603 | set this to the empty string. (Same as 3604 | MediaStream.) 3605 |
3609 | 3611 | preload 3612 | 3614 | DOMString 3615 | 3617 | none 3618 | 3620 | A TVMediaStream cannot be preloaded. (Same as 3621 | MediaStream.) 3622 |
3626 | 3628 | buffered 3629 | 3631 | TimeRanges 3632 | 3634 | Same as HTMLMediaElement. 3635 | 3637 | Unlock the restriction applied by 3638 | MediaStream. 3639 |
3643 | 3645 | networkState 3646 | 3648 | unsigned short 3649 | 3651 | NETWORK_IDLE 3652 | 3654 | The media element does not fetch the TVMediaStream so 3655 | there is no network traffic. (Same as 3656 | MediaStream.) 3657 |
3661 | 3663 | readyState 3664 | 3666 | unsigned short 3667 | 3669 | HAVE_NOTHING, HAVE_ENOUGH_DATA 3670 | 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 |
3682 | 3684 | currentTime 3685 | 3687 | double 3688 | 3690 | Same as HTMLMediaElement. 3691 | 3693 | Unlock the restriction applied by 3694 | MediaStream. 3695 |
3699 | 3701 | duration 3702 | 3704 | unrestricted double 3705 | 3707 | Same as HTMLMediaElement. 3708 | 3710 | Unlock the restriction applied by 3711 | MediaStream. 3712 |
3716 | 3718 | seeking 3719 | 3721 | boolean 3722 | 3724 | Same as HTMLMediaElement. 3725 | 3727 | Unlock the restriction applied by 3728 | MediaStream. 3729 |
3733 | 3735 | defaultPlaybackRate 3736 | 3738 | double 3739 | 3741 | Same as HTMLMediaElement. 3742 | 3744 | Unlock the restriction applied by 3745 | MediaStream. 3746 |
3750 | 3752 | playbackRate 3753 | 3755 | double 3756 | 3758 | Same as HTMLMediaElement. 3759 | 3761 | Unlock the restriction applied by 3762 | MediaStream. 3763 |
3767 | 3769 | played 3770 | 3772 | TimeRanges 3773 | 3775 | Same as HTMLMediaElement. 3776 | 3778 | Unlock the restriction applied by 3779 | MediaStream. 3780 |
3784 | 3786 | seekable 3787 | 3789 | TimeRanges 3790 | 3792 | Same as HTMLMediaElement. 3793 | 3795 | Unlock the restriction applied by 3796 | MediaStream. 3797 |
3801 | 3803 | loop 3804 | 3806 | boolean 3807 | 3809 | Same as HTMLMediaElement. 3810 | 3812 | Unlock the restriction applied by 3813 | MediaStream. 3814 |
3818 |
3819 |
3820 |

3821 | Time-shifting 3822 |

3823 |

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 |

3845 |
3846 |
3847 | 3848 |
3849 |

3850 | TVCICard Interface 3851 |

3852 |

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 |
3863 |

3864 | Attributes 3865 |

3866 |
3868 |
3869 | state of type TVCICardState, readonly 3871 |
3872 |
3873 | MUST return the state of the CI card. 3874 |
3875 |
3876 | casSystemId of type DOMString, readonly 3878 |
3879 |
3880 | MUST return the CAS (Conditional Access System) system ID for the 3881 | pertaining CI card. 3882 |
3883 |
3884 | isInUse of type boolean, readonly 3886 |
3887 |
3888 | MUST indicate whether the CI card is in use. Note that if multiple 3889 | cards happen to represent the same casSystemId, at most one 3890 | of them can have this attribute set. 3891 |
3892 |
3893 |
3894 |
3895 | 3896 |
3897 |

3898 | TVStartScanningOptions Dictionary 3899 |

3900 |

3901 | The TVStartScanningOptions dictionary contains the information 3902 | for scanning the TV/Radio channels. 3903 |

3904 |
dictionary TVStartScanningOptions {
3905 |              boolean isRescanned;
3906 | };
3907 |
3908 |

3909 | Dictionary TVStartScanningOptions Members 3910 |

3911 |
3913 |
3914 | isRescanned of type boolean 3916 |
3917 |
3918 | Specifies whether or not the process of scanning the TV/Radio 3919 | channels has to clear the currently scanned TV/Radio channels 3920 | before scanning. 3921 |
3922 |
3923 |
3924 |
3925 | 3926 |
3927 |

3928 | TVGetProgramsOptions Dictionary 3929 |

3930 |

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 |
3941 |

3942 | Dictionary TVGetProgramsOptions Members 3943 |

3944 |
3946 |
3947 | startTime of type DOMTimeStamp 3949 |
3950 |
3951 | Specifies the start time of a time period which bounds the time 3952 | slots of TV/Radio programs to be retrieved, in milliseconds 3953 | relative to 1970-01-01T00:00:00Z. 3954 |
3955 |
3956 | endTime of type DOMTimeStamp 3958 |
3959 |
3960 | Specifies the end time of a time period which bounds the time slots 3961 | of TV/Radio programs to be retrieved, in milliseconds relative to 3962 | 1970-01-01T00:00:00Z. 3963 |
3964 |
3965 | genre of type DOMString 3967 |
3968 |
3969 | Specifies the genre of TV/Radio programs to be retrieved. 3970 |
3971 |
3972 |
3973 |
3974 | 3975 |
3976 |

3977 | TVAddRecordingOptions Dictionary 3978 |

3979 |

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 |
3991 |

3992 | Dictionary TVAddRecordingOptions Members 3993 |

3994 |
3996 |
3997 | description of type DOMString, required 3999 |
4000 |
4001 | Specifies the description of the TV/Radio recording. 4002 |
4003 |
4004 | channel of type TVChannel, required 4006 |
4007 |
4008 | Specifies the channel to be recorded. 4009 |
4010 |
4011 | program of type TVProgram, nullable 4013 |
4014 |
4015 | Specifies the program to be recorded. Please note this could be 4016 | omitted if the recording time frame can be determined by 4017 | startTime and endTime. 4018 |
4019 |
4020 | startTime of type DOMTimeStamp, nullable 4022 |
4023 |
4024 | Specifies the start time of a recording time frame, in milliseconds 4025 | relative to 1970-01-01T00:00:00Z. When not specified, it implies the 4026 | recording should start from now on. Please note this could also be 4027 | omitted and auto determined if program is specified. 4028 |
4029 |
4030 | endTime of type DOMTimeStamp, nullable 4032 |
4033 |
4034 | Specifies the end time of a recording time frame, in milliseconds 4035 | relative to 1970-01-01T00:00:00Z. When not specified, it implies the 4036 | recording should continue until a 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 |
4041 |
4042 |
4043 |
4044 | 4045 |
4046 |

4047 | TVGetRecordingsOptions Dictionary 4048 |

4049 |

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 |
4058 |

4059 | Dictionary TVGetRecordingsOptions Members 4060 |

4061 |
4063 |
4064 | state of type TVRecordingState, nullable 4066 |
4067 |
4068 | Specifies the state of the TV/Radio recordings to be retrieved. 4069 |
4070 |
4071 | id of type DOMString, nullable 4073 |
4074 |
4075 | Specifies the ID of the TV/Radio recording to be retrieved. 4076 |
4077 |
4078 |
4079 |
4080 | 4081 |
4082 |

4083 | TVTunerChangeEvent Interface 4084 |

4085 |

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 |
4094 |

4095 | Attributes 4096 |

4097 |
4099 |
4100 | operation of type TVTunerChangeEventOperation, readonly 4102 |
4103 |
4104 | MUST return the type of operation that changes the TV/Radio tuner. 4105 |
4106 |
4107 | id of type DOMString, readonly 4109 |
4110 |
4111 | MUST return the ID of the TV/Radio tuner that is added/removed. 4112 |
4113 |
4114 |
4115 |
4116 | 4117 |
4118 |

4119 | TVCurrentSourceChangeEvent Interface 4120 |

4121 |

4122 | The TVCurrentSourceChangeEvent interface represents the event 4123 | related to the current TV/Radio source that is configured by the method 4124 | setCurrentSource. 4125 |

4126 |
interface TVCurrentSourceChangeEvent : Event {
4127 |     readonly        attribute TVSource? source;
4128 | };
4129 |
4130 |

4131 | Attributes 4132 |

4133 |
4135 |
4136 | source of type TVSource, readonly, nullable 4138 |
4139 |
4140 | MUST return the source that is currently configured by the TV/Radio 4141 | tuner. MUST return null if the TV/Radio source is not 4142 | configured. 4143 |
4144 |
4145 |
4146 |
4147 | 4148 |
4149 |

4150 | TVEITBroadcastEvent Interface 4151 |

4152 |

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 |
4161 |

4162 | Attributes 4163 |

4164 |
4166 |
4167 | programs of type object, readonly 4169 |
4170 |
4171 | MUST return the available TV programs in the EIT that is 4172 | broadcast by the TV source. Please note that it needs to be 4173 | casted into a list of TVProgram instances. The cached 4174 | value for this array needs to go into an internal slot for the 4175 | object, and it should be cached there until the next time that the 4176 | underlying array changes when the cached value will be updated. 4177 |
4178 |
4179 |
4180 |
4181 | 4182 |
4183 |

4184 | TVEmergencyAlertEvent Interface 4185 |

4186 |

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 |
4200 |

4201 | Attributes 4202 |

4203 |
4205 |
4206 | type of type DOMString, readonly, nullable 4208 |
4209 |
4210 | MUST return the the nature of the emergency, i.e. “Earthquake”, 4211 | "Tsunami", “Child Abduction”. Please note that the classification 4212 | might vary between different broadcasting standards. 4213 |
4214 |
4215 | severityLevel of type DOMString, readonly, nullable 4217 |
4218 |
4219 | MUST return the severity level of the emergency alert. Please note 4220 | that the classification of severity level might vary between 4221 | different broadcasting standards. MUST return null when 4222 | the emergency announcement is over. 4223 |
4224 |
4225 | description of type DOMString, readonly, nullable 4227 |
4228 |
4229 | MUST return the human readable description of the emergency alert. 4230 |
4231 |
4232 | channel of type TVChannel, readonly, nullable 4234 |
4235 |
4236 | MUST return the emergency channel which might be switched to for 4237 | more information about the emergency. 4238 |
4239 |
4240 | url of type DOMString, readonly, nullable 4242 |
4243 |
4244 | MUST return the URL where more information might be available. 4245 |
4246 |
4247 |
4248 |
4249 |

4250 | Methods 4251 |

4252 |
4254 |
4255 | getRegions 4256 |
4257 |
4258 | MUST return the associated regions of the emergency alert. Please 4259 | note that it might vary between different broadcasting standards. 4260 | It could return an empty sequence if the emergency system doesn't 4261 | reveal detailed geographical scope of the alert to the endpoint. 4262 |
4263 | No parameters. 4264 |
4265 |
4266 | Return type: sequence<DOMString> 4267 |
4268 |
4269 |
4270 |
4271 |
4272 | 4273 |
4274 |

4275 | TVScanningStateChangeEvent Interface 4276 |

4277 |

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 |
4287 |

4288 | Attributes 4289 |

4290 |
4292 |
4293 | state of type TVScanningState, readonly 4295 |
4296 |
4297 | MUST return the state of channel scanning, which is changed by the 4298 | TV/Radio source. 4299 |
4300 |
4301 | channel of type TVChannel, readonly, nullable 4303 |
4304 |
4305 | MUST return the TV/Radio channel that is scanned by the TV/Radio 4306 | source. MUST return null if the state is not 4307 | "scanned". 4308 |
4309 |
4310 |
4311 |
4312 | 4313 |
4314 |

4315 | TVCurrentChannelChangeEvent Interface 4316 |

4317 |

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 |
4327 |

4328 | Attributes 4329 |

4330 |
4332 |
4333 | channel of type TVChannel, readonly, nullable 4335 |
4336 |
4337 | MUST return the TV/Radio channel that is currently streamed by the 4338 | TV/Radio tuner. MUST return null if the TV/Radio tuner is 4339 | not streaming any data. 4340 |
4341 |
4342 |
4343 |
4344 | 4345 |
4346 |

4347 | TVRecordingChangeEvent Interface 4348 |

4349 |

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 |
4360 |

4361 | Attributes 4362 |

4363 |
4365 |
4366 | id of type DOMString, readonly 4368 |
4369 |
4370 | MUST return the ID of the updated TV/Radio recording. 4371 |
4372 |
4373 | isTimeChange of type boolean, readonly 4375 |
4376 |
4377 | MUST indicate whether the recording time frame of the TV/Radio 4378 | recording has changed. 4379 |
4380 |
4381 | isStateChange of type boolean, readonly 4383 |
4384 |
4385 | MUST indicate whether the state of the TV/Radio recording has 4386 | changed. 4387 |
4388 |
4389 | errorName of type DOMString, readonly, nullable 4391 |
4392 |
4393 | MUST return the name of the DOMException, i.e. "AbortError", if 4394 | this change involves with an error. 4395 |
4396 |
4397 |
4398 |
4399 | 4400 |
4401 |

4402 | TVCICardChangeEvent Interface 4403 |

4404 |

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 |
4413 |

4414 | Attributes 4415 |

4416 |
4418 |
4419 | state of type TVCICardState, readonly 4421 |
4422 |
4423 | MUST return the updated state of the card. 4424 |
4425 |
4426 | casSystemId of type DOMString, readonly 4428 |
4429 |
4430 | MUST return the CAS (Conditional Access System) system ID of the 4431 | card. 4432 |
4433 |
4434 |
4435 |
4436 | 4437 |
4438 |

4439 | Enumerations 4440 |

4441 |

4442 | The attribute type in a TVChannel 4443 | can have one of the following values of TVChannelType: 4444 |

4445 |
4446 |
enum TVChannelType {
4447 |     "tv",
4448 |     "radio",
4449 |     "data"
4450 | };
4451 | 4453 | 4454 | 4455 | 4458 | 4459 | 4460 | 4463 | 4466 | 4467 | 4468 | 4471 | 4474 | 4475 | 4476 | 4479 | 4482 | 4483 | 4484 |
4456 | Enumeration description 4457 |
4461 | tv 4462 | 4464 | The channel is broadcast as a regular TV type. 4465 |
4469 | radio 4470 | 4472 | The channel is broadcast as a radio type. 4473 |
4477 | data 4478 | 4480 | The channel is broadcast as a data type. 4481 |
4485 |
4486 |

4487 | The attribute type in a TVApplication 4488 | can have one of the following values of TVApplicationType: 4489 |

4490 |
4491 |
enum TVApplicationType {
4492 |     "hbbtv",
4493 |     "mheg",
4494 |     "sls",
4495 |     "dl",
4496 |     "jl"
4497 | };
4498 | 4500 | 4501 | 4502 | 4505 | 4506 | 4507 | 4510 | 4513 | 4514 | 4515 | 4518 | 4521 | 4522 | 4523 | 4526 | 4529 | 4530 | 4531 | 4534 | 4537 | 4538 | 4539 | 4542 | 4545 | 4546 | 4547 |
4503 | Enumeration description 4504 |
4508 | hbbtv 4509 | 4511 | The application is a tv hbbtv application 4512 |
4516 | mheg 4517 | 4519 | The application is a tv mheg application 4520 |
4524 | sls 4525 | 4527 | The application radio slideshow application 4528 |
4532 | dl 4533 | 4535 | The application radio dynamic label application 4536 |
4540 | jl 4541 | 4543 | The application radio journaline application 4544 |
4548 |
4549 |

4550 | The attribute operation in the TVTunerChangeEvent 4551 | which can have one of the following values of TVTunerChangeEventOperation: 4552 |

4553 |
4554 |
enum TVTunerChangeEventOperation {
4555 |     "added",
4556 |     "removed"
4557 | };
4558 | 4560 | 4561 | 4562 | 4565 | 4566 | 4567 | 4570 | 4573 | 4574 | 4575 | 4578 | 4581 | 4582 | 4583 |
4563 | Enumeration description 4564 |
4568 | added 4569 | 4571 | A tuner is added. 4572 |
4576 | removed 4577 | 4579 | A tuner is removed. 4580 |
4584 |
4585 |

4586 | The attribute state in the 4587 | TVScanningStateChangeEvent can have one the following values of 4588 | TVScanningState: 4589 |

4590 |
4591 |
enum TVScanningState {
4592 |     "cleared",
4593 |     "scanned",
4594 |     "completed",
4595 |     "stopped"
4596 | };
4597 | 4599 | 4600 | 4601 | 4604 | 4605 | 4606 | 4610 | 4614 | 4615 | 4616 | 4619 | 4625 | 4626 | 4627 | 4630 | 4633 | 4634 | 4635 | 4638 | 4641 | 4642 | 4643 |
4602 | Enumeration description 4603 |
4607 | cleared 4609 | 4611 | The currently scanned TV/Radio channels have been cleared. This 4612 | event may be fired before a channel scan is started. 4613 |
4617 | scanned 4618 | 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 |
4628 | completed 4629 | 4631 | The channel scan has completed. 4632 |
4636 | stopped 4637 | 4639 | The channel scan has been stopped. 4640 |
4644 |
4645 |

4646 | The attribute type in TVTriggerCue 4647 | can have one of the following values of TVTriggerType: 4648 |

4649 |
4650 |
enum TVTriggerType {
4651 |     "channel-change",
4652 |     "time",
4653 |     "content-boundary",
4654 |     "fingerprint",
4655 |     "watermark",
4656 |     "context",
4657 |     "segment",
4658 |     "caption"
4659 | };
4660 | 4662 | 4663 | 4664 | 4667 | 4668 | 4669 | 4672 | 4675 | 4676 | 4677 | 4680 | 4683 | 4684 | 4685 | 4688 | 4691 | 4692 | 4693 | 4696 | 4699 | 4700 | 4701 | 4704 | 4707 | 4708 | 4709 | 4712 | 4715 | 4716 | 4717 | 4720 | 4724 | 4725 | 4726 | 4729 | 4732 | 4733 | 4734 |
4665 | Enumeration description 4666 |
4670 | channel-change 4671 | 4673 | Triggers when channel is switched. 4674 |
4678 | time 4679 | 4681 | Triggers based on date and time. 4682 |
4686 | content-boundary 4687 | 4689 | Triggers based on content boundary. 4690 |
4694 | fingerprint 4695 | 4697 | Triggers based on content fingerprints. 4698 |
4702 | watermark 4703 | 4705 | Triggers based on content watermarks. 4706 |
4710 | context 4711 | 4713 | Triggers based on contextual information in content. 4714 |
4718 | segment 4719 | 4721 | Triggers based on program chapters or other segments within the 4722 | program. 4723 |
4727 | caption 4728 | 4730 | Triggers based on subtitle captions. 4731 |
4735 |
4736 |
4737 |

4738 | The attribute state in TVRecording 4739 | if of type TVRecordingState, which can have the following values: 4740 |

4741 |
4742 |
enum TVRecordingState {
4743 |     "scheduled",
4744 |     "recording",
4745 |     "stopped"
4746 | };
4747 | 4749 | 4750 | 4751 | 4754 | 4755 | 4756 | 4759 | 4762 | 4763 | 4764 | 4767 | 4770 | 4771 | 4772 | 4775 | 4779 | 4780 | 4781 |
4752 | Enumeration description 4753 |
4757 | scheduled 4758 | 4760 | The state of recording is scheduled. 4761 |
4765 | recording 4766 | 4768 | The state of recording is currently on. 4769 |
4773 | stopped 4774 | 4776 | The state of recording is stopped from scheduled or 4777 | canceled from recording. 4778 |
4782 |
4783 |

4784 | The attribute state in TVCICard 4785 | can have one of the following values of TVCICardState: 4786 |

4787 |
4788 |
enum TVCICardState {
4789 |     "inserted",
4790 |     "accepted",
4791 |     "removed",
4792 |     "error"
4793 | };
4794 | 4796 | 4797 | 4798 | 4801 | 4802 | 4803 | 4806 | 4809 | 4810 | 4811 | 4814 | 4817 | 4818 | 4819 | 4822 | 4825 | 4826 | 4827 | 4830 | 4833 | 4834 | 4835 |
4799 | Enumeration description 4800 |
4804 | inserted 4805 | 4807 | The CI card is inserted. 4808 |
4812 | accepted 4813 | 4815 | The CI card is accepted. 4816 |
4820 | removed 4821 | 4823 | The CI card is removed. 4824 |
4828 | error 4829 | 4831 | The CI Card has encountered an error. 4832 |
4836 |
4837 | 4838 |
4839 |

4840 | Security and Privacy Considerations 4841 |

4842 |

4843 | This section will be completed in a future draft of the specification. See 4844 | this issue for 4845 | details. 4846 |

4847 |
4848 | 4849 |
4850 |

4851 | Acknowledgements 4852 |

4853 |

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 |
4861 | 4862 |
4863 |

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 |
4879 | 4880 | 4881 | -------------------------------------------------------------------------------- /w3c.json: -------------------------------------------------------------------------------- 1 | { 2 | "group": 90021, 3 | "contacts": ["tidoust"], 4 | "repo-type": "note" 5 | } --------------------------------------------------------------------------------