我项目中的所有视频均位于某些书面内容下方。每当用户进入和退出全屏模式时,它都会返回到页面的顶部。我很困惑为什么会这样。但是此外,我一直在查看Video.js / video-js.scss / _fullscreen.scss中的所有代码,而且我似乎找不到任何将用户实际送回文档中特定div的方法
我通读了videojs文档和全屏api,找不到解决方案。
/**
* Toggle fullscreen video
*
* @extends Button
*/
var FullscreenToggle =
/*#__PURE__*/
function (_Button) {
_inheritsLoose(FullscreenToggle, _Button);
/**
* Creates an instance of this class.
*
* @param {Player} player
* The `Player` that this class should be attached to.
*
* @param {Object} [options]
* The key/value store of player options.
*/
function FullscreenToggle(player, options) {
var _this;
_this = _Button.call(this, player, options) || this;
_this.on(player, 'fullscreenchange', _this.handleFullscreenChange);
if (document[player.fsApi_.fullscreenEnabled] === false) {
_this.disable();
}
return _this;
}
<div class="row no-gutters gray-row howto" id="howto">
<div class="col-xl-12 page-section-title">
<h3>How to</h3>
<hr>
</div>
</div>
</div>