CoreFiles by mySites.guru
view.min.js1 lines, 700 bytes, from wordpress-7.0-beta1.zip
Raw History Compare with 6.9-beta4
md5
2731a1481936f00a6cd9d6b0834290e7
sha1
a4f675bf19c05909877de3c874160b88149129e3
sha256
bffe35fb5cdca06098c3ff7293701269b6f5342c910073eb1da9ddccba7e2d53
import{store as a,getContext as e,getElement as s}from"@wordpress/interactivity";a("core/playlist",{state:{playlists:{},get currentTrack(){let{currentId:t,playlistId:n}=e();if(!t||!n)return{};let r=this.playlists[n];return r?r.tracks[t]||{}:{}},get isCurrentTrack(){let{currentId:t,uniqueId:n}=e();return t===n}},actions:{changeTrack(){let t=e();t.currentId=t.uniqueId,t.isPlaying=!0},isPlaying(){let t=e();t.isPlaying=!0},isPaused(){let t=e();t.isPlaying=!1},nextSong(){let t=e(),n=t.tracks.findIndex(c=>c===t.currentId),r=t.tracks[n+1];if(r){t.currentId=r;let{ref:c}=s();setTimeout(()=>{c.play()},1e3)}}},callbacks:{autoPlay(){let t=e(),{ref:n}=s();t.currentId&&t.isPlaying&&n.play()}}},{lock:!0});

The same content is in 3 releases, WordPress 7.0-beta1 to 7.0-beta3. See them all, or every version of this file.