• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright (c) 2021-2023 Huawei Device Co., Ltd.
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 *     http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 */
15
16/**
17 * @file
18 * @kit ArkUI
19 */
20
21/**
22 * Seek mode.
23 *
24 * @enum { number }
25 * @syscap SystemCapability.ArkUI.ArkUI.Full
26 * @since 8
27 */
28/**
29 * Seek mode.
30 *
31 * @enum { number }
32 * @syscap SystemCapability.ArkUI.ArkUI.Full
33 * @crossplatform
34 * @since 10
35 */
36/**
37 * Seek mode.
38 *
39 * @enum { number }
40 * @syscap SystemCapability.ArkUI.ArkUI.Full
41 * @crossplatform
42 * @atomicservice
43 * @since 11
44 */
45declare enum SeekMode {
46  /**
47   * Sync to keyframes before the time point.
48   *
49   * @syscap SystemCapability.ArkUI.ArkUI.Full
50   * @since 8
51   */
52  /**
53   * Sync to keyframes before the time point.
54   *
55   * @syscap SystemCapability.ArkUI.ArkUI.Full
56   * @crossplatform
57   * @since 10
58   */
59  /**
60   * Sync to keyframes before the time point.
61   *
62   * @syscap SystemCapability.ArkUI.ArkUI.Full
63   * @crossplatform
64   * @atomicservice
65   * @since 11
66   */
67  PreviousKeyframe,
68
69  /**
70   * Sync to keyframes after the time point.
71   *
72   * @syscap SystemCapability.ArkUI.ArkUI.Full
73   * @since 8
74   */
75  /**
76   * Sync to keyframes after the time point.
77   *
78   * @syscap SystemCapability.ArkUI.ArkUI.Full
79   * @crossplatform
80   * @since 10
81   */
82  /**
83   * Sync to keyframes after the time point.
84   *
85   * @syscap SystemCapability.ArkUI.ArkUI.Full
86   * @crossplatform
87   * @atomicservice
88   * @since 11
89   */
90  NextKeyframe,
91
92  /**
93   * Sync to closest keyframes.
94   *
95   * @syscap SystemCapability.ArkUI.ArkUI.Full
96   * @since 8
97   */
98  /**
99   * Sync to closest keyframes.
100   *
101   * @syscap SystemCapability.ArkUI.ArkUI.Full
102   * @crossplatform
103   * @since 10
104   */
105  /**
106   * Sync to closest keyframes.
107   *
108   * @syscap SystemCapability.ArkUI.ArkUI.Full
109   * @crossplatform
110   * @atomicservice
111   * @since 11
112   */
113  ClosestKeyframe,
114
115  /**
116   * Seek to frames closest the time point.
117   *
118   * @syscap SystemCapability.ArkUI.ArkUI.Full
119   * @since 8
120   */
121  /**
122   * Seek to frames closest the time point.
123   *
124   * @syscap SystemCapability.ArkUI.ArkUI.Full
125   * @crossplatform
126   * @since 10
127   */
128  /**
129   * Seek to frames closest the time point.
130   *
131   * @syscap SystemCapability.ArkUI.ArkUI.Full
132   * @crossplatform
133   * @atomicservice
134   * @since 11
135   */
136  Accurate,
137}
138
139/**
140 * playback speed.
141 *
142 * @enum { number }
143 * @syscap SystemCapability.ArkUI.ArkUI.Full
144 * @since 8
145 */
146/**
147 * playback speed.
148 *
149 * @enum { number }
150 * @syscap SystemCapability.ArkUI.ArkUI.Full
151 * @crossplatform
152 * @since 10
153 */
154/**
155 * playback speed.
156 *
157 * @enum { number }
158 * @syscap SystemCapability.ArkUI.ArkUI.Full
159 * @crossplatform
160 * @atomicservice
161 * @since 11
162 */
163declare enum PlaybackSpeed {
164  /**
165   * 0.75x speed playback.
166   *
167   * @syscap SystemCapability.ArkUI.ArkUI.Full
168   * @since 8
169   */
170  /**
171   * 0.75x speed playback.
172   *
173   * @syscap SystemCapability.ArkUI.ArkUI.Full
174   * @crossplatform
175   * @since 10
176   */
177  /**
178   * 0.75x speed playback.
179   *
180   * @syscap SystemCapability.ArkUI.ArkUI.Full
181   * @crossplatform
182   * @atomicservice
183   * @since 11
184   */
185  Speed_Forward_0_75_X,
186
187  /**
188   * 1.00x speed playback.
189   *
190   * @syscap SystemCapability.ArkUI.ArkUI.Full
191   * @since 8
192   */
193  /**
194   * 1.00x speed playback.
195   *
196   * @syscap SystemCapability.ArkUI.ArkUI.Full
197   * @crossplatform
198   * @since 10
199   */
200  /**
201   * 1.00x speed playback.
202   *
203   * @syscap SystemCapability.ArkUI.ArkUI.Full
204   * @crossplatform
205   * @atomicservice
206   * @since 11
207   */
208  Speed_Forward_1_00_X,
209
210  /**
211   * 1.25x speed playback.
212   *
213   * @syscap SystemCapability.ArkUI.ArkUI.Full
214   * @since 8
215   */
216  /**
217   * 1.25x speed playback.
218   *
219   * @syscap SystemCapability.ArkUI.ArkUI.Full
220   * @crossplatform
221   * @since 10
222   */
223  /**
224   * 1.25x speed playback.
225   *
226   * @syscap SystemCapability.ArkUI.ArkUI.Full
227   * @crossplatform
228   * @atomicservice
229   * @since 11
230   */
231  Speed_Forward_1_25_X,
232
233  /**
234   * 1.75x speed playback.
235   *
236   * @syscap SystemCapability.ArkUI.ArkUI.Full
237   * @since 8
238   */
239  /**
240   * 1.75x speed playback.
241   *
242   * @syscap SystemCapability.ArkUI.ArkUI.Full
243   * @crossplatform
244   * @since 10
245   */
246  /**
247   * 1.75x speed playback.
248   *
249   * @syscap SystemCapability.ArkUI.ArkUI.Full
250   * @crossplatform
251   * @atomicservice
252   * @since 11
253   */
254  Speed_Forward_1_75_X,
255
256  /**
257   * 2.00x speed playback.
258   *
259   * @syscap SystemCapability.ArkUI.ArkUI.Full
260   * @since 8
261   */
262  /**
263   * 2.00x speed playback.
264   *
265   * @syscap SystemCapability.ArkUI.ArkUI.Full
266   * @crossplatform
267   * @since 10
268   */
269  /**
270   * 2.00x speed playback.
271   *
272   * @syscap SystemCapability.ArkUI.ArkUI.Full
273   * @crossplatform
274   * @atomicservice
275   * @since 11
276   */
277  Speed_Forward_2_00_X,
278}
279
280/**
281 * Defines the video options.
282 *
283 * @interface VideoOptions
284 * @syscap SystemCapability.ArkUI.ArkUI.Full
285 * @since 7
286 */
287/**
288 * Defines the video options.
289 *
290 * @interface VideoOptions
291 * @syscap SystemCapability.ArkUI.ArkUI.Full
292 * @crossplatform
293 * @since 10
294 */
295/**
296 * Defines the video options.
297 *
298 * @interface VideoOptions
299 * @syscap SystemCapability.ArkUI.ArkUI.Full
300 * @crossplatform
301 * @atomicservice
302 * @since 11
303 */
304/**
305 * Defines the video options.
306 *
307 * @interface VideoOptions
308 * @syscap SystemCapability.ArkUI.ArkUI.Full
309 * @crossplatform
310 * @atomicservice
311 * @since 12
312 */
313declare interface VideoOptions {
314  /**
315   * src of video.
316   *
317   * @type { ?(string | Resource) }
318   * @syscap SystemCapability.ArkUI.ArkUI.Full
319   * @since 7
320   */
321  /**
322   * src of video.
323   *
324   * @type { ?(string | Resource) }
325   * @syscap SystemCapability.ArkUI.ArkUI.Full
326   * @crossplatform
327   * @since 10
328   */
329  /**
330   * src of video.
331   *
332   * @type { ?(string | Resource) }
333   * @syscap SystemCapability.ArkUI.ArkUI.Full
334   * @crossplatform
335   * @atomicservice
336   * @since 11
337   */
338  src?: string | Resource;
339
340  /**
341   * playback rate of video.
342   *
343   * @type { ?(number | string | PlaybackSpeed) }
344   * @syscap SystemCapability.ArkUI.ArkUI.Full
345   * @since 7
346   */
347  /**
348   * playback rate of video.
349   *
350   * @type { ?(number | string | PlaybackSpeed) }
351   * @syscap SystemCapability.ArkUI.ArkUI.Full
352   * @crossplatform
353   * @since 10
354   */
355  /**
356   * playback rate of video.
357   *
358   * @type { ?(number | string | PlaybackSpeed) }
359   * @syscap SystemCapability.ArkUI.ArkUI.Full
360   * @crossplatform
361   * @atomicservice
362   * @since 11
363   */
364  currentProgressRate?: number | string | PlaybackSpeed;
365
366  /**
367   * preview uri of video.
368   *
369   * @type { ?(string | PixelMap | Resource) }
370   * @syscap SystemCapability.ArkUI.ArkUI.Full
371   * @since 7
372   */
373  /**
374   * preview uri of video.
375   *
376   * @type { ?(string | PixelMap | Resource) }
377   * @syscap SystemCapability.ArkUI.ArkUI.Full
378   * @crossplatform
379   * @since 10
380   */
381  /**
382   * preview uri of video.
383   *
384   * @type { ?(string | PixelMap | Resource) }
385   * @syscap SystemCapability.ArkUI.ArkUI.Full
386   * @crossplatform
387   * @atomicservice
388   * @since 11
389   */
390  previewUri?: string | PixelMap | Resource;
391
392  /**
393   * controller of video.
394   *
395   * @type { ?VideoController }
396   * @syscap SystemCapability.ArkUI.ArkUI.Full
397   * @since 7
398   */
399  /**
400   * controller of video.
401   *
402   * @type { ?VideoController }
403   * @syscap SystemCapability.ArkUI.ArkUI.Full
404   * @crossplatform
405   * @since 10
406   */
407  /**
408   * controller of video.
409   *
410   * @type { ?VideoController }
411   * @syscap SystemCapability.ArkUI.ArkUI.Full
412   * @crossplatform
413   * @atomicservice
414   * @since 11
415   */
416  controller?: VideoController;
417
418  /**
419   * image ai options of video.
420   *
421   * @type { ?ImageAIOptions }
422   * @syscap SystemCapability.ArkUI.ArkUI.Full
423   * @atomicservice
424   * @since 12
425   */
426  imageAIOptions?: ImageAIOptions;
427}
428
429/**
430 * Defines the video controller.
431 *
432 * @syscap SystemCapability.ArkUI.ArkUI.Full
433 * @since 7
434 */
435/**
436 * Defines the video controller.
437 *
438 * @syscap SystemCapability.ArkUI.ArkUI.Full
439 * @crossplatform
440 * @since 10
441 */
442/**
443 * Defines the video controller.
444 *
445 * @syscap SystemCapability.ArkUI.ArkUI.Full
446 * @crossplatform
447 * @atomicservice
448 * @since 11
449 */
450declare class VideoController {
451  /**
452   * constructor.
453   *
454   * @syscap SystemCapability.ArkUI.ArkUI.Full
455   * @since 7
456   */
457  /**
458   * constructor.
459   *
460   * @syscap SystemCapability.ArkUI.ArkUI.Full
461   * @crossplatform
462   * @since 10
463   */
464  /**
465   * constructor.
466   *
467   * @syscap SystemCapability.ArkUI.ArkUI.Full
468   * @crossplatform
469   * @atomicservice
470   * @since 11
471   */
472  constructor();
473
474  /**
475   * Provides events to play.
476   *
477   * @syscap SystemCapability.ArkUI.ArkUI.Full
478   * @since 7
479   */
480  /**
481   * Provides events to play.
482   *
483   * @syscap SystemCapability.ArkUI.ArkUI.Full
484   * @crossplatform
485   * @since 10
486   */
487  /**
488   * Provides events to play.
489   *
490   * @syscap SystemCapability.ArkUI.ArkUI.Full
491   * @crossplatform
492   * @atomicservice
493   * @since 11
494   */
495  start();
496
497  /**
498   * Provides a pause event for playback.
499   *
500   * @syscap SystemCapability.ArkUI.ArkUI.Full
501   * @since 7
502   */
503  /**
504   * Provides a pause event for playback.
505   *
506   * @syscap SystemCapability.ArkUI.ArkUI.Full
507   * @crossplatform
508   * @since 10
509   */
510  /**
511   * Provides a pause event for playback.
512   *
513   * @syscap SystemCapability.ArkUI.ArkUI.Full
514   * @crossplatform
515   * @atomicservice
516   * @since 11
517   */
518  pause();
519
520  /**
521   * Provides an event to stop playback.
522   *
523   * @syscap SystemCapability.ArkUI.ArkUI.Full
524   * @since 7
525   */
526  /**
527   * Provides an event to stop playback.
528   *
529   * @syscap SystemCapability.ArkUI.ArkUI.Full
530   * @crossplatform
531   * @since 10
532   */
533  /**
534   * Provides an event to stop playback.
535   *
536   * @syscap SystemCapability.ArkUI.ArkUI.Full
537   * @crossplatform
538   * @atomicservice
539   * @since 11
540   */
541  stop();
542
543  /**
544   * Provide the progress method of video playback.
545   *
546   * @param { number } value
547   * @syscap SystemCapability.ArkUI.ArkUI.Full
548   * @since 7
549   */
550  /**
551   * Provide the progress method of video playback.
552   *
553   * @param { number } value
554   * @syscap SystemCapability.ArkUI.ArkUI.Full
555   * @crossplatform
556   * @since 10
557   */
558  /**
559   * Provide the progress method of video playback.
560   *
561   * @param { number } value
562   * @syscap SystemCapability.ArkUI.ArkUI.Full
563   * @crossplatform
564   * @atomicservice
565   * @since 11
566   */
567  setCurrentTime(value: number);
568
569  /**
570   * Provides a full screen playback method.
571   *
572   * @param { boolean } value
573   * @syscap SystemCapability.ArkUI.ArkUI.Full
574   * @since 7
575   */
576  /**
577   * Provides a full screen playback method.
578   *
579   * @param { boolean } value
580   * @syscap SystemCapability.ArkUI.ArkUI.Full
581   * @crossplatform
582   * @since 10
583   */
584  /**
585   * Provides a full screen playback method.
586   *
587   * @param { boolean } value
588   * @syscap SystemCapability.ArkUI.ArkUI.Full
589   * @crossplatform
590   * @atomicservice
591   * @since 11
592   */
593  requestFullscreen(value: boolean);
594
595  /**
596   * Provides a method to exit full screen playback.
597   *
598   * @syscap SystemCapability.ArkUI.ArkUI.Full
599   * @since 7
600   */
601  /**
602   * Provides a method to exit full screen playback.
603   *
604   * @syscap SystemCapability.ArkUI.ArkUI.Full
605   * @crossplatform
606   * @since 10
607   */
608  /**
609   * Provides a method to exit full screen playback.
610   *
611   * @syscap SystemCapability.ArkUI.ArkUI.Full
612   * @crossplatform
613   * @atomicservice
614   * @since 11
615   */
616  exitFullscreen();
617
618  /**
619   * Provide the progress method of video playback.
620   *
621   * @param { number } value
622   * @param { SeekMode } seekMode
623   * @syscap SystemCapability.ArkUI.ArkUI.Full
624   * @since 8
625   */
626  /**
627   * Provide the progress method of video playback.
628   *
629   * @param { number } value
630   * @param { SeekMode } seekMode
631   * @syscap SystemCapability.ArkUI.ArkUI.Full
632   * @crossplatform
633   * @since 10
634   */
635  /**
636   * Provide the progress method of video playback.
637   *
638   * @param { number } value
639   * @param { SeekMode } seekMode
640   * @syscap SystemCapability.ArkUI.ArkUI.Full
641   * @crossplatform
642   * @atomicservice
643   * @since 11
644   */
645  setCurrentTime(value: number, seekMode: SeekMode);
646
647  /**
648   * Provide the reset method of video playback.
649   *
650   * @syscap SystemCapability.ArkUI.ArkUI.Full
651   * @atomicservice
652   * @since 12
653   */
654  reset(): void;
655}
656
657/**
658 * Defines the video interface.
659 *
660 * @interface VideoInterface
661 * @syscap SystemCapability.ArkUI.ArkUI.Full
662 * @since 7
663 */
664/**
665 * Defines the video interface.
666 *
667 * @interface VideoInterface
668 * @syscap SystemCapability.ArkUI.ArkUI.Full
669 * @crossplatform
670 * @since 10
671 */
672/**
673 * Defines the video interface.
674 *
675 * @interface VideoInterface
676 * @syscap SystemCapability.ArkUI.ArkUI.Full
677 * @crossplatform
678 * @atomicservice
679 * @since 11
680 */
681interface VideoInterface {
682  /**
683   * Set the value.
684   *
685   * @param { VideoOptions } value
686   * @returns { VideoAttribute }
687   * @syscap SystemCapability.ArkUI.ArkUI.Full
688   * @since 7
689   */
690  /**
691   * Set the value.
692   *
693   * @param { VideoOptions } value
694   * @returns { VideoAttribute }
695   * @syscap SystemCapability.ArkUI.ArkUI.Full
696   * @crossplatform
697   * @since 10
698   */
699  /**
700   * Set the value.
701   *
702   * @param { VideoOptions } value
703   * @returns { VideoAttribute }
704   * @syscap SystemCapability.ArkUI.ArkUI.Full
705   * @crossplatform
706   * @atomicservice
707   * @since 11
708   */
709  (value: VideoOptions): VideoAttribute;
710}
711
712/**
713 * Defines the video attribute functions.
714 *
715 * @extends CommonMethod<VideoAttribute>
716 * @syscap SystemCapability.ArkUI.ArkUI.Full
717 * @since 7
718 */
719/**
720 * Defines the video attribute functions.
721 *
722 * @extends CommonMethod<VideoAttribute>
723 * @syscap SystemCapability.ArkUI.ArkUI.Full
724 * @crossplatform
725 * @since 10
726 */
727/**
728 * Defines the video attribute functions.
729 *
730 * @extends CommonMethod<VideoAttribute>
731 * @syscap SystemCapability.ArkUI.ArkUI.Full
732 * @crossplatform
733 * @atomicservice
734 * @since 11
735 */
736declare class VideoAttribute extends CommonMethod<VideoAttribute> {
737  /**
738   * Called when judging whether the video is muted.
739   *
740   * @param { boolean } value
741   * @returns { VideoAttribute }
742   * @syscap SystemCapability.ArkUI.ArkUI.Full
743   * @since 7
744   */
745  /**
746   * Called when judging whether the video is muted.
747   *
748   * @param { boolean } value
749   * @returns { VideoAttribute }
750   * @syscap SystemCapability.ArkUI.ArkUI.Full
751   * @crossplatform
752   * @since 10
753   */
754  /**
755   * Called when judging whether the video is muted.
756   *
757   * @param { boolean } value
758   * @returns { VideoAttribute }
759   * @syscap SystemCapability.ArkUI.ArkUI.Full
760   * @crossplatform
761   * @atomicservice
762   * @since 11
763   */
764  muted(value: boolean): VideoAttribute;
765
766  /**
767   * Called when judging whether the video is played automatically.
768   *
769   * @param { boolean } value
770   * @returns { VideoAttribute }
771   * @syscap SystemCapability.ArkUI.ArkUI.Full
772   * @since 7
773   */
774  /**
775   * Called when judging whether the video is played automatically.
776   *
777   * @param { boolean } value
778   * @returns { VideoAttribute }
779   * @syscap SystemCapability.ArkUI.ArkUI.Full
780   * @crossplatform
781   * @since 10
782   */
783  /**
784   * Called when judging whether the video is played automatically.
785   *
786   * @param { boolean } value
787   * @returns { VideoAttribute }
788   * @syscap SystemCapability.ArkUI.ArkUI.Full
789   * @crossplatform
790   * @atomicservice
791   * @since 11
792   */
793  autoPlay(value: boolean): VideoAttribute;
794
795  /**
796   * Called when judging whether the control bar is displayed.
797   *
798   * @param { boolean } value
799   * @returns { VideoAttribute }
800   * @syscap SystemCapability.ArkUI.ArkUI.Full
801   * @since 7
802   */
803  /**
804   * Called when judging whether the control bar is displayed.
805   *
806   * @param { boolean } value
807   * @returns { VideoAttribute }
808   * @syscap SystemCapability.ArkUI.ArkUI.Full
809   * @crossplatform
810   * @since 10
811   */
812  /**
813   * Called when judging whether the control bar is displayed.
814   *
815   * @param { boolean } value
816   * @returns { VideoAttribute }
817   * @syscap SystemCapability.ArkUI.ArkUI.Full
818   * @crossplatform
819   * @atomicservice
820   * @since 11
821   */
822  controls(value: boolean): VideoAttribute;
823
824  /**
825   * Called when judging whether the video is played circular.
826   *
827   * @param { boolean } value
828   * @returns { VideoAttribute }
829   * @syscap SystemCapability.ArkUI.ArkUI.Full
830   * @since 6
831   */
832  /**
833   * Called when judging whether the video is played circular.
834   *
835   * @param { boolean } value
836   * @returns { VideoAttribute }
837   * @syscap SystemCapability.ArkUI.ArkUI.Full
838   * @crossplatform
839   * @since 10
840   */
841  /**
842   * Called when judging whether the video is played circular.
843   *
844   * @param { boolean } value
845   * @returns { VideoAttribute }
846   * @syscap SystemCapability.ArkUI.ArkUI.Full
847   * @crossplatform
848   * @atomicservice
849   * @since 11
850   */
851  loop(value: boolean): VideoAttribute;
852
853  /**
854   * Called when determining the zoom type of the video source.
855   *
856   * @param { ImageFit } value
857   * @returns { VideoAttribute }
858   * @syscap SystemCapability.ArkUI.ArkUI.Full
859   * @since 7
860   */
861  /**
862   * Called when determining the zoom type of the video source.
863   *
864   * @param { ImageFit } value
865   * @returns { VideoAttribute }
866   * @syscap SystemCapability.ArkUI.ArkUI.Full
867   * @crossplatform
868   * @since 10
869   */
870  /**
871   * Called when determining the zoom type of the video source.
872   *
873   * @param { ImageFit } value
874   * @returns { VideoAttribute }
875   * @syscap SystemCapability.ArkUI.ArkUI.Full
876   * @crossplatform
877   * @atomicservice
878   * @since 11
879   */
880  objectFit(value: ImageFit): VideoAttribute;
881
882  /**
883   * Called when the video is played.
884   *
885   * @param { function } event
886   * @returns { VideoAttribute }
887   * @syscap SystemCapability.ArkUI.ArkUI.Full
888   * @since 7
889   */
890  /**
891   * Called when the video is played.
892   *
893   * @param { function } event
894   * @returns { VideoAttribute }
895   * @syscap SystemCapability.ArkUI.ArkUI.Full
896   * @crossplatform
897   * @since 10
898   */
899  /**
900   * Called when the video is played.
901   *
902   * @param { function } event
903   * @returns { VideoAttribute }
904   * @syscap SystemCapability.ArkUI.ArkUI.Full
905   * @crossplatform
906   * @atomicservice
907   * @since 11
908   */
909  onStart(event: () => void): VideoAttribute;
910
911  /**
912   * Called when the video is paused.
913   *
914   * @param { function } event
915   * @returns { VideoAttribute }
916   * @syscap SystemCapability.ArkUI.ArkUI.Full
917   * @since 7
918   */
919  /**
920   * Called when the video is paused.
921   *
922   * @param { function } event
923   * @returns { VideoAttribute }
924   * @syscap SystemCapability.ArkUI.ArkUI.Full
925   * @crossplatform
926   * @since 10
927   */
928  /**
929   * Called when the video is paused.
930   *
931   * @param { function } event
932   * @returns { VideoAttribute }
933   * @syscap SystemCapability.ArkUI.ArkUI.Full
934   * @crossplatform
935   * @atomicservice
936   * @since 11
937   */
938  onPause(event: () => void): VideoAttribute;
939
940  /**
941   * Called when the video playback ends.
942   *
943   * @param { function } event
944   * @returns { VideoAttribute }
945   * @syscap SystemCapability.ArkUI.ArkUI.Full
946   * @since 7
947   */
948  /**
949   * Called when the video playback ends.
950   *
951   * @param { function } event
952   * @returns { VideoAttribute }
953   * @syscap SystemCapability.ArkUI.ArkUI.Full
954   * @crossplatform
955   * @since 10
956   */
957  /**
958   * Called when the video playback ends.
959   *
960   * @param { function } event
961   * @returns { VideoAttribute }
962   * @syscap SystemCapability.ArkUI.ArkUI.Full
963   * @crossplatform
964   * @atomicservice
965   * @since 11
966   */
967  onFinish(event: () => void): VideoAttribute;
968
969  /**
970   * Called when the video enters and exits the full screen.
971   *
972   * @param { function } callback
973   * @returns { VideoAttribute }
974   * @syscap SystemCapability.ArkUI.ArkUI.Full
975   * @since 7
976   */
977  /**
978   * Called when the video enters and exits the full screen.
979   *
980   * @param { function } callback
981   * @returns { VideoAttribute }
982   * @syscap SystemCapability.ArkUI.ArkUI.Full
983   * @crossplatform
984   * @since 10
985   */
986  /**
987   * Called when the video enters and exits the full screen.
988   *
989   * @param { function } callback
990   * @returns { VideoAttribute }
991   * @syscap SystemCapability.ArkUI.ArkUI.Full
992   * @crossplatform
993   * @atomicservice
994   * @since 11
995   */
996  onFullscreenChange(callback: (event: {
997    /**
998     * Play the flag in full screen.
999     *
1000     * @syscap SystemCapability.ArkUI.ArkUI.Full
1001     * @crossplatform
1002     * @since 10
1003     */
1004    /**
1005     * Play the flag in full screen.
1006     *
1007     * @syscap SystemCapability.ArkUI.ArkUI.Full
1008     * @crossplatform
1009     * @atomicservice
1010     * @since 11
1011     */
1012    fullscreen: boolean
1013  }) => void): VideoAttribute;
1014
1015  /**
1016   * Called when the video preparation is complete.
1017   *
1018   * @param { function } callback
1019   * @returns { VideoAttribute }
1020   * @syscap SystemCapability.ArkUI.ArkUI.Full
1021   * @since 7
1022   */
1023  /**
1024   * Called when the video preparation is complete.
1025   *
1026   * @param { function } callback
1027   * @returns { VideoAttribute }
1028   * @syscap SystemCapability.ArkUI.ArkUI.Full
1029   * @crossplatform
1030   * @since 10
1031   */
1032  /**
1033   * Called when the video preparation is complete.
1034   *
1035   * @param { function } callback
1036   * @returns { VideoAttribute }
1037   * @syscap SystemCapability.ArkUI.ArkUI.Full
1038   * @crossplatform
1039   * @atomicservice
1040   * @since 11
1041   */
1042  onPrepared(callback: (event: {
1043    /**
1044     * Playback duration.
1045     *
1046     * @syscap SystemCapability.ArkUI.ArkUI.Full
1047     * @crossplatform
1048     * @since 10
1049     */
1050    /**
1051     * Playback duration.
1052     *
1053     * @syscap SystemCapability.ArkUI.ArkUI.Full
1054     * @crossplatform
1055     * @atomicservice
1056     * @since 11
1057     */
1058    duration: number
1059  }) => void): VideoAttribute;
1060
1061  /**
1062   * Called when the time information is reported when the progress bar process is operated.
1063   *
1064   * @param { function } callback
1065   * @returns { VideoAttribute }
1066   * @syscap SystemCapability.ArkUI.ArkUI.Full
1067   * @since 7
1068   */
1069  /**
1070   * Called when the time information is reported when the progress bar process is operated.
1071   *
1072   * @param { function } callback
1073   * @returns { VideoAttribute }
1074   * @syscap SystemCapability.ArkUI.ArkUI.Full
1075   * @crossplatform
1076   * @since 10
1077   */
1078  /**
1079   * Called when the time information is reported when the progress bar process is operated.
1080   *
1081   * @param { function } callback
1082   * @returns { VideoAttribute }
1083   * @syscap SystemCapability.ArkUI.ArkUI.Full
1084   * @crossplatform
1085   * @atomicservice
1086   * @since 11
1087   */
1088  onSeeking(callback: (event: {
1089    /**
1090     * Play time.
1091     *
1092     * @syscap SystemCapability.ArkUI.ArkUI.Full
1093     * @crossplatform
1094     * @since 10
1095     */
1096    /**
1097     * Play time.
1098     *
1099     * @syscap SystemCapability.ArkUI.ArkUI.Full
1100     * @crossplatform
1101     * @atomicservice
1102     * @since 11
1103     */
1104    time: number
1105  }) => void): VideoAttribute;
1106
1107  /**
1108   * Called when the playback time information is reported after the operation progress bar is completed.
1109   *
1110   * @param { function } callback
1111   * @returns { VideoAttribute }
1112   * @syscap SystemCapability.ArkUI.ArkUI.Full
1113   * @since 7
1114   */
1115  /**
1116   * Called when the playback time information is reported after the operation progress bar is completed.
1117   *
1118   * @param { function } callback
1119   * @returns { VideoAttribute }
1120   * @syscap SystemCapability.ArkUI.ArkUI.Full
1121   * @crossplatform
1122   * @since 10
1123   */
1124  /**
1125   * Called when the playback time information is reported after the operation progress bar is completed.
1126   *
1127   * @param { function } callback
1128   * @returns { VideoAttribute }
1129   * @syscap SystemCapability.ArkUI.ArkUI.Full
1130   * @crossplatform
1131   * @atomicservice
1132   * @since 11
1133   */
1134  onSeeked(callback: (event: {
1135    /**
1136     * Play time.
1137     *
1138     * @syscap SystemCapability.ArkUI.ArkUI.Full
1139     * @crossplatform
1140     * @since 10
1141     */
1142    /**
1143     * Play time.
1144     *
1145     * @syscap SystemCapability.ArkUI.ArkUI.Full
1146     * @crossplatform
1147     * @atomicservice
1148     * @since 11
1149     */
1150    time: number
1151  }) => void): VideoAttribute;
1152
1153  /**
1154   * Called when the playback progress changes.
1155   *
1156   * @param { function } callback
1157   * @returns { VideoAttribute }
1158   * @syscap SystemCapability.ArkUI.ArkUI.Full
1159   * @since 7
1160   */
1161  /**
1162   * Called when the playback progress changes.
1163   *
1164   * @param { function } callback
1165   * @returns { VideoAttribute }
1166   * @syscap SystemCapability.ArkUI.ArkUI.Full
1167   * @crossplatform
1168   * @since 10
1169   */
1170  /**
1171   * Called when the playback progress changes.
1172   *
1173   * @param { function } callback
1174   * @returns { VideoAttribute }
1175   * @syscap SystemCapability.ArkUI.ArkUI.Full
1176   * @crossplatform
1177   * @atomicservice
1178   * @since 11
1179   */
1180  onUpdate(callback: (event: {
1181    /**
1182     * Play time.
1183     *
1184     * @syscap SystemCapability.ArkUI.ArkUI.Full
1185     * @crossplatform
1186     * @since 10
1187     */
1188    /**
1189     * Play time.
1190     *
1191     * @syscap SystemCapability.ArkUI.ArkUI.Full
1192     * @crossplatform
1193     * @atomicservice
1194     * @since 11
1195     */
1196    time: number
1197  }) => void): VideoAttribute;
1198
1199  /**
1200   * Called when playback fails.
1201   *
1202   * @param { function } event
1203   * @returns { VideoAttribute }
1204   * @syscap SystemCapability.ArkUI.ArkUI.Full
1205   * @since 7
1206   */
1207  /**
1208   * Called when playback fails.
1209   *
1210   * @param { function } event
1211   * @returns { VideoAttribute }
1212   * @syscap SystemCapability.ArkUI.ArkUI.Full
1213   * @crossplatform
1214   * @since 10
1215   */
1216  /**
1217   * Called when playback fails.
1218   *
1219   * @param { function } event
1220   * @returns { VideoAttribute }
1221   * @syscap SystemCapability.ArkUI.ArkUI.Full
1222   * @crossplatform
1223   * @atomicservice
1224   * @since 11
1225   */
1226  onError(event: () => void): VideoAttribute;
1227
1228  /**
1229   * Called when the video is stopped.
1230   *
1231   * @param { Callback<void> } event
1232   * @returns { VideoAttribute }
1233   * @syscap SystemCapability.ArkUI.ArkUI.Full
1234   * @crossplatform
1235   * @atomicservice
1236   * @since 12
1237   */
1238  onStop(event: Callback<void>): VideoAttribute;
1239
1240  /**
1241   * Enable image analyzer.
1242   *
1243   * @param { boolean } enable
1244   * @returns { VideoAttribute }
1245   * @syscap SystemCapability.ArkUI.ArkUI.Full
1246   * @atomicservice
1247   * @since 12
1248   */
1249  enableAnalyzer(enable: boolean): VideoAttribute;
1250
1251  /**
1252   * Set image analyzer with config.
1253   *
1254   * @param { ImageAnalyzerConfig } config
1255   * @returns { VideoAttribute }
1256   * @syscap SystemCapability.ArkUI.ArkUI.Full
1257   * @atomicservice
1258   * @since 12
1259   */
1260  analyzerConfig(config: ImageAnalyzerConfig): VideoAttribute;
1261
1262  /**
1263   * Set background color of the surface holden by Video(only support Color.Black and Color.Transparent). The default value is Color.Black.
1264   *
1265   * @param { ColorMetrics } color
1266   * @returns { VideoAttribute }
1267   * @syscap SystemCapability.ArkUI.ArkUI.Full
1268   * @systemapi
1269   * @since 15
1270   */
1271  surfaceBackgroundColor(color: ColorMetrics): VideoAttribute;
1272
1273  /**
1274   * Indicates whether to response shortcut key. The default value is false.
1275   * If the value is true, video will respond to the shortcut keys as follows:
1276   * Space key: play/pause the video.
1277   * Up/Down arrow key: turn up/down volume of the video.
1278   * Right/Left arrow key: fast forward/backward the video.
1279   *
1280   * @param { boolean } enabled
1281   * @returns { VideoAttribute }
1282   * @syscap SystemCapability.ArkUI.ArkUI.Full
1283   * @atomicservice
1284   * @since 15
1285   */
1286  enableShortcutKey(enabled: boolean): VideoAttribute;
1287}
1288
1289/**
1290 * Defines Video Component.
1291 *
1292 * @syscap SystemCapability.ArkUI.ArkUI.Full
1293 * @since 7
1294 */
1295/**
1296 * Defines Video Component.
1297 *
1298 * @syscap SystemCapability.ArkUI.ArkUI.Full
1299 * @crossplatform
1300 * @since 10
1301 */
1302/**
1303 * Defines Video Component.
1304 *
1305 * @syscap SystemCapability.ArkUI.ArkUI.Full
1306 * @crossplatform
1307 * @atomicservice
1308 * @since 11
1309 */
1310declare const Video: VideoInterface;
1311
1312/**
1313 * Defines Video Component instance.
1314 *
1315 * @syscap SystemCapability.ArkUI.ArkUI.Full
1316 * @since 7
1317 */
1318/**
1319 * Defines Video Component instance.
1320 *
1321 * @syscap SystemCapability.ArkUI.ArkUI.Full
1322 * @crossplatform
1323 * @since 10
1324 */
1325/**
1326 * Defines Video Component instance.
1327 *
1328 * @syscap SystemCapability.ArkUI.ArkUI.Full
1329 * @crossplatform
1330 * @atomicservice
1331 * @since 11
1332 */
1333declare const VideoInstance: VideoAttribute;
1334