2019-05-02  325 views 评论

wordpress 默认的视频插入代码,小程序中无法播放的解决方法

 标签:

wordpress,默认自带<video>标签,在手机和PC 断,都能够正常播放,但是,小程序里面不能播放!

先看默认的代码(源文件中可以看到)

<video class="wp-video-shortcode" id="video-15-1" width="700" height="394" preload="metadata" controls="controls"><source type="video/mp4" src="https://www.mswins.cn/wp-content/uploads/2018/06/1525657806874091694.mp4?_=1" /><a href="https://www.mswins.cn/wp-content/uploads/2018/06/1525657806874091694.mp4">https://www.mswins.cn/wp-content/uploads/2018/06/1525657806874091694.mp4</a></video>

在后台编辑器中,
换成下面的,就可以播放:

<video id="10063" src="http://www5sichuanjiakao.oss-cn-shanghai.aliyuncs.com/vipvod/94e27cc562446e7eb802aea4e38809b1.mp4" controls="controls" width="95%" height="360px">您的浏览器不支持VIDEO 标签</video>

就是这么简单

解决办法

修改:wp-includes/media.php 2600 行左右

给我留言

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: