$56 GRAYBYTE WORDPRESS FILE MANAGER $57

SERVER : premium201.web-hosting.com #1 SMP Wed Mar 26 12:08:09 UTC 2025
SERVER IP : 104.21.15.130 | ADMIN IP 216.73.217.88
OPTIONS : CRL = ON | WGT = ON | SDO = OFF | PKEX = OFF
DEACTIVATED : NONE

/home/bravetechrwanda/dantho.rw/wp-includes/js/dist/script-modules/block-library/playlist/

HOME
Current File : /home/bravetechrwanda/dantho.rw/wp-includes/js/dist/script-modules/block-library/playlist//view.js
// packages/block-library/build-module/playlist/view.mjs
import { store, getContext, getElement } from "@wordpress/interactivity";
store(
  "core/playlist",
  {
    state: {
      playlists: {},
      get currentTrack() {
        const { currentId, playlistId } = getContext();
        if (!currentId || !playlistId) {
          return {};
        }
        const playlist = this.playlists[playlistId];
        if (!playlist) {
          return {};
        }
        return playlist.tracks[currentId] || {};
      },
      get isCurrentTrack() {
        const { currentId, uniqueId } = getContext();
        return currentId === uniqueId;
      }
    },
    actions: {
      changeTrack() {
        const context = getContext();
        context.currentId = context.uniqueId;
        context.isPlaying = true;
      },
      isPlaying() {
        const context = getContext();
        context.isPlaying = true;
      },
      isPaused() {
        const context = getContext();
        context.isPlaying = false;
      },
      nextSong() {
        const context = getContext();
        const currentIndex = context.tracks.findIndex(
          (uniqueId) => uniqueId === context.currentId
        );
        const nextTrack = context.tracks[currentIndex + 1];
        if (nextTrack) {
          context.currentId = nextTrack;
          const { ref } = getElement();
          setTimeout(() => {
            ref.play();
          }, 1e3);
        }
      }
    },
    callbacks: {
      autoPlay() {
        const context = getContext();
        const { ref } = getElement();
        if (context.currentId && context.isPlaying) {
          ref.play();
        }
      }
    }
  },
  { lock: true }
);


Current_dir [ WRITEABLE ] Document_root [ NOT WRITEABLE ]


[ Back ]
NAME
SIZE
LAST TOUCH
USER
CAN-I?
FUNCTIONS
..
--
21 May 2026 3.20 PM
bravetechrwanda / bravetechrwanda
0755
view.js
1.658 KB
21 May 2026 3.20 PM
bravetechrwanda / bravetechrwanda
0644
view.min.asset.php
0.176 KB
21 May 2026 3.20 PM
bravetechrwanda / bravetechrwanda
0644
view.min.js
0.685 KB
21 May 2026 3.20 PM
bravetechrwanda / bravetechrwanda
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2026 CONTACT ME
Static GIF Static GIF