|
248 | 248 | content?: string; |
249 | 249 | contenteditable?: "true" | "false" | boolean; |
250 | 250 |
|
| 251 | + // Doesn't work when used as HTML attribute |
251 | 252 | /** |
252 | 253 | * Elements with the contenteditable attribute support innerHTML and textContent bindings. |
253 | 254 | */ |
254 | | - innerhtml?: string; |
| 255 | + innerHTML?: string; |
| 256 | + // Doesn't work when used as HTML attribute |
255 | 257 | /** |
256 | 258 | * Elements with the contenteditable attribute support innerHTML and textContent bindings. |
257 | 259 | */ |
258 | | - textcontent?: string; |
| 260 | + |
| 261 | + textContent?: string; |
259 | 262 |
|
260 | 263 | contextmenu?: string; |
261 | 264 | controls?: boolean; |
|
358 | 361 | type?: string; |
359 | 362 | usemap?: string; |
360 | 363 | value?: string | string[] | number; |
| 364 | + /** |
| 365 | + * a value between 0 and 1 |
| 366 | + */ |
361 | 367 | volume?: number; |
362 | 368 | width?: number | string; |
363 | 369 | wmode?: string; |
|
713 | 719 | } |
714 | 720 |
|
715 | 721 | interface SapperAnchorProps { |
| 722 | + // transformed from sapper:noscroll so it should be camel case |
716 | 723 | sapperNoscroll?: true; |
717 | 724 | } |
718 | 725 |
|
| 726 | + interface SvelteMediaTimeRange { |
| 727 | + start: number; |
| 728 | + end: number; |
| 729 | + } |
| 730 | + |
| 731 | + interface SvelteMediaProps { |
| 732 | + readonly duration?: number; |
| 733 | + readonly buffered?: SvelteMediaTimeRange[]; |
| 734 | + readonly played?: SvelteMediaTimeRange[]; |
| 735 | + readonly seekable?: SvelteMediaTimeRange[]; |
| 736 | + readonly seeking?: boolean; |
| 737 | + readonly ended?: boolean; |
| 738 | + |
| 739 | + /** |
| 740 | + * the current playback time in the video, in seconds |
| 741 | + */ |
| 742 | + currentTime?: number; |
| 743 | + /** |
| 744 | + * the current playback time in the video, in seconds |
| 745 | + */ |
| 746 | + currenttime?: number; |
| 747 | + // Doesn't work when used as HTML Attribute |
| 748 | + /** |
| 749 | + * how fast or slow to play the video, where 1 is 'normal' |
| 750 | + */ |
| 751 | + playbackRate?: number; |
| 752 | + |
| 753 | + paused?: boolean; |
| 754 | + } |
| 755 | + |
| 756 | + interface SvelteVideoProps extends SvelteMediaProps { |
| 757 | + // Binding only, don't need lowercase variant |
| 758 | + readonly videoWidth?: number; |
| 759 | + readonly videoHeight?: number; |
| 760 | + } |
| 761 | + |
719 | 762 | interface IntrinsicElements { |
720 | 763 | // HTML |
721 | 764 | a: HTMLProps<HTMLAnchorElement> & SapperAnchorProps; |
|
724 | 767 | area: HTMLProps<HTMLAreaElement>; |
725 | 768 | article: HTMLProps<HTMLElement>; |
726 | 769 | aside: HTMLProps<HTMLElement>; |
727 | | - audio: HTMLProps<HTMLAudioElement>; |
| 770 | + audio: HTMLProps<HTMLAudioElement> & SvelteMediaProps; |
728 | 771 | b: HTMLProps<HTMLElement>; |
729 | 772 | base: HTMLProps<HTMLBaseElement>; |
730 | 773 | bdi: HTMLProps<HTMLElement>; |
|
830 | 873 | u: HTMLProps<HTMLElement>; |
831 | 874 | ul: HTMLProps<HTMLUListElement>; |
832 | 875 | var: HTMLProps<HTMLElement>; |
833 | | - video: HTMLProps<HTMLVideoElement>; |
| 876 | + video: HTMLProps<HTMLVideoElement> & SvelteVideoProps; |
834 | 877 | wbr: HTMLProps<HTMLElement>; |
835 | 878 |
|
836 | 879 | svg: SVGProps<SVGSVGElement>; |
|
0 commit comments