Skip to content

Instantly share code, notes, and snippets.

@PechenkiUA
Created Dec 29, 2022
Embed
What would you like to do?
Youtube iframe contentWindow.postMessage command
document.querySelector('iframe').contentWindow.postMessage('{"event":"command","func":"pauseVideo","args":""}', '*');
cueVideoById
loadVideoById
cueVideoByUrl
loadVideoByUrl
playVideo
pauseVideo
stopVideo
clearVideo
getVideoBytesLoaded
getVideoBytesTotal
getVideoLoadedFraction
getVideoStartBytes
cuePlaylist
loadPlaylist
nextVideo
previousVideo
playVideoAt
setShuffle
setLoop
getPlaylist
getPlaylistIndex
getPlaylistId
loadModule
unloadModule
setOption
getOption
getOptions
mute
unMute
isMuted
setVolume
getVolume
seekTo
getPlayerMode
getPlayerState
getPlaybackRate
setPlaybackRate
getAvailablePlaybackRates
getPlaybackQuality
setPlaybackQuality
getAvailableQualityLevels
getCurrentTime
getDuration
addEventListener
removeEventListener
getDebugText
getVideoData
addCueRange
removeCueRange
setSize
getApiInterface
destroy
showVideoInfo
hideVideoInfo
isVideoInfoVisible
getSphericalProperties
setSphericalProperties
getVideoEmbedCode
getVideoUrl
getMediaReferenceTime
getSize
logImaAdEvent
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment