日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

视频格式在页面展示

發布時間:2024/3/13 编程问答 47 豆豆
生活随笔 收集整理的這篇文章主要介紹了 视频格式在页面展示 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

第一種:.mp4格式

<!DOCTYPE html> <html lang="en"> <head><meta charset="UTF-8"><title>video格式demo</title> </head> <body><!--視頻路徑:--><h1>video</h1><video src="http://clips.vorwaerts-gmbh.de/big_buck_bunny.mp4" controls="controls"></video><h1>embed</h1><embed src="http://clips.vorwaerts-gmbh.de/big_buck_bunny.mp4" width="800" height="510"/><h1>object</h1><object width="800" height="510"><param id="video_value" name="movie" value=""></param><param name="allowScriptAccess" value="always"></param><param name="wmode" value="transparent"></param><embed src="http://clips.vorwaerts-gmbh.de/big_buck_bunny.mp4" width="800" height="510" allowFullScreen="true" wmode="transparent" allowScriptAccess="always"></embed></object><h1>iframe</h1><iframe frameborder="0" src="http://clips.vorwaerts-gmbh.de/big_buck_bunny.mp4" allowfullscreen></iframe></body> </html>

第二種:各大門戶網站的分享通用代碼(注意插入網頁請求時,https與http兼容情況)

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>各大視頻網站通用代碼</title>
</head>
<body>
<h1>騰訊</h1>
<iframe frameborder="0" src="https://v.qq.com/txp/iframe/player.html?vid=d0031p73m0p" allowFullScreen="true" width="800" height="510"></iframe>
<h1>愛奇藝</h1>
<iframe src="http://open.iqiyi.com/developer/player_js/coopPlayerIndex.html?vid=9657dcdbaeab8a2147cdf0757ca247bd&tvId=3325765400&accessToken=2.f22860a2479ad60d8da7697274de9346&appKey=3955c3425820435e86d0f4cdfe56f5e7&appId=1368&height=100%&width=100%" frameborder="0" allowfullscreen="true" width="800" height="510"></iframe>
<h1>優酷</h1>
<iframe src='http://player.youku.com/embed/XNDIyMjQ5Njc4MA==' frameborder=0 'allowfullscreen' width="800" height="510"></iframe>
<h1>網易公開課</h1>
<object width="640" height="360"><param name="movie" value="//open.163.com/openplayer/-MBM8NF28C-MBM8NT807-http://open-image.nosdn.127.net/9c6ee8d9cd17487f8ce775de75b5d91b.jpg-openPlayer.swf?isUserAutoPlay=1"></param><param name="allowScriptAccess" value="always"></param><param name="wmode" value="transparent"></param><embed src="//open.163.com/openplayer/-MBM8NF28C-MBM8NT807-http://open-image.nosdn.127.net/9c6ee8d9cd17487f8ce775de75b5d91b.jpg-openPlayer.swf?isUserAutoPlay=1" type="application/x-shockwave-flash" width="800" height="510" allowFullScreen="true" wmode="transparent" allowScriptAccess="always"></embed></object>
</body>
</html>

問題報錯:參考:https://blog.csdn.net/w377120838/article/details/80590053

當https 連接中包含加載http資源時,瀏覽器會停止加載,瀏覽器console 會打印如下信息:

Mixed Content: The page at 'https://Xie.cn/' was loaded over HTTPS, but requested an insecure resource 'http://xm/m/vYby6nm?mobile=1'. This request has been blocked; the content must be served over HTTPS.
解決方案一:

在html文件的head標簽中添加<meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests"

當瀏覽器支持“upgrade-insecure-requests”屬性時,會自動將http鏈接替換為https

解決方案二:

將連接中的算有http連接更換為https

而對于移動端,<embed >標簽是不支持的

轉載于:https://www.cnblogs.com/ljangle/p/11194657.html

總結

以上是生活随笔為你收集整理的视频格式在页面展示的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。