foobar2000

WebView

By: pqyt

Version: 0.2.0.0, released on 2024-12-07 (archived)

Change log:

  • New: Builds with foobar2000 SDK 2024-08-07.
  • New: Updated WebView2 component to 1.0.2849.39.
  • New: Templates can contain iframes. Take a look at the included Default-FrameTemplate.html example.
  • New:
    • Methods
      • readAllText(filePath, codePage): Reads a file and returns it as a string. If codePage is 0 the file is assumed to be UTF-8 encoded.
      • readImage(filePath): Reads an image file and returns it as a Base64 string. (alpha2)
      • readDirectory(directoryPath, searchPattern): Reads a directory and returns the matching items as a JSON string. (alpha3)
      • getPlaylistName(playlistIndex): Gets the name of a playlist. (alpha2)
      • setPlaylistName(playlistIndex, name): Sets the name of a playlist. (alpha2)
      • findPlaylist(name): Returns the index of the playlist with the specified name. (alpha2)
      • getPlaylistItemCount(index): Gets the number of items in a platlist. (alpha2)
      • getFocusedPlaylistItem(playlistIndex): Gets the index of the focused item in a playlist. (alpha2)
      • setFocusedPlaylistItem(playlistIndex, name): Sets the index of the focused item in a playlist. (alpha2)
      • ensurePlaylistItemVisible(playlistIndex, itemIndex): Ensures the specified item of a playlist is visible. (alpha2)
      • isPlaylistItemSelected(playlistIndex, itemIndex): Returns true if the specified item of a playlist is selected. (alpha3)
      • executePlaylistDefaultAction(playlistIndex, itemIndex): Executes the default action on the specified item of a playlist. (alpha2)
      • createPlaylist(playlistIndex, name): Creates a new playlist with the specified name and inserts it after the specified playlist. (alpha2)
      • addPath(playlistIndex, itemIndex, filePath, selectAddedItem): Adds an item to the specified playlist after the specified item using a file path and optionally selects it. (alpha3)
      • duplicatePlaylist(playlistIndex, name): Duplicates the specified playlist and sets its name. (alpha2)
      • getPlaylistItems(playlistIndex): Returns the items of the specified playlist as a JSON string. (alpha3)
      • selectPlaylistItem(playlistIndex, itemIndex): Selects the specified item in a playlist. (alpha3)
      • deselectPlaylistItem(playlistIndex, itemIndex): Deselects the specified item in the specified playlist. (alpha3)
      • getSelectedPlaylistItems(playlistIndex): Returns the selected items of the specified playlist as a JSON string. (alpha3)
      • clearPlaylistSelection(playlistIndex): Clears the selected items in the specified playlist. (alpha2)
      • removeSelectedPlaylistItems(playlistIndex): Removes the selected items from the specfied playlist. (alpha3)
      • removeUnselectedPlaylistItems(playlistIndex): Removes the unselected items from the specfied playlist. (alpha3)
      • removePlaylistItem(playlistIndex, itemIndex): Removes the specified item from the specified playlist. (alpha3)
      • clearPlaylist(playlistIndex): Removes all items from the specified playlist. (alpha2)
      • deletePlaylist(playlistIndex): Deletes the specified playlist. (alpha3)
      • createAutoPlaylist(playlistIndex, name, query, sort, flags): Creates an auto playlist. Possible values for flags are 0 = default, 1 = Keep sorted). (alpha2)
      • isAutoPlaylist(playlistIndex): Returns true if the specified playlist is an auto playlist. (alpha2)
    • Properties
      • playlistCount: Returns the number of playlists. (alpha2)
      • activePlaylist: Gets or sets index of the active playlist. (alpha2)
      • playingPlaylist: Gets or sets index of the playing playlist. (alpha2)
      • isAutoPlaylist: Returns true if the specified playlist is an auto playlist. (alpha2)
      • playbackOrder: Gets or sets the playback order (0 = default, 1 = repeat playlist, 2 = repeat track, 3 = random, 4 = shuffle tracks, 5 = shuffle albums, 6 = shuffle folders). (alpha2)
    • Callbacks
      • onPlaylistItemsAdded(playlistIndex, startindex, locations): Called when items have been added to the specified playlist. (alpha5)
      • onPlaylistItemsReordered(playlistIndex, items): Called when the items of the specified playlist have been reordered. (alpha5)
      • onPlaylistItemsRemoving(playlistIndex, removedItems, newCount): Called when removing items of the specified playlist. (alpha5)
      • onPlaylistItemsRemoved(playlistIndex, removedItems, newCount): Called when items of the specified playlist have been removed. (alpha5)
      • onPlaylistItemsModified(playlistIndex, items): Called when some playlist items of the specified playlist have been modified. (alpha5)
      • onPlaylistItemsModifiedFromPlayback(playlistIndex, items): Called when some playlist items of the specified playlist have been modified from playback. (alpha5)
      • onPlaylistItemsReplaced(playlistIndex, items): Called when items of the specified playlist have been replaced. (alpha5)
      • onPlaylistItemEnsureVisible(playlistIndex, itemIndex): Called when the specified item of a playlist was ensured to be visible. (alpha4)
      • onPlaylistCreated(playlistIndex, name): Called when the specified playlist has been created. (alpha4)
      • onPlaylistRenamed(playlistIndex, name): Called when the specified playlist has been renamed. (alpha4)
      • onPlaylistActivated(oldPlaylistIndex, newPlaylistIndex): Called when the active playlist is changed. (alpha4)
      • onPlaylistLocked(playlistIndex): Called when the specified playlist has been locked. (alpha4)
      • onPlaylistUnlocked(playlistIndex): Called when the specified playlist has been unlocked. (alpha4)
      • onPlaylistSelectedItemsChanged(playlistIndex, selectedItems): Called when the selected items of the specified playlist have been changed. (alpha5)
      • onPlaylistFocusedItemChanged(playlistIndex, fromItemIndex, toItemIndex): Called when the focused item of the specified playlist has been changed. (alpha4)
      • onPlaylistsReordered(playlistOrder): Called when the playlists have been reordered. (alpha5)
      • onPlaylistsRemoving(removedPlaylists, newCount): Called when playlists are being removed. (alpha5)
      • onPlaylistsRemoved(removedPlaylists, newCount): Called when playlists have been removed. (alpha5)
      • onDefaultFormatChanged(): Called when the default format has been changed. (alpha4)
      • onPlaybackOrderChanged(playbackOrderIndex): Called when the playback order has been changed. (alpha4)
    • Fixed: Booleans in objects are now parsed correctly. (alpha4)
    • Fixed: Boolean parameters and return values are true Javascript booleans now. (alpha4)
    • Improved: The searchPattern parameter is now optional in ReadDirectory() and defaults to "\*.\*". (alpha4)
    • Improved: The CreateAutoPlaylist() sort and flags parameter can be omitted. They default to "" and 0 respectively. (alpha4)
    • Changed: Returned JSON objects now use camelCase casing. (alpha4)
    • Changed: *Breaking Change* Callbacks follow the Category-Noun-Verb naming convention. (alpha5)
    • Changed: *Breaking Change* All properties, methods and callbacks to use camelCase convention. (alpha5)
    • Changed: *Breaking Change* The parameter list of most callbacks has been expanded. (alpha5)

Supported processor architectures: x86 32-bit, x86 64-bit.

Links

Download
View version history
View latest version and component description
Home page
Documentation
Discussion
Source code

How to install a component?