浏览器-独立函数用于使用标准的全屏 API .
See:

Members

static readonly Cesium.Fullscreen.changeEventName : string

当全屏显示时, 点火的文件上的事件名称为 输入或退出。 此事件名称用于添加EventListener . 在您的事件处理器中,为了确定浏览器是否处于全屏模式, use Fullscreen#fullscreen.

static readonly Cesium.Fullscreen.element : object

目前为全屏的元素, 如果有的话 。 只需检查一下 浏览器是否处于全屏模式,使用 Fullscreen#fullscreen .

static readonly Cesium.Fullscreen.enabled : boolean

确定浏览器是否允许将一个元素制成全屏幕 . 例如,默认情况下,iframes不能全屏,除非包含的页面 添加一个"allowfulscreen"属性(或前缀等效).

static readonly Cesium.Fullscreen.errorEventName : string

全屏错误时点火的事件名称 发生。 此事件名称用于添加EventListener .

static readonly Cesium.Fullscreen.fullscreen : boolean

确定浏览器是否处于全屏模式.

Methods

static Cesium.Fullscreen.exitFullscreen()

同步退出全屏模式. 如果浏览器不是当前 在全屏中,或者如果全屏模式不被浏览器支持,则什么都不做.

static Cesium.Fullscreen.requestFullscreen(element, vrDevice)

同步请求浏览器在给定元素上输入全屏模式. 如果浏览器不支持全屏模式,则什么都不做.
Name Type Description
element object 将放入全屏模式的 HTML 元素 .
vrDevice object optional HMDVRDevice设备.
Example:
// Put the entire page into fullscreen.
Cesium.Fullscreen.requestFullscreen(document.body)

// Place only the Cesium canvas into fullscreen.
Cesium.Fullscreen.requestFullscreen(scene.canvas)

static Cesium.Fullscreen.supportsFullscreen()boolean

检测浏览器是否支持标准的全屏 API .
Returns:
如果浏览器支持标准的全屏 NT 0 ret NT 1 , -NT+0+false NT+1+否则.
Need help? The fastest way to get answers is from the community and team on the Cesium Forum.