2014-07-10 22:10:03 +08:00
|
|
|
|
|
|
|
--------------------------------
|
|
|
|
-- @module VideoPlayer
|
|
|
|
-- @extend Widget
|
2014-07-17 15:46:20 +08:00
|
|
|
-- @parent_module ccexp
|
2014-07-10 22:10:03 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2015-03-31 12:01:57 +08:00
|
|
|
-- brief Get the local video filie name.<br>
|
|
|
|
-- return The video file name.
|
2014-07-10 22:10:03 +08:00
|
|
|
-- @function [parent=#VideoPlayer] getFileName
|
|
|
|
-- @param self
|
|
|
|
-- @return string#string ret (return value: string)
|
|
|
|
|
|
|
|
--------------------------------
|
2015-03-31 12:01:57 +08:00
|
|
|
-- brief Get the URL of remoting video source.<br>
|
|
|
|
-- return A remoting URL address.
|
2014-07-10 22:10:03 +08:00
|
|
|
-- @function [parent=#VideoPlayer] getURL
|
|
|
|
-- @param self
|
|
|
|
-- @return string#string ret (return value: string)
|
|
|
|
|
|
|
|
--------------------------------
|
2015-03-24 16:35:26 +08:00
|
|
|
-- Starts playback.
|
2014-07-10 22:10:03 +08:00
|
|
|
-- @function [parent=#VideoPlayer] play
|
|
|
|
-- @param self
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return experimental::ui::VideoPlayer#experimental::ui::VideoPlayer self (return value: cc.experimental::ui::VideoPlayer)
|
2014-07-10 22:10:03 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2015-03-24 16:35:26 +08:00
|
|
|
-- Pauses playback.
|
2014-07-10 22:10:03 +08:00
|
|
|
-- @function [parent=#VideoPlayer] pause
|
|
|
|
-- @param self
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return experimental::ui::VideoPlayer#experimental::ui::VideoPlayer self (return value: cc.experimental::ui::VideoPlayer)
|
2014-07-10 22:10:03 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2015-03-24 16:35:26 +08:00
|
|
|
-- Causes the video player to keep aspect ratio or no when displaying the video.<br>
|
|
|
|
-- param enable Specify true to keep aspect ratio or false to scale the video until <br>
|
|
|
|
-- both dimensions fit the visible bounds of the view exactly.
|
2014-07-10 22:10:03 +08:00
|
|
|
-- @function [parent=#VideoPlayer] setKeepAspectRatioEnabled
|
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #bool enable
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return experimental::ui::VideoPlayer#experimental::ui::VideoPlayer self (return value: cc.experimental::ui::VideoPlayer)
|
2014-07-10 22:10:03 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2015-03-24 16:35:26 +08:00
|
|
|
-- Resumes playback.
|
2014-07-10 22:10:03 +08:00
|
|
|
-- @function [parent=#VideoPlayer] resume
|
|
|
|
-- @param self
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return experimental::ui::VideoPlayer#experimental::ui::VideoPlayer self (return value: cc.experimental::ui::VideoPlayer)
|
2014-07-10 22:10:03 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2015-03-24 16:35:26 +08:00
|
|
|
-- Stops playback.
|
2014-07-10 22:10:03 +08:00
|
|
|
-- @function [parent=#VideoPlayer] stop
|
|
|
|
-- @param self
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return experimental::ui::VideoPlayer#experimental::ui::VideoPlayer self (return value: cc.experimental::ui::VideoPlayer)
|
2014-07-10 22:10:03 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2015-03-24 16:35:26 +08:00
|
|
|
-- Causes the video player to enter or exit full-screen mode.<br>
|
|
|
|
-- param fullscreen Specify true to enter full-screen mode or false to exit full-screen mode.
|
2014-07-10 22:10:03 +08:00
|
|
|
-- @function [parent=#VideoPlayer] setFullScreenEnabled
|
|
|
|
-- @param self
|
2015-03-24 16:35:26 +08:00
|
|
|
-- @param #bool fullscreen
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return experimental::ui::VideoPlayer#experimental::ui::VideoPlayer self (return value: cc.experimental::ui::VideoPlayer)
|
2014-07-10 22:10:03 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2015-03-24 16:35:26 +08:00
|
|
|
-- Sets a file path as a video source for VideoPlayer.
|
2014-07-10 22:10:03 +08:00
|
|
|
-- @function [parent=#VideoPlayer] setFileName
|
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #string videoPath
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return experimental::ui::VideoPlayer#experimental::ui::VideoPlayer self (return value: cc.experimental::ui::VideoPlayer)
|
2014-07-10 22:10:03 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2015-03-24 16:35:26 +08:00
|
|
|
-- Sets a URL as a video source for VideoPlayer.
|
2014-07-10 22:10:03 +08:00
|
|
|
-- @function [parent=#VideoPlayer] setURL
|
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #string _videoURL
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return experimental::ui::VideoPlayer#experimental::ui::VideoPlayer self (return value: cc.experimental::ui::VideoPlayer)
|
2014-07-10 22:10:03 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2015-03-24 16:35:26 +08:00
|
|
|
-- Indicates whether the video player keep aspect ratio when displaying the video.
|
2014-07-10 22:10:03 +08:00
|
|
|
-- @function [parent=#VideoPlayer] isKeepAspectRatioEnabled
|
|
|
|
-- @param self
|
|
|
|
-- @return bool#bool ret (return value: bool)
|
|
|
|
|
|
|
|
--------------------------------
|
2015-03-31 12:01:57 +08:00
|
|
|
-- brief A function which will be called when video is playing.<br>
|
|
|
|
-- param event @see VideoPlayer::EventType.
|
2014-07-10 22:10:03 +08:00
|
|
|
-- @function [parent=#VideoPlayer] onPlayEvent
|
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #int event
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return experimental::ui::VideoPlayer#experimental::ui::VideoPlayer self (return value: cc.experimental::ui::VideoPlayer)
|
2014-07-10 22:10:03 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2015-03-24 16:35:26 +08:00
|
|
|
-- Indicates whether the video player is in full-screen mode.<br>
|
|
|
|
-- return True if the video player is in full-screen mode, false otherwise.
|
2014-07-10 22:10:03 +08:00
|
|
|
-- @function [parent=#VideoPlayer] isFullScreenEnabled
|
|
|
|
-- @param self
|
|
|
|
-- @return bool#bool ret (return value: bool)
|
|
|
|
|
|
|
|
--------------------------------
|
2015-03-24 16:35:26 +08:00
|
|
|
-- Checks whether the VideoPlayer is playing.<br>
|
|
|
|
-- return True if currently playing, false otherwise.
|
2014-07-10 22:10:03 +08:00
|
|
|
-- @function [parent=#VideoPlayer] isPlaying
|
|
|
|
-- @param self
|
|
|
|
-- @return bool#bool ret (return value: bool)
|
|
|
|
|
|
|
|
--------------------------------
|
2015-03-24 16:35:26 +08:00
|
|
|
-- Seeks to specified time position.<br>
|
|
|
|
-- param sec The offset in seconds from the start to seek to.
|
2014-07-10 22:10:03 +08:00
|
|
|
-- @function [parent=#VideoPlayer] seekTo
|
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #float sec
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return experimental::ui::VideoPlayer#experimental::ui::VideoPlayer self (return value: cc.experimental::ui::VideoPlayer)
|
2014-07-10 22:10:03 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
--
|
2014-07-10 22:10:03 +08:00
|
|
|
-- @function [parent=#VideoPlayer] create
|
|
|
|
-- @param self
|
|
|
|
-- @return experimental::ui::VideoPlayer#experimental::ui::VideoPlayer ret (return value: cc.experimental::ui::VideoPlayer)
|
|
|
|
|
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
--
|
2014-07-10 22:10:03 +08:00
|
|
|
-- @function [parent=#VideoPlayer] draw
|
|
|
|
-- @param self
|
|
|
|
-- @param #cc.Renderer renderer
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #mat4_table transform
|
|
|
|
-- @param #unsigned int flags
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return experimental::ui::VideoPlayer#experimental::ui::VideoPlayer self (return value: cc.experimental::ui::VideoPlayer)
|
2014-07-10 22:10:03 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
--
|
2014-07-10 22:10:03 +08:00
|
|
|
-- @function [parent=#VideoPlayer] setVisible
|
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #bool visible
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return experimental::ui::VideoPlayer#experimental::ui::VideoPlayer self (return value: cc.experimental::ui::VideoPlayer)
|
2014-07-10 22:10:03 +08:00
|
|
|
|
|
|
|
return nil
|