html - Youtube 视频在 iframe 标记中给出,但在 Safari 浏览器中不起作用
问题描述
<iframe width="100%" height="500" src="https://www.youtube.com/embed/alswD2tCc_Q?rel=0" frameborder="0" allowfullscreen=""></iframe>
大家好,
以上是我的代码。该视频可在除 Safari 之外的所有浏览器中运行。你们能帮我解决这个问题吗?
提前致谢。
解决方案
Safari 需要网络服务器支持“[Range][1]”请求标头才能播放您的媒体内容。
对于合法的“范围”请求响应,您的 webserve 需要返回状态代码“206”。
推荐阅读
- python - 将字符串附加到python中.txt文件的每一行?
- angular - 无法将 Angular 从版本 6 降级到 5
- mysql - MySql:以有效的方式求和订单(或太慢)
- windows - 使用 WinSCP get 命令下载两种类型的文件(*.bat 和 *.txt)
- php - php从多维数组购物车中删除特定项目
- php - 将数据导出到 Excel PHP 和 MySQL
- java - 如何在 JSystem 中获取场景开始的时间?
- java - 使用 ArrayList 进行堆放
- html - 如何在 HTML5 中制作特定单选按钮并在手动添加数据时自动选择指定
- sql - 添加excel目标时出现SSIS错误