问题描述
我只想知道,如何在打开该页面之前以 html 格式预加载 html 文件或视频。因为我想要一个男人。就像他打开网站并单击一个按钮一样,会立即出现一个新页面并播放视频……我也想禁用视频控件……这可能吗?如果可能,该怎么做?
解决方法
这将允许在新页面上预加载和自动播放视频
/index.html
Sub GetValue()
Dim olMail As Outlook.MailItem
Dim Selection As Selection
Dim obj As Object
Set olMail = Application.ActiveExplorer().Selection(1)
Set Selection = ActiveExplorer.Selection
For Each obj In Selection
Set objMsg = Application.CreateItem(olMailItem)
Dim rxp13 As New RegExp
rxp13.Pattern = "(\d{11}(?=[-]))"
rxp13.Global = True
Dim m13 As Match,c13 As MatchCollection
Set c13 = rxp13.Execute(olMail.Body)
Dim item As String
For Each m13 In c13
item = m13.SubMatches(0)
Next
'......DISPLAY EMAIL ......
'--------------------------
With objMsg
.To = "mail@test.com"
.Subject = obj.Subject
.HTMLBody = _
"<HTML><BODY>" & _
"<div style='font-size:10pt;font-family:Verdana'>" & _
"<table style='font-size:10pt;font-family:Verdana'>" & _
"<tr><td><strong>ITEMS</strong></td></tr>" & _
"<tr>" & _
"<td>" & item & "</td>" & _
"</tr>" & _
"</table>" & _
"</div>" & _
"</BODY></HTML>"
.Display
End With
Set objMsg = Nothing
'----------------------------------------------------------------
Next
End Sub
/video.html
<a href="/video.html" target="_blank">Click to play</a>
或者如果您只想像模态一样在同一页面上打开视频,则需要 javascript 和 css
/index.html
<video width="320" height="240" autoplay muted preload="auto">
<source src="movie.mp4" type="video/mp4">
Your browser does not support the video tag.
</video>
Safari 和 chrome 浏览器会阻止视频自动播放,除非它被静音。