class_videoplayer.rst 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. .. Generated automatically by doc/tools/makerst.py in Godot's source tree.
  2. .. DO NOT EDIT THIS FILE, but the VideoPlayer.xml source instead.
  3. .. The source is found in doc/classes or modules/<name>/doc_classes.
  4. .. _class_VideoPlayer:
  5. VideoPlayer
  6. ===========
  7. **Inherits:** :ref:`Control<class_control>` **<** :ref:`CanvasItem<class_canvasitem>` **<** :ref:`Node<class_node>` **<** :ref:`Object<class_object>`
  8. **Category:** Core
  9. Brief Description
  10. -----------------
  11. Control to play video files.
  12. Member Functions
  13. ----------------
  14. +--------------------------------+-----------------------------------------------------------------------------+
  15. | :ref:`String<class_string>` | :ref:`get_stream_name<class_VideoPlayer_get_stream_name>` **(** **)** const |
  16. +--------------------------------+-----------------------------------------------------------------------------+
  17. | :ref:`Texture<class_texture>` | :ref:`get_video_texture<class_VideoPlayer_get_video_texture>` **(** **)** |
  18. +--------------------------------+-----------------------------------------------------------------------------+
  19. | :ref:`bool<class_bool>` | :ref:`is_playing<class_VideoPlayer_is_playing>` **(** **)** const |
  20. +--------------------------------+-----------------------------------------------------------------------------+
  21. | void | :ref:`play<class_VideoPlayer_play>` **(** **)** |
  22. +--------------------------------+-----------------------------------------------------------------------------+
  23. | void | :ref:`stop<class_VideoPlayer_stop>` **(** **)** |
  24. +--------------------------------+-----------------------------------------------------------------------------+
  25. Member Variables
  26. ----------------
  27. .. _class_VideoPlayer_audio_track:
  28. - :ref:`int<class_int>` **audio_track**
  29. .. _class_VideoPlayer_autoplay:
  30. - :ref:`bool<class_bool>` **autoplay**
  31. .. _class_VideoPlayer_buffering_msec:
  32. - :ref:`int<class_int>` **buffering_msec** - The amount of milliseconds to store in buffer while playing.
  33. .. _class_VideoPlayer_bus:
  34. - :ref:`String<class_string>` **bus**
  35. .. _class_VideoPlayer_expand:
  36. - :ref:`bool<class_bool>` **expand**
  37. .. _class_VideoPlayer_paused:
  38. - :ref:`bool<class_bool>` **paused**
  39. .. _class_VideoPlayer_stream:
  40. - :ref:`VideoStream<class_videostream>` **stream**
  41. .. _class_VideoPlayer_stream_position:
  42. - :ref:`float<class_float>` **stream_position** - The current position of the stream, in seconds.
  43. .. _class_VideoPlayer_volume:
  44. - :ref:`float<class_float>` **volume** - The volume of the audio track as a linear value.
  45. .. _class_VideoPlayer_volume_db:
  46. - :ref:`float<class_float>` **volume_db**
  47. Description
  48. -----------
  49. This control has the ability to play video streams. The only format accepted is the OGV Theora, so any other format must be converted before using in a project.
  50. Member Function Description
  51. ---------------------------
  52. .. _class_VideoPlayer_get_stream_name:
  53. - :ref:`String<class_string>` **get_stream_name** **(** **)** const
  54. Get the name of the video stream.
  55. .. _class_VideoPlayer_get_video_texture:
  56. - :ref:`Texture<class_texture>` **get_video_texture** **(** **)**
  57. Get the current frame of the video as a :ref:`Texture<class_texture>`.
  58. .. _class_VideoPlayer_is_playing:
  59. - :ref:`bool<class_bool>` **is_playing** **(** **)** const
  60. Get whether or not the video is playing.
  61. .. _class_VideoPlayer_play:
  62. - void **play** **(** **)**
  63. Start the video playback.
  64. .. _class_VideoPlayer_stop:
  65. - void **stop** **(** **)**
  66. Stop the video playback.