前言:Media Source API是HTML5时代的流媒体技术!它将缓存管理从媒体元素中独立出来,灵活、方便的管理媒体流缓存:媒体流可多源化、可自定义加解密流、列表(分块)播放更是不再话下。
[先写个开头]
YOUTUBE的video遍历属性(剔除常见):
Xe null
Qm false
getCurrentTime (){return this.currentTime||0}
pauseVideo (){this.pause()}
setVolume (a,b){this.volume=a/100;this.muted=b}
mute (){this.muted=!0}
unMute (){this.muted=!1}
Bv (){this.hasAttribute("controls")&&this.setAttribute("controls","true")}
Dv (){this.Qm&&!this.muted&&(this.muted=!0)}
videoHeight 720
videoWidth 1280
poster
webkitDecodedFrameCount 75424
webkitDroppedFrameCount 107
webkitSupportsFullscreen true
webkitDisplayingFullscreen false
webkitEnterFullscreen webkitEnterFullscreen() { [native code] }
webkitExitFullscreen webkitExitFullscreen() { [native code] }
webkitEnterFullScreen webkitEnterFullScreen() { [native code] }
webkitExitFullScreen webkitExitFullScreen() { [native code] }
crossOrigin use-credentials
networkState 2
preload auto
buffered TimeRanges {}
readyState 4
seeking false
currentTime 290.021
duration 444.861
paused false
defaultPlaybackRate 1
playbackRate 1
played TimeRanges {}
seekable TimeRanges {}
ended false
autoplay false
loop false
controls false
volume 1
muted false
defaultMuted false
textTracks TextTrackList {}
webkitAudioDecodedByteCount 40064159
webkitVideoDecodedByteCount 469163143
load load() { [native code] }
play play() { [native code] }
pause pause() { [native code] }
addTextTrack addTextTrack() { [native code] }
canPlayType canPlayType() { [native code] }
NETWORK_EMPTY 0
NETWORK_IDLE 1
NETWORK_LOADING 2
NETWORK_NO_SOURCE 3
HAVE_NOTHING 0
HAVE_MetaDATA 1
HAVE_CURRENT_DATA 2
HAVE_FUTURE_DATA 3
HAVE_ENOUGH_DATA 4
onwebkitkeyadded null
onwebkitkeyerror null
onwebkitkeymessage null
onwebkitneedkey null
mediaKeys null
onencrypted null
webkitGenerateKeyRequest webkitGenerateKeyRequest() { [native code] }
webkitAddKey webkitAddKey() { [native code] }
webkitCancelKeyRequest webkitCancelKeyRequest() { [native code] }
setMediaKeys setMediaKeys() { [native code] }
title
lang
translate true
dir
dataset DOMStringMap {}
hidden false
tabIndex -1
accessKey
draggable false
spellcheck true
contentEditable inherit
isContentEditable false
webkitdropzone
onabort null
onblur null
oncancel null
oncanplay null
oncanplaythrough null
onchange null
onclick null
onclose null
oncontextmenu null
oncuechange null
ondurationchange null
onemptied null
onended null
onerror null
onfocus null
oninput null
oninvalid null
onkeydown null
onkeypress null
onkeyup null
onload null
onloadeddata null
onloadedMetadata null
onloadstart null
onpause null
onplay null
onplaying null
onprogress null
onratechange null
onreset null
onresize null
onscroll null
onseeked null
onseeking null
onselect null
onshow null
onstalled null
onsubmit null
onsuspend null
ontimeupdate null
ontoggle null
onvolumechange null
onwaiting null
onautocomplete null
onautocompleteerror null
shadowRoot null
onwebkitfullscreenchange null
onwebkitfullscreenerror null
firstElementChild null
lastElementChild null
childElementCount 0
closest closest() { [native code] }
matches matches() { [native code] }
createShadowRoot createShadowRoot() { [native code] }
getDestinationInsertionPoints getDestinationInsertionPoints() { [native code] }
requestPointerLock requestPointerLock() { [native code] }
getClientRects getClientRects() { [native code] }
getBoundingClientRect getBoundingClientRect() { [native code] }
scrollIntoView scrollIntoView() { [native code] }
insertAdjacentElement insertAdjacentElement() { [native code] }
insertAdjacentText insertAdjacentText() { [native code] }
scrollIntoViewIfNeeded scrollIntoViewIfNeeded() { [native code] }
webkitMatchesSelector webkitMatchesSelector() { [native code] }
animate animate() { [native code] }
webkitRequestFullScreen webkitRequestFullScreen() { [native code] }
webkitRequestFullscreen webkitRequestFullscreen() { [native code] }
hasChildNodes hasChildNodes() { [native code] }
normalize normalize() { [native code] }
isEqualNode isEqualNode() { [native code] }
compareDocumentPosition compareDocumentPosition() { [native code] }
contains contains() { [native code] }
lookupPrefix lookupPrefix() { [native code] }
lookupNamespaceURI lookupNamespaceURI() { [native code] }
isDefaultNamespace isDefaultNamespace() { [native code] }
isSameNode isSameNode() { [native code] }