| 1211 | } |
| 1212 | |
| 1213 | void MediaPlayer::setFullScreenEnabled(bool enabled) |
| 1214 | { |
| 1215 | if (_fullScreenEnabled != enabled) |
| 1216 | { |
| 1217 | _fullScreenEnabled = enabled; |
| 1218 | |
| 1219 | auto pvd = reinterpret_cast<PrivateVideoDescriptor*>(_videoContext); |
| 1220 | const auto contentSize = enabled ? _director->getRenderView()->getDesignResolutionSize() : pvd->_originalViewSize; |
| 1221 | Widget::setContentSize(contentSize); |
| 1222 | |
| 1223 | sendEvent((int)EventType::FULLSCREEN_SWITCH); |
| 1224 | } |
| 1225 | } |
| 1226 | |
| 1227 | bool MediaPlayer::isFullScreenEnabled() const |
| 1228 | { |