记一个embed嵌入flash、mp4

2019-07-1011:27:01来源:练涛 评论 984 views

flash

首先说明,嵌入flash有个不好的地方,出chrome外的浏览器,嵌入flash会有广告!所以,谨慎使用。

<embed src="https://imgcache.qq.com/tencentvideo_v1/playerv3/TPout.swf?max_age=86400&v=20161117&vid=k0530mizher&auto=0"
            allowfullscreen="true"
            quality="high"
            width="480" height="400"
            align="middle"
            allowscriptaccess="always"
            type="application/x-shockwave-flash">

src是flash地址
type可以设定MIME类型,什么是MIME类型?
allowfullscreen="true"设置是否可以全屏操作

MP4

<embed src="http://ph35djdp3.bkt.clouddn.com/lonely.mp4"
            width="480px" height="400"
            align="middle"
            type="video/mp4">

只需修改type为"video/mp4" 然后,src修改为.mp4视频即可。
如果,type设定为type="video/mp4" 它会有自动播放属性:autostart="true" ,而且,无法禁止查了很多资料就是禁不了,另外mp4 的播放没有全屏属性的定义~ 意味着全屏操作,你需要另找方法~

发表评论

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