W3Cschool
恭喜您成為首批注冊(cè)用戶
獲得88經(jīng)驗(yàn)值獎(jiǎng)勵(lì)
視頻組件。
屬性名 | 類型 | 默認(rèn)值 | 說明 | 最低版本 |
---|---|---|---|---|
src | String | 要播放的視頻資源地址 | 1.0.0 | |
autoplay | Boolean | false | 是否自動(dòng)播放 | 1.0.0 |
poster | String | 封面圖地址,網(wǎng)絡(luò)地址 | 1.0.0 | |
bindplay | String | play事件的handler | 1.0.0 | |
bindpause | String | pause事件的handler | 1.0.0 | |
bindended | String | ended事件的handler | 1.0.0 | |
binderror | String | error事件的handler | 1.0.0 | |
bindtimeupdate | String | timeupdate事件的handler | 1.18.0 | |
bindfullscreenchange | String | fullscreenchange事件的handler | 1.18.0 |
WARNING
video不支持在scroll-view、swiper組件中使用,也不支持在有滾動(dòng)條的容器中使用,不支持fixed
<video src="http://sf1-ttcdn-tos.pstatp.com/obj/ttfe/test/test-upload.mp4" rel="external nofollow"
autoplay
bindplay="play"
bindpause="pause"
bindended="ended"
bindtimeupdate="timeupdate"
bindfullscreenchange="fullscreenchange"
/>
Page({
play: function (e) {
tt.showToast({title: 'play'})
},
pause: function (e) {
tt.showToast({title: 'pause'})
},
ended: function (e) {
tt.showToast({title: 'ended'})
},
timeupdate: function (e) {
console.log(e)
},
fullscreenchange: function (e) {
console.log(e)
},
})
相關(guān)api: tt.createVideoContext
Copyright©2021 w3cschool編程獅|閩ICP備15016281號(hào)-3|閩公網(wǎng)安備35020302033924號(hào)
違法和不良信息舉報(bào)電話:173-0602-2364|舉報(bào)郵箱:jubao@eeedong.com
掃描二維碼
下載編程獅App
編程獅公眾號(hào)
聯(lián)系方式:
更多建議: