CoreFiles by mySites.guru
view.min.js1 lines, 701 bytes, from wordpress-7.0.2.zip
Raw History Compare with 7.0.1
md5
7214426df7632bc019dfdf60b35924cf
sha1
fc41400b82523e3e19b7640e05d266d41a75fac8
sha256
cb8ce5877391c7a96af9a7ae794405bb933721e63178d06a99a7e91e2553d499
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 19 releases, WordPress 7.0-beta4 to 7.0.9. See them all, or every version of this file.