将Vimeo的视频集成到WPF中 [英] Integration of Vimeo's video in WPF

查看:110
本文介绍了将Vimeo的视频集成到WPF中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们在Vimeo上有一个帐户,我们在其中显示一些特定观众的视频.他们是私人用户,我们自定义ui的播放器以禁用共享的选项.观众唯一能做的就是播放视频.

We have an account on Vimeo where we display some videos for specific viewers. They are privates and we customize the ui's player to disable the share's options. The only thing that the viewer can do it's play the video.

此外,我们仅定义了一个可以集成视频的特定域.因此,我们在此域上有一些网页,我们在这些网页上集成了视频.

Moreover, we defined a only one specific domain where the videos can be integrated. So we have some webpages on this domain where we integrate the videos.

在Firefox,Chrome或Edge之类的网络浏览器中,如果我们访问此域托管的网页,则显示和播放该网页都没有问题.但是,如果我们使用WPF网络浏览器,则可以将网页与视频一起显示,但是Vimeo的播放器会显示一条消息,因为我们定义了隐私设置,因此我们可以阅读视频.

In a webbrowser like Firefox, Chrome or Edge, if we go on a webpage hosted on this domain, there are no issue to display and play it. But if we use the WPF webbrowser, the webpage can be display with the video, but the Vimeo's player show a message that we can read the video because of privacy settings that we defined.

为什么在诸如Firefox或其他浏览器中,我没有任何问题或消息可以播放域中网页上的视频(我们想要的),而在WPF网络浏览器中,Vimeo的播放器不允许我播放在我的域中的同一网页上播放视频?

Why in a browser like Firefox or other, I don't have any issue or message to play the video from a webpage on my domain (what we want) and in the WPF webbrowser, the Vimeo's player don't allow me to play the video on the same webpage in my domain ?

感谢您的帮助.

推荐答案

WPF WebBrowser控件使用嵌入在其窗口中的Internet Explorer ActiveX控件.因此,它具有与Internet Explorer安装版本相同的限制.默认情况下,它将使用IE 7兼容性,因此更现代的JavaScript可能无法正常工作.

The WPF WebBrowser control uses the Internet Explorer ActiveX control embedded within its window. So, it has the same limitations as the installed version of Internet Explorer. By default, it will be using IE 7 compatibility so more modern JavaScript may not work quite right.

您可以通过在HTML中使用固定的DOCTYPE来强制控件使用更现代的渲染引擎(但显然,您不控制Vimeo的HTML),也可以通过设置在计算机上启动可执行文件来强制该控件使用Microsoft这篇文章中所述的注册表项:浏览器仿真

You can force the control to use a more modern rendering engine either by using a fixed DOCTYPE in the HTML (but obviously, you don't control Vimeo's HTML) or for any launch of your executable on the machine by setting a registry key as described in this Microsoft article: Browser Emulation

您将需要为.exe名称添加一个条目.例如,如果您的应用程序是myviewer.exe,则将获得IE 11呈现效果.

You will need to add an entry for your .exe name. For example, if your application is myviewer.exe, it would be something like this to get IE 11 rendering.

HKEY_CURRENT_USER
   SOFTWARE
      Microsoft
         Internet Explorer
            Main
               FeatureControl
                  FEATURE_BROWSER_EMULATION
                     myviewer.exe = (DWORD) 00011000

这篇关于将Vimeo的视频集成到WPF中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆