VideoPlayer.xml 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <class name="VideoPlayer" inherits="Control" category="Core" version="3.0.alpha.custom_build">
  3. <brief_description>
  4. Control to play video files.
  5. </brief_description>
  6. <description>
  7. 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.
  8. </description>
  9. <tutorials>
  10. </tutorials>
  11. <demos>
  12. </demos>
  13. <methods>
  14. <method name="get_audio_track" qualifiers="const">
  15. <return type="int">
  16. </return>
  17. <description>
  18. Get the selected audio track (for multitrack videos).
  19. </description>
  20. </method>
  21. <method name="get_buffering_msec" qualifiers="const">
  22. <return type="int">
  23. </return>
  24. <description>
  25. Get the amount of milliseconds to store in buffer while playing.
  26. </description>
  27. </method>
  28. <method name="get_stream" qualifiers="const">
  29. <return type="VideoStream">
  30. </return>
  31. <description>
  32. Get the video stream.
  33. </description>
  34. </method>
  35. <method name="get_stream_name" qualifiers="const">
  36. <return type="String">
  37. </return>
  38. <description>
  39. Get the name of the video stream.
  40. </description>
  41. </method>
  42. <method name="get_stream_position" qualifiers="const">
  43. <return type="float">
  44. </return>
  45. <description>
  46. Get the current position of the stream, in seconds.
  47. </description>
  48. </method>
  49. <method name="get_video_texture">
  50. <return type="Texture">
  51. </return>
  52. <description>
  53. Get the current frame of the video as a [Texture].
  54. </description>
  55. </method>
  56. <method name="get_volume" qualifiers="const">
  57. <return type="float">
  58. </return>
  59. <description>
  60. Get the volume of the audio track as a linear value.
  61. </description>
  62. </method>
  63. <method name="get_volume_db" qualifiers="const">
  64. <return type="float">
  65. </return>
  66. <description>
  67. Get the volume of the audio track in decibels.
  68. </description>
  69. </method>
  70. <method name="has_autoplay" qualifiers="const">
  71. <return type="bool">
  72. </return>
  73. <description>
  74. Get whether or not the video is set as autoplay.
  75. </description>
  76. </method>
  77. <method name="has_expand" qualifiers="const">
  78. <return type="bool">
  79. </return>
  80. <description>
  81. Get whether or not the expand property is set.
  82. </description>
  83. </method>
  84. <method name="is_paused" qualifiers="const">
  85. <return type="bool">
  86. </return>
  87. <description>
  88. Get whether or not the video is paused.
  89. </description>
  90. </method>
  91. <method name="is_playing" qualifiers="const">
  92. <return type="bool">
  93. </return>
  94. <description>
  95. Get whether or not the video is playing.
  96. </description>
  97. </method>
  98. <method name="play">
  99. <return type="void">
  100. </return>
  101. <description>
  102. Start the video playback.
  103. </description>
  104. </method>
  105. <method name="set_audio_track">
  106. <return type="void">
  107. </return>
  108. <argument index="0" name="track" type="int">
  109. </argument>
  110. <description>
  111. Set the audio track (for multitrack videos).
  112. </description>
  113. </method>
  114. <method name="set_autoplay">
  115. <return type="void">
  116. </return>
  117. <argument index="0" name="enabled" type="bool">
  118. </argument>
  119. <description>
  120. Set whether this node should start playing automatically.
  121. </description>
  122. </method>
  123. <method name="set_buffering_msec">
  124. <return type="void">
  125. </return>
  126. <argument index="0" name="msec" type="int">
  127. </argument>
  128. <description>
  129. Set the amount of milliseconds to buffer during playback.
  130. </description>
  131. </method>
  132. <method name="set_expand">
  133. <return type="void">
  134. </return>
  135. <argument index="0" name="enable" type="bool">
  136. </argument>
  137. <description>
  138. Set the expand property. If enabled, the video will grow or shrink to fit the player size, otherwise it will play at the stream resolution.
  139. </description>
  140. </method>
  141. <method name="set_paused">
  142. <return type="void">
  143. </return>
  144. <argument index="0" name="paused" type="bool">
  145. </argument>
  146. <description>
  147. Set whether the video should pause the playback.
  148. </description>
  149. </method>
  150. <method name="set_stream">
  151. <return type="void">
  152. </return>
  153. <argument index="0" name="stream" type="VideoStream">
  154. </argument>
  155. <description>
  156. Set the video stream for this player.
  157. </description>
  158. </method>
  159. <method name="set_stream_position">
  160. <return type="void">
  161. </return>
  162. <argument index="0" name="position" type="float">
  163. </argument>
  164. <description>
  165. Set the current position of the stream, in seconds.
  166. </description>
  167. </method>
  168. <method name="set_volume">
  169. <return type="void">
  170. </return>
  171. <argument index="0" name="volume" type="float">
  172. </argument>
  173. <description>
  174. Set the audio volume as a linear value.
  175. </description>
  176. </method>
  177. <method name="set_volume_db">
  178. <return type="void">
  179. </return>
  180. <argument index="0" name="db" type="float">
  181. </argument>
  182. <description>
  183. Set the audio volume in decibels.
  184. </description>
  185. </method>
  186. <method name="stop">
  187. <return type="void">
  188. </return>
  189. <description>
  190. Stop the video playback.
  191. </description>
  192. </method>
  193. </methods>
  194. <members>
  195. <member name="audio_track" type="int" setter="set_audio_track" getter="get_audio_track">
  196. </member>
  197. <member name="autoplay" type="bool" setter="set_autoplay" getter="has_autoplay">
  198. </member>
  199. <member name="expand" type="bool" setter="set_expand" getter="has_expand">
  200. </member>
  201. <member name="paused" type="bool" setter="set_paused" getter="is_paused">
  202. </member>
  203. <member name="stream" type="VideoStream" setter="set_stream" getter="get_stream">
  204. </member>
  205. <member name="volume_db" type="float" setter="set_volume_db" getter="get_volume_db">
  206. </member>
  207. </members>
  208. <constants>
  209. </constants>
  210. </class>