diff --git a/cocos/ui/UIVideoPlayer.h b/cocos/ui/UIVideoPlayer.h index c6dd4b3b79..fa3627b61c 100644 --- a/cocos/ui/UIVideoPlayer.h +++ b/cocos/ui/UIVideoPlayer.h @@ -66,10 +66,10 @@ namespace experimental{ virtual void setVisible(bool visible) override; virtual void setKeepAspectRatioEnabled(bool enable); - virtual bool isKeepAspectRatioEnabled() { return _keepAspectRatioEnabled;} + virtual bool isKeepAspectRatioEnabled()const { return _keepAspectRatioEnabled;} virtual void setFullScreenEnabled(bool enabled); - virtual bool isFullScreenEnabled(); + virtual bool isFullScreenEnabled()const; virtual void addEventListener(const VideoPlayer::ccVideoPlayerCallback& callback); diff --git a/cocos/ui/UIVideoPlayerAndroid.cpp b/cocos/ui/UIVideoPlayerAndroid.cpp index ae0b7d50d7..2c8073c68c 100644 --- a/cocos/ui/UIVideoPlayerAndroid.cpp +++ b/cocos/ui/UIVideoPlayerAndroid.cpp @@ -242,7 +242,7 @@ void VideoPlayer::setFullScreenEnabled(bool enabled) } } -bool VideoPlayer::isFullScreenEnabled() +bool VideoPlayer::isFullScreenEnabled()const { return _fullScreenEnabled; } diff --git a/cocos/ui/UIVideoPlayerIOS.mm b/cocos/ui/UIVideoPlayerIOS.mm index 52ee49cb99..a38db66291 100644 --- a/cocos/ui/UIVideoPlayerIOS.mm +++ b/cocos/ui/UIVideoPlayerIOS.mm @@ -343,7 +343,7 @@ void VideoPlayer::draw(Renderer* renderer, const Mat4 &transform, bool transform #endif } -bool VideoPlayer::isFullScreenEnabled() +bool VideoPlayer::isFullScreenEnabled()const { return [((UIVideoViewWrapperIos*)_videoView) isFullScreenEnabled]; }