微信h5中視頻播放全屏問題

ios的微信瀏覽器爲chrome內核

在video標籤添加屬性

webkit-playsinline="true" x-webkit-airplay="true" playsinline="true"、

安卓的爲x5內核

在video標籤添加屬性

x5-playsinline

切記 一定要將x5-video-player-type="h5"屬性去除,他會坑死你的。切記切記!

 若兩端全部支持,給出項目一個示例代碼

<video controls="controls" preload="auto" poster="" x5-video-player-fullscreen="true" webkit-playsinline="true" x-webkit-airplay="true" playsinline="true" x5-playsinline style="width: 300px;height:200px;">  

 <source src="" type="video/mp4" />

 </video>


其實騰訊服務裏面還有更多的屬性介紹,分享給大家哦:https://x5.tencent.com/tbs/guide/video.html

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章