投影媒体查询:浏览器支持和解决方法?
我试图仅在页面投影到墙上时(通过投影仪,当有人进行演示时)将样式应用于页面。目前,我只能在 Opera 中以全屏模式获得此内容。
有没有办法让@mediaprojection
在其他浏览器中生效?另外,有没有办法让它只适用于投影,而不适用于投影的笔记本电脑?
如果没有,是否有任何可行的解决方法?我正在尝试用 css 创建幻灯片,但也提供了一个“演示者视图”,并在演示者的笔记本电脑上提供了额外的控件。
非常感谢任何周边地区的帮助。
I'm trying to get styles applied to a page only when the page is projected on the wall (by a projector, when someone is giving a presentation). As the moment, I can only get this in Opera in fullscreen mode.
Is there any way to get @media projection
to take affect in other browsers? Also, is there a way to make it only apply to the projection, and not the laptop its projecting from?
If not, are there any viable workarounds to this? I am trying to create a slideshow in css, but also offer a "presenter view" with extra controls on the laptop of the presenter.
Any help in any surrounding area is much appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
@mediaprojection
是一个抽象概念。实际上,投影
只能在具有自定义浏览器版本的特殊类型设备上“打开”。在连接投影仪作为外部显示器的台式机/笔记本电脑上,浏览器无法知道使用哪种附加显示器(如果有)进行查看。
您唯一的选择是设置
并使用类似的内容:
并使用样式:
@media projection
is an abstract concept. Practicallyprojection
can be 'on' only on devices of special kind with custom browser builds.On desktop/laptop with projector attached as an external monitor there is no way for the browser to know what kind of additional monitor is used (if any) for viewing.
The only option for you is to put
<button>"Fullscreen" mode</button>
and to use something like:And use styles:
如果投影仪的输出分辨率与笔记本电脑显示器不同,您可以使用 CSS 媒体查询来控制每张幻灯片内额外元素的显示,并为演示者提供注释。
例如,假设笔记本电脑的分辨率为 1024x768,投影屏幕为 1280x800,笔记位于类名为“notes”的元素内 - 您将执行如下操作:
仍然需要投影仪和笔记本电脑是不同的屏幕(比如使用两个显示器),但既然如此,它完全可以工作——我已经真正做到了这一点。
每当我进行演示时,我都会在全屏模式下使用 Opera;我还使用一个名为“Mira”的 Mac OS X 应用程序,它允许您配置 Apple Remote,以便将击键发送到应用程序。因此,将遥控器上的“前进”和“后退”键映射到 Opera 中的“向上翻页”和“向下翻页”,我可以使用遥控器逐步浏览幻灯片:-D
If the projector's output is a different resolution than your laptop monitor, you can use a CSS media query to control the display of an extra element inside each slide, with notes for the presenter.
For example, let's say the laptop is 1024x768, the projected screen is 1280x800, and the notes are inside an element with the class name "notes" -- you'd do something like this:
It would still require the projector and the laptop to be different screens (like using two monitors), but with that as a given, it totally works -- I've done this for real.
I use Opera in fullscreen mode whenever I give presentations; I also use a Mac OS X app called "Mira", which allows you to configure the Apple Remote so it sends keystrokes to applications. So mapping the "Fwd" and "Back" keys on the remote to "page-up" and "page-down" in Opera, I can use the remote to step-through the slides :-D