- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我找到了一个代码,我将其转换为 UDF 以检查 wistia 的 url 是否有效..
Sub Test()
MsgBox CheckValidURL("https://fast.wistia.net/embed/iframe/vud7ff4i6w")
End Sub
Function CheckValidURL(sURL As String) As Boolean
Dim oXMLHTTP As Object
Dim sResponseText As String
Dim aScriptParts As Variant
Set oXMLHTTP = CreateObject("MSXML2.XMLHTTP")
oXMLHTTP.Open "GET", sURL, False
oXMLHTTP.Send
sResponseText = oXMLHTTP.responseText
aScriptParts = Split(sResponseText, "<script", , vbTextCompare)
If UBound(aScriptParts) > 0 Then CheckValidURL = True
End Function
最佳答案
您可以通过在 sub 中创建 xhr 对象并传递给函数来提高效率,然后只查看响应头 link
区分
Option Explicit
Public Sub Test()
Dim urls(), i As Long, xhr As Object
Set xhr = CreateObject("MSXML2.XMLHTTP")
urls = Array("https://fast.wistia.net/embed/iframe/vud7ff4i6wyh", "https://fast.wistia.net/embed/iframe/vud7ff4i6w")
For i = LBound(urls) To UBound(urls)
MsgBox CheckValidURL(urls(i), xhr)
Next
End Sub
Public Function CheckValidURL(ByVal url As String, ByVal xhr As Object) As Boolean
With xhr
.Open "GET", url, False
.send
CheckValidURL = Not .getResponseHeader("link") = vbNullString
End With
End Function
Public Sub Test()
Dim urls(), i As Long, html As HTMLDocument, xhr As Object
Set xhr = CreateObject("MSXML2.XMLHTTP"): Set html = New HTMLDocument
urls = Array("https://fast.wistia.net/embed/iframe/vud7ff4i6wyh", "https://fast.wistia.net/embed/iframe/vud7ff4i6w")
For i = LBound(urls) To UBound(urls)
MsgBox CheckValidURL(urls(i), xhr, html)
Next
End Sub
Public Function CheckValidURL(ByVal sURL As String, ByVal xhr As Object, ByVal html As HTMLDocument) As Boolean
With xhr
.Open "GET", sURL, False
.send
html.body.innerHTML = .responseText
End With
CheckValidURL = html.querySelectorAll("#wistia_video").Length > 0
End Function
Option Explicit
Public Sub Test()
Dim urls(), i As Long, html As HTMLDocument, xhr As Object
Set xhr = CreateObject("MSXML2.XMLHTTP")
urls = Array("https://fast.wistia.net/embed/iframe/vud7ff4i6wyh", "https://fast.wistia.net/embed/iframe/vud7ff4i6w")
For i = LBound(urls) To UBound(urls)
MsgBox CheckValidURL(urls(i), xhr)
Next
End Sub
Public Function CheckValidURL(ByVal sURL As String, ByVal xhr As Object) As Boolean
With xhr
.Open "GET", sURL, False
.send
CheckValidURL = InStr(.responseText, "html") > 0
End With
End Function
Option Explicit
Public Sub Test()
Dim urls(), i As Long, html As HTMLDocument, xhr As Object
Set xhr = CreateObject("MSXML2.XMLHTTP")
urls = Array("https://fast.wistia.net/embed/iframe/vud7ff4i6wyh", "https://fast.wistia.net/embed/iframe/vud7ff4i6w")
For i = LBound(urls) To UBound(urls)
MsgBox CheckValidURL(urls(i), xhr)
Next
End Sub
Public Function CheckValidURL(ByVal sURL As String, ByVal xhr As Object) As Boolean
With xhr
.Open "GET", sURL, False
.send
CheckValidURL = UBound(Split(.responseText, "<script", , vbTextCompare)) > 0
End With
End Function
关于excel - 检查 Wistia 的有效 URL,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55972794/
在我们的主页上,我们有一个 Wistia 嵌入内容,它会在模式中打开,并在用户单击文本链接时播放。我想创建一个特殊的 URL,我可以将人们发送到该 URL,该 URL 将自动打开模式但不会开始播放。
我无法理解他们的 API。 首先,不确定为什么他们没有坚持使用 iframe 嵌入方法(和 api 外观)来保持一致性,就像 youtube 和 vimeo 多年来一直在做的那样。 所以经过大量的挖掘
如果我在一个页面上嵌入了两个 wistia 视频,当我点击另一个视频的播放时,是否有办法停止/暂停当前视频的播放? 这个想法是我有一个视频播放(wistia embed)作为背景,没有声音或控件。当我
已关闭。此问题需要 debugging details 。目前不接受答案。 编辑问题以包含 desired behavior, a specific problem or error, and the
我找到了一个代码,我将其转换为 UDF 以检查 wistia 的 url 是否有效.. Sub Test() MsgBox CheckValidURL("https://fast.wistia.net
我正在使用 Wistia 的 Turnstile 来捕获视频末尾的电子邮件。问题是我想在用户单击提交后重定向到另一个页面。该消息将请求检查电子邮件以确认双重选择加入。 我尝试使用 2 种嵌入类型,但没
有人可以告诉我是否可以将vistia嵌入 native iOS视频播放器中?我们正在寻找在 YouTube 上托管视频的替代选择,并且听说了有关 vistia 的一些好消息。目前,我们的应用程序直接在
我的 WordPress 网站上有一个页面,上面有很多视频,我正在为我的视频使用 Wistia。使用嵌入代码,它似乎为页面上的每个视频加载一次 ev-1 脚本。这是很多..!我想有更好的方法来嵌入视频
这是我的代码, wistiaEmbed = Wistia.embed("bqur1fvyag", { plugin: { "socialbar-v1": {
我正在使用带有播放列表的 Wistia 播放器,我想弄清楚如何让视频播放器响应?我想让它根据屏幕尺寸适本地重新调整大小。如图所示 http://wistia.github.io/demobin/vid
我正在使用 Wistia API,并且需要一个链接来切换 Wistia 视频的播放和暂停。我完全没有问题让视频独立播放或暂停,但是当我在元素上切换类时,它似乎不再起作用。我究竟做错了什么?有什么想法吗
这个问题在这里已经有了答案: Only load div iframe onclick (3 个答案) 关闭 5 年前。 我的网站有很多嵌入在 iframe 中的 Wistia 视频,每当我第一次加
我正在尝试从 wistia 加载内联视频播放器,文档说使用此代码: .jsonp" async> videoFoam=true" style="height:100%;width:100%">&nbs
Wistia 视频的按钮并非来自原始嵌入代码,因为它必须进行自定义。回调函数会是什么样子?我可以在 API 嵌入代码和下面的 iframe 之间进行选择。我希望能够在点击自定义按钮时使用 jQuery
关闭。这个问题需要更多focused .它目前不接受答案。 想改进这个问题吗? 更新问题,使其只关注一个问题 editing this post . 关闭 8 年前。 Improve this qu
所以我在脑海中使用脚本标签调用 wistia 脚本,如下所示: 但是,当我查看 Chrome 上的网络选项卡时,我注意到 Wistia 中的 E-v1.js 脚本被加载了两次,这相当重要,因为它是一
我有一个带有 jQuery 文件上传的演示页面,目前允许通过 PHP 将视频文件上传到虚拟主机。 代码: 我需要这个演示才能完全通过他们的 API 而不是上传目录将视频文件上传到我的 Wisti
我有一个默认隐藏的 wistia 视频和一个显示视频的自定义播放按钮。单击该按钮时,我不仅希望视频出现并开始播放,而且希望它直接进入全屏模式。查看他们的 JavaScript API,我没有看到将其置
我有一个适用于 iOS 的 Phonegap 应用程序,它允许将 Wisita 视频嵌入到 iFrame 中。 当我尝试在移动 iOS 设备上观看这些视频时,这些视频从未出现(就好像 iFrame 中
我正在尝试向 Wistia 托管的视频添加播放/暂停按钮。我大部分时间都在使用它,但是当我添加多个视频时,它并不针对当前视频。相反,当我点击第二个视频时,会播放第一个视频。 下面是HTML:
我是一名优秀的程序员,十分优秀!