video自动全屏播放 关于Screen.lockOrientation() https://developer.mozilla.org/en-US/docs/Web/API/Screen/lockOrientation 这个是实验性的功能,只有在全屏模式下才有效果,比如我的mi4上没开全屏模式就提示: Uncaught (in promise) DOMException: lockOrientation() is not available on this device.
最近在研究如何将视频全屏播放,一开始思路A:弹窗将MediaElement对象add到一个新的全屏窗体,报错 指定的元素已经是另一个元素的逻辑子元素.请先将其断开连接. 后续转换思路B:将本窗体其他控件隐藏掉,然后窗体最大化,去掉边框,然后把MediaElement设置成屏幕的宽高. 点击[播放],加载视频 using System; using System.Collections.Generic; using System.Linq; using System.Text; using Sys