Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bb0a0725d6 | ||
|
|
f2ffb42876 | ||
|
|
edbfc86e56 | ||
|
|
b25eaafc82 | ||
|
|
ef9c653ad7 | ||
|
|
e9f015bb19 | ||
|
|
544671f246 | ||
|
|
f45ba30979 | ||
|
|
4953e4481f | ||
|
|
c7b0815768 | ||
|
|
4ab7f74a4e | ||
|
|
96916f6c37 | ||
|
|
eafad684b6 | ||
|
|
14d3e38aeb | ||
|
|
afe281c094 | ||
|
|
436078bdf8 | ||
|
|
20120538e4 | ||
|
|
eec4101d29 | ||
|
|
b135ba2a0a | ||
|
|
9c9f24cb39 | ||
|
|
6aeb4bc8b9 | ||
|
|
4beb7fbf3c | ||
|
|
4f3512023f | ||
|
|
f38115171b | ||
|
|
7456917cec | ||
|
|
4482d3333f |
No files matched your search
@@ -5,6 +5,28 @@ All notable changes to this project will be documented in this file.
|
||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
|
||||
## [0.20.2] - 2024-02-26
|
||||
|
||||
### Added
|
||||
|
||||
- Small improvement in the context menu of the Playlist view
|
||||
- Videos can be paused and resumed using the `Ok` remote button
|
||||
|
||||
### Fixed
|
||||
|
||||
- `Device connected` notification only show once every 30 minutes per device to avoid spam
|
||||
- SponsorBlock category "highlight" was not visible in chapter label
|
||||
|
||||
### Changed
|
||||
|
||||
- UI focus images are now with rounded corners, and with a slight glow
|
||||
|
||||
## [0.20.1] - 2024-02-23
|
||||
|
||||
### Fixed
|
||||
|
||||
- `Device connected` notification showing repeatedly
|
||||
|
||||
## [0.20.0] - 2024-02-21
|
||||
|
||||
### Added
|
||||
|
||||
@@ -42,16 +42,16 @@ More under [Screenshots](./docs/screenshots/README.md)
|
||||
- 🕵️ No Tracking
|
||||
- 🛡️ Privacy driven (uses Invidious backend)
|
||||
- ⚔️ SponsorBlock integration (skips undesirable sections in videos)
|
||||
- 📱 Browse, search, and cast from phone using the web app
|
||||
- 📱 Browse, search, and cast from phone using the YouTube app or the browser
|
||||
- 🔮 Picture-in-picture mode
|
||||
- ⚡ Fast! [Check out how we compare with the official YouTube app](https://youtu.be/qmSvA-QQW20)
|
||||
|
||||
### Cast from phone
|
||||
|
||||
1. Open "Web app" tab in Playlet
|
||||
1. Scan QR Code with Phone
|
||||
1. Browse or search videos
|
||||
1. Click the video and choose the "Play on TV" option
|
||||
- Open "Remote" tab in Playlet
|
||||
- Scan QR Code with Phone, and use the browser; OR
|
||||
- Use the YouTube app to connect using the same Wi-Fi; OR
|
||||
- Use the `Link with TV code` to connect
|
||||
|
||||
### Picture-in-picture
|
||||
|
||||
@@ -63,7 +63,7 @@ More under [Screenshots](./docs/screenshots/README.md)
|
||||
|
||||
1. Open settings in Playlet
|
||||
1. Select Invidious -> Instance
|
||||
1. Set a custom instance, or choose a public one hosted by volunteers (from https://api.invidious.io/)
|
||||
1. Set a custom instance, or choose a public one hosted by volunteers (from [api.invidious.io](https://api.invidious.io/))
|
||||
1. Optionally, Select `Test instance` to make sure it works
|
||||
1. Hit save
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ openapi: 3.0.0
|
||||
|
||||
info:
|
||||
title: Playlet Web API
|
||||
version: 0.20.0
|
||||
version: 0.20.2
|
||||
description:
|
||||
Playlet Web API is a RESTful API for controlling the Playlet app on
|
||||
Roku devices. The API is intended to be used by the Playlet web app, but can
|
||||
|
||||
@@ -18,9 +18,9 @@
|
||||
| --------------------------- | ------------------------------------------------ | --------------------------------------------- |
|
||||
|  |  |  |
|
||||
|
||||
| Link to web app | App info |
|
||||
| ----------------------------------- | --------------------------- |
|
||||
|  |  |
|
||||
| Remote | App info |
|
||||
| ----------------------- | --------------------------- |
|
||||
|  |  |
|
||||
|
||||
## Playlet web app
|
||||
|
||||
|
||||
|
After Width: | Height: | Size: 67 KiB |
|
Before Width: | Height: | Size: 39 KiB After Width: | Height: | Size: 42 KiB |
|
Before Width: | Height: | Size: 52 KiB |
@@ -1,18 +1,18 @@
|
||||
{
|
||||
"name": "playlet",
|
||||
"version": "0.20.0",
|
||||
"version": "0.20.2",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "playlet",
|
||||
"version": "0.20.0",
|
||||
"version": "0.20.2",
|
||||
"hasInstallScript": true,
|
||||
"devDependencies": {
|
||||
"@rokucommunity/bslint": "^0.8.17",
|
||||
"@types/crypto-js": "^4.2.2",
|
||||
"@types/fs-extra": "^11.0.4",
|
||||
"@types/node": "^20.11.19",
|
||||
"@types/node": "^20.11.20",
|
||||
"@types/xml2js": "^0.4.14",
|
||||
"argparse": "^2.0.1",
|
||||
"brighterscript": "0.65.22",
|
||||
@@ -20,16 +20,16 @@
|
||||
"convert-svg-to-png": "^0.6.4",
|
||||
"cross-fetch": "^4.0.0",
|
||||
"crypto-js": "^4.2.0",
|
||||
"dotenv": "^16.4.4",
|
||||
"dotenv": "^16.4.5",
|
||||
"express": "^4.18.2",
|
||||
"fs-extra": "^11.2.0",
|
||||
"glob": "^10.3.10",
|
||||
"imap": "^0.8.19",
|
||||
"ip": "^1.1.8",
|
||||
"ip": "^2.0.1",
|
||||
"json5": "^2.2.3",
|
||||
"mailparser": "^3.6.7",
|
||||
"roku-deploy": "^3.11.2",
|
||||
"rooibos-roku": "^5.11.0",
|
||||
"rooibos-roku": "5.10.0",
|
||||
"semver": "^7.6.0",
|
||||
"shelljs": "^0.8.5",
|
||||
"ts-node": "^10.9.2",
|
||||
@@ -370,9 +370,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@types/node": {
|
||||
"version": "20.11.19",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.19.tgz",
|
||||
"integrity": "sha512-7xMnVEcZFu0DikYjWOlRq7NTPETrm7teqUT2WkQjrTIkEgUyyGdWsj/Zg8bEJt5TNklzbPD1X3fqfsHw3SpapQ==",
|
||||
"version": "20.11.20",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.20.tgz",
|
||||
"integrity": "sha512-7/rR21OS+fq8IyHTgtLkDK949uzsa6n8BkziAKtPVpugIkO6D+/ooXMvzXxDnZrmtXVfjb1bKQafYpb8s89LOg==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"undici-types": "~5.26.4"
|
||||
@@ -1706,9 +1706,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/dotenv": {
|
||||
"version": "16.4.4",
|
||||
"resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.4.4.tgz",
|
||||
"integrity": "sha512-XvPXc8XAQThSjAbY6cQ/9PcBXmFoWuw1sQ3b8HqUCR6ziGXjkTi//kB9SWa2UwqlgdAIuRqAa/9hVljzPehbYg==",
|
||||
"version": "16.4.5",
|
||||
"resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.4.5.tgz",
|
||||
"integrity": "sha512-ZmdL2rui+eB2YwhsWzjInR8LldtZHGDoQ1ugH85ppHKwpUHL7j7rN0Ti9NCnGiQbhaZ11FpR+7ao1dNsmduNUg==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
@@ -2592,9 +2592,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/ip": {
|
||||
"version": "1.1.8",
|
||||
"resolved": "https://registry.npmjs.org/ip/-/ip-1.1.8.tgz",
|
||||
"integrity": "sha512-PuExPYUiu6qMBQb4l06ecm6T6ujzhmh+MeJcW9wa89PoAz5pvd4zPgN5WJV104mb6S2T1AwNIAaB70JNrLQWhg==",
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/ip/-/ip-2.0.1.tgz",
|
||||
"integrity": "sha512-lJUL9imLTNi1ZfXT+DU6rBBdbiKGBuay9B6xGSPVjUeQwaH1RIGqef8RZkUtHioLmSNpPR5M4HVKJGm1j8FWVQ==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/ipaddr.js": {
|
||||
@@ -3921,9 +3921,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/rooibos-roku": {
|
||||
"version": "5.11.0",
|
||||
"resolved": "https://registry.npmjs.org/rooibos-roku/-/rooibos-roku-5.11.0.tgz",
|
||||
"integrity": "sha512-qxTYwsyp6Ihb6B8tmFm+24DE/s2gMCxagvdABElGWgqL834M+kZtmwrQXvSrMkM+0gkmQfIDuw1M4v484gycYQ==",
|
||||
"version": "5.10.0",
|
||||
"resolved": "https://registry.npmjs.org/rooibos-roku/-/rooibos-roku-5.10.0.tgz",
|
||||
"integrity": "sha512-Idiv3nWQOEr5V8z8oHcIovjcoBffgqRtTQ5B6K+x/cGAouKxyVJp0fsZ80xQvUul9IwHQ0XIPUYbNWCR3RQ3sA==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"source-map": "^0.7.3",
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "playlet",
|
||||
"version": "0.20.0",
|
||||
"version": "0.20.2",
|
||||
"description": "Unofficial YouTube client for Roku",
|
||||
"devDependencies": {
|
||||
"@rokucommunity/bslint": "^0.8.17",
|
||||
"@types/crypto-js": "^4.2.2",
|
||||
"@types/fs-extra": "^11.0.4",
|
||||
"@types/node": "^20.11.19",
|
||||
"@types/node": "^20.11.20",
|
||||
"@types/xml2js": "^0.4.14",
|
||||
"argparse": "^2.0.1",
|
||||
"brighterscript": "0.65.22",
|
||||
@@ -14,16 +14,16 @@
|
||||
"convert-svg-to-png": "^0.6.4",
|
||||
"cross-fetch": "^4.0.0",
|
||||
"crypto-js": "^4.2.0",
|
||||
"dotenv": "^16.4.4",
|
||||
"dotenv": "^16.4.5",
|
||||
"express": "^4.18.2",
|
||||
"fs-extra": "^11.2.0",
|
||||
"glob": "^10.3.10",
|
||||
"imap": "^0.8.19",
|
||||
"ip": "^1.1.8",
|
||||
"ip": "^2.0.1",
|
||||
"json5": "^2.2.3",
|
||||
"mailparser": "^3.6.7",
|
||||
"roku-deploy": "^3.11.2",
|
||||
"rooibos-roku": "^5.11.0",
|
||||
"rooibos-roku": "5.10.0",
|
||||
"semver": "^7.6.0",
|
||||
"shelljs": "^0.8.5",
|
||||
"ts-node": "^10.9.2",
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "playlet-app",
|
||||
"version": "0.20.0",
|
||||
"version": "0.20.2",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "playlet-app",
|
||||
"version": "0.20.0"
|
||||
"version": "0.20.2"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "playlet-app",
|
||||
"version": "0.20.0",
|
||||
"version": "0.20.2",
|
||||
"description": "Unofficial YouTube client for Roku",
|
||||
"scripts": {
|
||||
"prebuild": "rm -rf build/playlet-app",
|
||||
|
||||
@@ -20,6 +20,11 @@ function GetLoadingMessage() as string
|
||||
"Don't forget to like and subscribe...",
|
||||
"Shoveling coal into the server...",
|
||||
"Counting down from infinity...",
|
||||
"Unfortunately, the internet is closed today...",
|
||||
"Unfortunately, we have no ads to show you...",
|
||||
"Looking for the remote...",
|
||||
"Finding that song that goes 'La la lala la'...",
|
||||
"Waiting for the spinny thing to finish...",
|
||||
]
|
||||
end if
|
||||
index = GetRandom(0, messages.count() - 1)
|
||||
|
||||
@@ -3,7 +3,7 @@ title=Playlet
|
||||
# Do not update version manually, it is auto updated from package.json
|
||||
major_version=0
|
||||
minor_version=20
|
||||
build_version=00000
|
||||
build_version=00002
|
||||
|
||||
ui_resolutions=hd
|
||||
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "playlet-lib",
|
||||
"version": "0.20.0",
|
||||
"version": "0.20.2",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "playlet-lib",
|
||||
"version": "0.20.0"
|
||||
"version": "0.20.2"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "playlet-lib",
|
||||
"version": "0.20.0",
|
||||
"version": "0.20.2",
|
||||
"description": "Unofficial YouTube client for Roku",
|
||||
"scripts": {
|
||||
"prebuild": "rm -rf build/playlet-lib",
|
||||
|
||||
@@ -61,7 +61,7 @@
|
||||
showRowLabel="[true]"
|
||||
rowFocusAnimationStyle="floatingfocus"
|
||||
variableWidthItems="true"
|
||||
focusBitmapUri="pkg:/images/focus_grid.9.png" />
|
||||
focusBitmapUri="pkg:/images/focus-glow-padding-19.9.png" />
|
||||
|
||||
<Animation
|
||||
id="scrollAnimation"
|
||||
|
||||
@@ -71,8 +71,6 @@ import "pkg:/source/utils/Types.bs"
|
||||
' - "Remove group from Bookmarks"
|
||||
' - "Reload bookmarks" - DONE
|
||||
'
|
||||
' TODO:P1 Playlist item seletected from the bookmarks need to play as a playlist, not as a single video
|
||||
' TODO:P1 Context menu might need to be scrollable (both horizontally and vertically)
|
||||
' TODO:P1 Context menu might need sections. Example:
|
||||
' In a Channel view, while selecting a playlist:
|
||||
' - Channel
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import "pkg:/source/utils/MathUtils.bs"
|
||||
import "pkg:/source/utils/Types.bs"
|
||||
|
||||
' Based on https://github.com/jellyfin/jellyfin-roku/blob/unstable/components/IconButton.brs
|
||||
@@ -40,16 +41,11 @@ function setIconSize()
|
||||
height = m.top.height
|
||||
width = m.top.width
|
||||
if height > 0 and width > 0
|
||||
' TODO: Use smallest number between them
|
||||
m.buttonIcon.height = m.top.height
|
||||
iconSize = MathUtils.Min(height, width) - m.top.padding
|
||||
m.buttonIcon.height = iconSize
|
||||
m.buttonIcon.width = iconSize
|
||||
|
||||
if m.top.padding > 0
|
||||
m.buttonIcon.height = m.buttonIcon.height - m.top.padding
|
||||
end if
|
||||
|
||||
m.buttonIcon.width = m.buttonIcon.height
|
||||
|
||||
m.buttonIcon.translation = [((width - m.buttonIcon.width) / 2), ((height - m.buttonIcon.height) / 2)]
|
||||
m.buttonIcon.translation = [((width - iconSize) / 2), ((height - iconSize) / 2)]
|
||||
m.buttonText.translation = [-5, height]
|
||||
m.buttonText.width = width + 10
|
||||
end if
|
||||
|
||||
@@ -143,9 +143,6 @@ function OnItemLongPressed(index as integer) as void
|
||||
|
||||
LogInfo("Long press: playlist:", playlistId, "video:", videoId)
|
||||
|
||||
' TODO:P1 handle case of opening the channel
|
||||
' - Owner of a video
|
||||
' - Owner of a playlist
|
||||
contextMenuProviders = [m.top]
|
||||
ContextMenuUtils.Open(contextMenuProviders, m.appController, video)
|
||||
end function
|
||||
@@ -173,8 +170,20 @@ function GetContextMenuOptionsForItem(video as object) as object
|
||||
ContextMenuUtils.CreateOption("Queue video", m.videoQueue, "FuncAddToQueueVideo", [video]),
|
||||
]
|
||||
|
||||
if not StringUtils.IsNullOrEmpty(playlist.authorId)
|
||||
options.push(ContextMenuUtils.CreateOption("Open channel", m.top, "OpenPlaylistChannel", [playlist]))
|
||||
playlistAuthorId = playlist.authorId
|
||||
videoAuthorId = video.authorId
|
||||
|
||||
if not StringUtils.IsNullOrEmpty(playlistAuthorId) or not StringUtils.IsNullOrEmpty(videoAuthorId)
|
||||
if playlistAuthorId = videoAuthorId
|
||||
options.push(ContextMenuUtils.CreateOption("Open channel", m.top, "OpenPlaylistChannel", [playlist]))
|
||||
else
|
||||
if not StringUtils.IsNullOrEmpty(playlistAuthorId)
|
||||
options.push(ContextMenuUtils.CreateOption("Open playlist channel", m.top, "OpenPlaylistChannel", [playlist]))
|
||||
end if
|
||||
if not StringUtils.IsNullOrEmpty(videoAuthorId)
|
||||
options.push(ContextMenuUtils.CreateOption("Open video channel", m.top, "OpenVideoChannel", [video]))
|
||||
end if
|
||||
end if
|
||||
end if
|
||||
|
||||
options.append(m.bookmarks@.GetMenuForPlaylist(playlist))
|
||||
@@ -193,6 +202,16 @@ function OpenPlaylistChannel(playlist as object) as void
|
||||
ChannelUtils.Open(channel)
|
||||
end function
|
||||
|
||||
function OpenVideoChannel(video as object) as void
|
||||
authorId = video.authorId
|
||||
if StringUtils.IsNullOrEmpty(authorId)
|
||||
LogWarn("Invalid authorId:", authorId)
|
||||
return
|
||||
end if
|
||||
channel = InvidiousContent.ToChannelContentNode(invalid, { authorId: authorId }, invalid)
|
||||
ChannelUtils.Open(channel)
|
||||
end function
|
||||
|
||||
'TODO:P1 a playlist could have been opened from the bookmarks, which can be as old as 3 days
|
||||
' We should make a request in this case, and let the cache handle freshness.
|
||||
function LoadPlaylistIfNeeded() as void
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
<field id="videoQueue" type="node" bind="/VideoQueue" />
|
||||
<field id="bookmarks" type="node" bind="/Bookmarks" />
|
||||
<function name="OpenPlaylistChannel" />
|
||||
<function name="OpenVideoChannel" />
|
||||
</interface>
|
||||
<children>
|
||||
<Rectangle
|
||||
@@ -56,8 +57,8 @@
|
||||
numColumns="1"
|
||||
numRows="5"
|
||||
vertFocusAnimationStyle="floatingFocus"
|
||||
translation="[620,90]" />
|
||||
|
||||
translation="[620,90]"
|
||||
focusBitmapUri="pkg:/images/focus-glow-padding-27.9.png" />
|
||||
</Poster>
|
||||
</children>
|
||||
</component>
|
||||
@@ -31,7 +31,7 @@
|
||||
showRowLabel="[true]"
|
||||
rowFocusAnimationStyle="floatingfocus"
|
||||
variableWidthItems="true"
|
||||
focusBitmapUri="pkg:/images/focus_grid.9.png"
|
||||
focusBitmapUri="pkg:/images/focus-glow-padding-19.9.png"
|
||||
/>
|
||||
</Group>
|
||||
</children>
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
showRowLabel="[true]"
|
||||
rowFocusAnimationStyle="floatingfocus"
|
||||
variableWidthItems="true"
|
||||
focusBitmapUri="pkg:/images/focus_grid.9.png"
|
||||
focusBitmapUri="pkg:/images/focus-glow-padding-19.9.png"
|
||||
/>
|
||||
</children>
|
||||
</component>
|
||||
@@ -19,6 +19,7 @@ function Init()
|
||||
m.linkWithTvPanel = m.top.findNode("LinkWithTvPanel")
|
||||
|
||||
m.wifiNameLabel = m.top.findNode("WifiNameLabel")
|
||||
m.wifiInstructionWithDeviceNameLabel = m.top.findNode("WifiInstructionWithDeviceNameLabel")
|
||||
m.linkCodeLabel = m.top.findNode("LinkCodeLabel")
|
||||
end function
|
||||
|
||||
@@ -128,6 +129,8 @@ function OnLinkWithWifiPanelVisibleChanged() as void
|
||||
else
|
||||
m.wifiNameLabel.text = "N/A"
|
||||
end if
|
||||
|
||||
m.wifiInstructionWithDeviceNameLabel.text = `Tap the cast icon and select "${m.loungeService.deviceName}"`
|
||||
end function
|
||||
|
||||
function OnLinkWithTvPanelVisibleChanged()
|
||||
@@ -147,6 +150,7 @@ function GeneratePairingCode()
|
||||
m.linkCodeTask.cancel = true
|
||||
end if
|
||||
|
||||
m.linkCodeLabel.text = "Loading..."
|
||||
m.linkCodeTask = AsyncTask.Start(Tasks.LoungeGenerateManualPairingCodeTask, {
|
||||
loungeService: m.loungeService
|
||||
loungeToken: m.loungeService.loungeToken
|
||||
|
||||
@@ -91,6 +91,7 @@
|
||||
font="font:SmallSystemFont"
|
||||
text="3." />
|
||||
<Label
|
||||
id="WifiInstructionWithDeviceNameLabel"
|
||||
font="font:SmallSystemFont"
|
||||
width="380"
|
||||
wrap="true"
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
showRowLabel="[true]"
|
||||
rowFocusAnimationStyle="floatingfocus"
|
||||
variableWidthItems="true"
|
||||
focusBitmapUri="pkg:/images/focus_grid.9.png"
|
||||
focusBitmapUri="pkg:/images/focus-glow-padding-19.9.png"
|
||||
/>
|
||||
<Animation
|
||||
id="scrollAnimation"
|
||||
|
||||
@@ -30,12 +30,13 @@
|
||||
<MarkupGrid
|
||||
id="instances"
|
||||
itemComponentName="InvidiousPublicInstancesListItem"
|
||||
itemSize="[860,16]"
|
||||
itemSize="[810,16]"
|
||||
itemSpacing="[0,20]"
|
||||
numColumns="1"
|
||||
numRows="7"
|
||||
vertFocusAnimationStyle="floatingFocus"
|
||||
translation="[0,46]" />
|
||||
translation="[0,46]"
|
||||
focusBitmapUri="pkg:/images/white-border.9.png" />
|
||||
|
||||
</children>
|
||||
</component>
|
||||
@@ -42,7 +42,7 @@
|
||||
<Label
|
||||
id="healthLabel"
|
||||
font="font:SmallestSystemFont"
|
||||
width="100"
|
||||
width="60"
|
||||
translation="[750,0]" />
|
||||
</children>
|
||||
</component>
|
||||
@@ -11,7 +11,7 @@ function Init()
|
||||
m.top.iconUri = ""
|
||||
m.top.focusedIconUri = ""
|
||||
m.top.focusBitmapUri = "pkg:/images/white.9.png"
|
||||
m.top.focusFootprintBitmapUri = "pkg:/images/white_border.9.png"
|
||||
m.top.focusFootprintBitmapUri = "pkg:/images/white-border.9.png"
|
||||
m.top.showFocusFootprint = true
|
||||
m.top.observeField("focusedChild", FuncName(OnFocusedChildChange))
|
||||
end function
|
||||
|
||||
@@ -57,7 +57,10 @@ namespace Invidious
|
||||
end function
|
||||
|
||||
function GetInstance() as string
|
||||
instance = m.node.preferences["invidious.instance"]
|
||||
if m.preferences = invalid
|
||||
m.preferences = m.node.preferences
|
||||
end if
|
||||
instance = m.preferences["invidious.instance"]
|
||||
if not StringUtils.IsNullOrEmpty(instance)
|
||||
return instance
|
||||
end if
|
||||
|
||||
@@ -13,6 +13,11 @@ import "pkg:/source/utils/UrlUtils.bs"
|
||||
|
||||
const COMMAND_HANDLER_PREFIX = "_Handle_"
|
||||
|
||||
' Apparently devices can be connected and disconnected very frequently.
|
||||
' We don't want to spam the user with notifications, so we'll only show a notification
|
||||
' if the last notification was more than 30 minutes ago.
|
||||
const CONNECT_NOTIFICATION_MIN_INTERVAL_SECONDS = 1800
|
||||
|
||||
class LoungeApi
|
||||
|
||||
public loungeServiceNode
|
||||
@@ -27,6 +32,7 @@ class LoungeApi
|
||||
public loungeToken
|
||||
public sessionId
|
||||
public gSessionId
|
||||
public devices
|
||||
|
||||
private ofs
|
||||
private lastProcessedCommandIndex = -1
|
||||
@@ -46,6 +52,7 @@ class LoungeApi
|
||||
m.ofs = 0
|
||||
m.poller = invalid
|
||||
m.outgoingMessagesRequests = {}
|
||||
m.devices = {}
|
||||
|
||||
commandHandlers = {}
|
||||
commandHandlers[COMMAND_TYPE_NOOP] = m.HandleIgnoreCommand
|
||||
@@ -55,13 +62,13 @@ class LoungeApi
|
||||
commandHandlers[COMMAND_TYPE_DPAD_COMMAND] = m.HandleIgnoreCommand
|
||||
commandHandlers[COMMAND_TYPE_VOICE_COMMAND] = m.HandleIgnoreCommand
|
||||
commandHandlers[COMMAND_TYPE_ON_USER_ACTIVITY] = m.HandleIgnoreCommand
|
||||
commandHandlers[COMMAND_TYPE_REMOTE_DISCONNECTED] = m.HandleIgnoreCommand
|
||||
|
||||
commandHandlers[COMMAND_TYPE_GET_NOW_PLAYING] = m.HandleGetPlayingNow
|
||||
commandHandlers[COMMAND_TYPE_SESSION_ID] = m.HandleSessionId
|
||||
commandHandlers[COMMAND_TYPE_G_SESSION_ID] = m.HandleGSessionId
|
||||
commandHandlers[COMMAND_TYPE_LOUNGE_STATUS] = m.HandleLoungeStatus
|
||||
commandHandlers[COMMAND_TYPE_REMOTE_CONNECTED] = m.HandleRemoteConnected
|
||||
commandHandlers[COMMAND_TYPE_REMOTE_DISCONNECTED] = m.HandleRemoteDisconnected
|
||||
commandHandlers[COMMAND_TYPE_SET_VOLUME] = m.HandleSetVolume
|
||||
commandHandlers[COMMAND_TYPE_SET_PLAYLIST] = m.HandleSetPlaylist
|
||||
commandHandlers[COMMAND_TYPE_UPDATE_PLAYLIST] = m.HandleUpdatePlaylist
|
||||
@@ -92,6 +99,7 @@ class LoungeApi
|
||||
end if
|
||||
|
||||
request = HttpClient.Get("https://www.youtube.com/api/lounge/pairing/generate_screen_id")
|
||||
|
||||
response = request.Await()
|
||||
if not response.IsSuccess()
|
||||
error = `Failed to get screen id. Please restart playlet to use the cast function.\n${response.ErrorMessage()}`
|
||||
@@ -99,6 +107,7 @@ class LoungeApi
|
||||
DialogUtils.ShowDialog(error, "Lounge service setup error")
|
||||
return invalid
|
||||
end if
|
||||
|
||||
id = response.Text()
|
||||
if not IsString(id)
|
||||
error = `Failed to get screen id. Please restart playlet to use the cast function.\nNot a valid screen id: ${id}`
|
||||
@@ -106,6 +115,7 @@ class LoungeApi
|
||||
DialogUtils.ShowDialog(error, "Lounge service setup error")
|
||||
return invalid
|
||||
end if
|
||||
|
||||
m.screenId = id
|
||||
return id
|
||||
end function
|
||||
@@ -115,9 +125,11 @@ class LoungeApi
|
||||
return m.loungeToken
|
||||
end if
|
||||
|
||||
form = UrlUtils.GetUrlEncodedForm({ "screen_ids": m.screenId })
|
||||
request = HttpClient.Post("https://www.youtube.com/api/lounge/pairing/get_lounge_token_batch", form)
|
||||
request.Header("Content-Type", "application/x-www-form-urlencoded")
|
||||
request = HttpClient.Post("https://www.youtube.com/api/lounge/pairing/get_lounge_token_batch", "")
|
||||
request.UrlEncodedForm({
|
||||
"screen_ids": m.screenId
|
||||
})
|
||||
|
||||
response = request.Await()
|
||||
if not response.IsSuccess()
|
||||
error = `Failed to get lounge token. Please restart playlet to use the cast function.\n${response.ErrorMessage()}`
|
||||
@@ -141,7 +153,6 @@ class LoungeApi
|
||||
end function
|
||||
|
||||
function GetSessionData() as boolean
|
||||
baseUrl = "https://www.youtube.com/api/lounge/bc/bind"
|
||||
queryParams = {
|
||||
"device": "LOUNGE_SCREEN"
|
||||
"theme": "cl"
|
||||
@@ -159,10 +170,11 @@ class LoungeApi
|
||||
queryParams["loungeIdToken"] = m.loungeToken
|
||||
queryParams["zx"] = m.Zx()
|
||||
|
||||
url = UrlUtils.BuildUrl(baseUrl, invalid, queryParams)
|
||||
|
||||
request = HttpClient.Post(url, "count=0")
|
||||
request.Header("Content-Type", "application/x-www-form-urlencoded")
|
||||
request = HttpClient.Post("https://www.youtube.com/api/lounge/bc/bind", "")
|
||||
request.QueryParams(queryParams)
|
||||
request.UrlEncodedForm({
|
||||
"count": 0
|
||||
})
|
||||
|
||||
response = request.Await()
|
||||
if not response.IsSuccess()
|
||||
@@ -336,35 +348,38 @@ class LoungeApi
|
||||
return
|
||||
end if
|
||||
|
||||
devicesDict = {}
|
||||
for each device in devices
|
||||
devicesDict[device.id] = device
|
||||
if m.devices.DoesExist(device.id)
|
||||
device.lastConnectNotificationTime = m.devices[device.id].lastConnectNotificationTime
|
||||
end if
|
||||
m.devices[device.id] = device
|
||||
end for
|
||||
|
||||
m.loungeServiceNode.devices = devicesDict
|
||||
end function
|
||||
|
||||
function HandleRemoteConnected(commandId as integer, commandType as string, commandArgs as object, messagesToSend as object) as void
|
||||
LogInfo(commandType)
|
||||
LogInfo(commandType, FormatJson(commandArgs))
|
||||
newDevice = commandArgs
|
||||
id = newDevice.id
|
||||
if StringUtils.IsNullOrEmpty(id)
|
||||
return
|
||||
end if
|
||||
|
||||
devices = m.loungeServiceNode.devices
|
||||
if devices = invalid
|
||||
devices = {}
|
||||
end if
|
||||
|
||||
if devices.DoesExist(id)
|
||||
device = devices[id]
|
||||
if m.devices.DoesExist(id)
|
||||
device = m.devices[id]
|
||||
device.Append(newDevice)
|
||||
newDevice = device
|
||||
end if
|
||||
|
||||
devices[id] = newDevice
|
||||
m.loungeServiceNode.devices = devices
|
||||
m.devices[id] = newDevice
|
||||
|
||||
nowSeconds = TimeUtils.Now().AsSeconds()
|
||||
lastConnectNotificationInterval = nowSeconds - ValidInt(newDevice.lastConnectNotificationTime)
|
||||
if lastConnectNotificationInterval < CONNECT_NOTIFICATION_MIN_INTERVAL_SECONDS
|
||||
LogInfo("Skipping connect notification. Last connect notification interval:", lastConnectNotificationInterval, "seconds")
|
||||
return
|
||||
end if
|
||||
|
||||
newDevice.lastConnectNotificationTime = nowSeconds
|
||||
|
||||
userName = newDevice.user
|
||||
deviceName = newDevice.name
|
||||
@@ -373,24 +388,6 @@ class LoungeApi
|
||||
LoungeDeviceConnected.ShowNotifcation(m.notificationsNode, deviceName, userName, userAvatarUri)
|
||||
end function
|
||||
|
||||
function HandleRemoteDisconnected(commandId as integer, commandType as string, commandArgs as object, messagesToSend as object) as void
|
||||
LogInfo(commandType)
|
||||
device = commandArgs
|
||||
id = device.id
|
||||
if StringUtils.IsNullOrEmpty(id)
|
||||
return
|
||||
end if
|
||||
|
||||
devices = m.loungeServiceNode.devices
|
||||
if devices = invalid
|
||||
devices = {}
|
||||
end if
|
||||
if devices.Delete(id)
|
||||
m.loungeServiceNode.devices = devices
|
||||
end if
|
||||
' TODO:P1 disconnect notification
|
||||
end function
|
||||
|
||||
function HandleSetVolume(commandId as integer, commandType as string, commandArgs as object, messagesToSend as object) as void
|
||||
player = m.videoQueueNode.player
|
||||
if player = invalid
|
||||
@@ -443,7 +440,6 @@ class LoungeApi
|
||||
return
|
||||
end if
|
||||
|
||||
baseUrl = "https://www.youtube.com/api/lounge/bc/bind"
|
||||
queryParams = {
|
||||
"device": "LOUNGE_SCREEN"
|
||||
"theme": "cl"
|
||||
@@ -470,8 +466,6 @@ class LoungeApi
|
||||
queryParams["AID"] = messages[0].commandId
|
||||
end if
|
||||
|
||||
url = UrlUtils.BuildUrl(baseUrl, invalid, queryParams)
|
||||
|
||||
postData = [
|
||||
{ key: "count", value: messages.Count() }
|
||||
{ key: "ofs", value: loungeData.ofs }
|
||||
@@ -495,9 +489,10 @@ class LoungeApi
|
||||
|
||||
LogDebug("Sending messages:", postData)
|
||||
|
||||
body = UrlUtils.GetUrlEncodedForm(postData)
|
||||
request = HttpClient.Post(url, body)
|
||||
request.Header("Content-Type", "application/x-www-form-urlencoded")
|
||||
request = HttpClient.Post("https://www.youtube.com/api/lounge/bc/bind", "")
|
||||
request.QueryParams(queryParams)
|
||||
request.UrlEncodedForm(postData)
|
||||
|
||||
request.Send()
|
||||
|
||||
' we do not need to wait for requests to finish, we check on them later
|
||||
|
||||
@@ -23,15 +23,15 @@ function LoungeGenerateManualPairingCodeTask(input as object) as object
|
||||
input.loungeToken = loungeService.loungeToken
|
||||
end if
|
||||
|
||||
bodyParams = {
|
||||
form = {
|
||||
"lounge_token": input.loungeToken
|
||||
"screen_id": input.screenId
|
||||
"screen_name": input.screenName
|
||||
"device_id": input.deviceId
|
||||
}
|
||||
|
||||
for each key in bodyParams
|
||||
if StringUtils.IsNullOrEmpty(bodyParams[key])
|
||||
for each key in form
|
||||
if StringUtils.IsNullOrEmpty(form[key])
|
||||
return {
|
||||
"success": false
|
||||
"error": key + " is empty"
|
||||
@@ -39,14 +39,11 @@ function LoungeGenerateManualPairingCodeTask(input as object) as object
|
||||
end if
|
||||
end for
|
||||
|
||||
bodyParams["access_type"] = "permanent"
|
||||
bodyParams["app"] = "Playlet"
|
||||
form["access_type"] = "permanent"
|
||||
form["app"] = "Playlet"
|
||||
|
||||
baseUrl = "https://www.youtube.com/api/lounge/pairing/get_pairing_code?ctx=pair"
|
||||
|
||||
body = UrlUtils.GetUrlEncodedForm(bodyParams)
|
||||
request = HttpClient.Post(baseUrl, body)
|
||||
request.Header("Content-Type", "application/x-www-form-urlencoded")
|
||||
request = HttpClient.Post("https://www.youtube.com/api/lounge/pairing/get_pairing_code?ctx=pair", "")
|
||||
request.UrlEncodedForm(form)
|
||||
|
||||
response = request.Await()
|
||||
if not response.IsSuccess()
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
import "pkg:/components/parts/AutoBind/OnNodeReadyNoOp.bs"
|
||||
import "pkg:/components/Services/LoungeService/LoungeApi.bs"
|
||||
' TODO:P0
|
||||
' 1. Add a section about the lounge in the privacy policy
|
||||
|
||||
function Init()
|
||||
m.top.functionName = "LoungeServiceLoop"
|
||||
|
||||
@@ -6,8 +6,6 @@
|
||||
<field id="screenId" type="string" />
|
||||
<field id="loungeToken" type="string" />
|
||||
|
||||
<field id="devices" type="assocarray" />
|
||||
|
||||
<field id="join" type="boolean" alwaysNotify="true" />
|
||||
<field id="outgoingMessages" type="array" alwaysNotify="true" />
|
||||
|
||||
|
||||
@@ -154,17 +154,22 @@ function GetContextMenuOptionsForItem(rowItem as object) as object
|
||||
options.push(ContextMenuUtils.CreateOption("Play", m.videoQueue, "FuncPlayVideo", [rowItem]))
|
||||
options.push(ContextMenuUtils.CreateOption("Queue", m.videoQueue, "FuncAddToQueueVideo", [rowItem]))
|
||||
|
||||
item = ContextMenuUtils.CreateOption("Open channel", m.top, "OpenVideoChannel", [rowItem])
|
||||
options.push(item)
|
||||
authorId = rowItem.authorId
|
||||
if not StringUtils.IsNullOrEmpty(authorId)
|
||||
options.push(ContextMenuUtils.CreateOption("Open channel", m.top, "OpenVideoChannel", [rowItem]))
|
||||
end if
|
||||
else if rowItem.type = "playlist"
|
||||
options.push(ContextMenuUtils.CreateOption("Play", m.videoQueue, "FuncPlayPlaylist", [rowItem, 0]))
|
||||
options.push(ContextMenuUtils.CreateOption("Queue", m.videoQueue, "FuncAddToQueuePlaylist", [rowItem]))
|
||||
|
||||
item = ContextMenuUtils.CreateOption("Open", m.top, "OpenPlaylist", [rowItem])
|
||||
options.push(item)
|
||||
options.push(ContextMenuUtils.CreateOption("Open playlist", m.top, "OpenPlaylist", [rowItem]))
|
||||
|
||||
authorId = rowItem.authorId
|
||||
if not StringUtils.IsNullOrEmpty(authorId)
|
||||
options.push(ContextMenuUtils.CreateOption("Open channel", m.top, "OpenPlaylistChannel", [rowItem]))
|
||||
end if
|
||||
else if rowItem.type = "channel"
|
||||
item = ContextMenuUtils.CreateOption("Open", m.top, "OpenChannel", [rowItem])
|
||||
options.push(item)
|
||||
options.push(ContextMenuUtils.CreateOption("Open", m.top, "OpenChannel", [rowItem]))
|
||||
else
|
||||
LogWarn("Unknown long pressed item type:", rowItem.type)
|
||||
return []
|
||||
@@ -191,6 +196,16 @@ function OpenVideoChannel(video as object) as void
|
||||
ChannelUtils.Open(channel)
|
||||
end function
|
||||
|
||||
function OpenPlaylistChannel(playlist as object) as void
|
||||
authorId = playlist.authorId
|
||||
if StringUtils.IsNullOrEmpty(authorId)
|
||||
LogWarn("Invalid authorId:", authorId)
|
||||
return
|
||||
end if
|
||||
channel = InvidiousContent.ToChannelContentNode(invalid, { authorId: authorId }, invalid)
|
||||
ChannelUtils.Open(channel)
|
||||
end function
|
||||
|
||||
function Refresh(unsued as dynamic)
|
||||
InitContent()
|
||||
end function
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
<function name="OpenPlaylist" />
|
||||
<function name="OpenChannel" />
|
||||
<function name="OpenVideoChannel" />
|
||||
<function name="OpenPlaylistChannel" />
|
||||
<function name="Refresh" />
|
||||
</interface>
|
||||
</component>
|
||||
@@ -63,12 +63,38 @@ namespace SponsorBlock
|
||||
function UpdateSponsorBlockChapter(time as double) as void
|
||||
segments = m.skipSegments
|
||||
for each segment in segments
|
||||
category = segment["category"]
|
||||
segmentRange = segment["segment"]
|
||||
segmentStart = segmentRange[0]
|
||||
segmentEnd = segmentRange[1]
|
||||
|
||||
' Usually segmentStart and segmentEnd are equal for poi_highlight
|
||||
' We pad the duration for poi_highlight segments so that the chapter label
|
||||
' can be visible when seeking in trickplay
|
||||
if category = "poi_highlight"
|
||||
segmentPaddedDuration = 5
|
||||
|
||||
duration = m.top.duration
|
||||
if duration > 0
|
||||
if duration < 120
|
||||
segmentPaddedDuration = 1
|
||||
else if duration < 300
|
||||
segmentPaddedDuration = 2
|
||||
else if duration < 900
|
||||
segmentPaddedDuration = 5
|
||||
else
|
||||
segmentPaddedDuration = 10
|
||||
end if
|
||||
end if
|
||||
|
||||
segmentDuration = Abs(segmentEnd - segmentStart)
|
||||
padding = Abs(segmentPaddedDuration - segmentDuration) / 2
|
||||
segmentStart = segmentStart - padding
|
||||
segmentEnd = segmentEnd + padding
|
||||
end if
|
||||
|
||||
if (segmentStart <= time) and (segmentEnd >= time)
|
||||
m.top.chapter = m.sponsorBlockService.SegmentTitle(segment["category"])
|
||||
m.top.chapter = m.sponsorBlockService.SegmentTitle(category)
|
||||
return
|
||||
end if
|
||||
end for
|
||||
|
||||
@@ -34,6 +34,7 @@ function VideoContentTask(input as object) as object
|
||||
|
||||
contentNode.title = metadata.title
|
||||
contentNode.secondaryTitle = metadata.author
|
||||
contentNode.live = metadata.liveNow
|
||||
|
||||
streamUrls = CreateStreamUrls(metadata, service, preferencesNode, playletServerPort)
|
||||
contentNode.url = streamUrls[0]
|
||||
@@ -156,10 +157,6 @@ function AddInstanceToUrlIfNeeded(streamUrls as object, instance as string)
|
||||
end for
|
||||
end function
|
||||
|
||||
' TODO:P2
|
||||
' Captions are rate limited https://github.com/iv-org/invidious/issues/2567
|
||||
' It's possible to loop through a list of backup instances hoping to find working subtitles.
|
||||
' Caveat: searching for a working caption could cause a delay in the video player start.
|
||||
function SetCaptions(metadata as object, service as object, contentNode as object) as void
|
||||
if metadata.captions.Count() = 0
|
||||
return
|
||||
|
||||
@@ -16,6 +16,8 @@ function Init()
|
||||
m.fullScreenHintLabel = m.top.findNode("fullScreenHintLabel")
|
||||
m.fullScreenHintTimer = m.top.findNode("fullScreenHintTimer")
|
||||
m.fullScreenHintTimer.ObserveField("fire", FuncName(OnFullScreenHintTimer))
|
||||
m.trickplayUITimer = m.top.findNode("trickplayUITimer")
|
||||
m.trickplayUITimer.ObserveField("fire", FuncName(OnTrickplayUITimer))
|
||||
|
||||
' videoPlayingSuccess indicates if we started playing a video successfully
|
||||
' We use it to detect if we should try another link for a video, or if another error
|
||||
@@ -26,6 +28,13 @@ function Init()
|
||||
' still trying to find a working stream url
|
||||
m.ignoreNextFinishedState = false
|
||||
|
||||
' Indicates that we're currently paused and seeking position
|
||||
m.isSeekingPosition = false
|
||||
|
||||
' Checks if current RokuOS version has showUI field in Video node
|
||||
m.showUIEnabled = m.top.hasField("showUI")
|
||||
LogInfo(`Custom OK handler is ${m.showUIEnabled ? "enabled" : "disabled"}`)
|
||||
|
||||
' asyncStopSemantics available since Roku OS 12.5
|
||||
' It is set to true because stopping synchronously causes timeout and crash
|
||||
' Usually we would need to wait for the video state to move to "stopping" then to "stopped"
|
||||
@@ -50,6 +59,7 @@ function OnNodeReady()
|
||||
m.fullScreenHint.translation = [0, minRect.height - m.fullScreenHint.height]
|
||||
|
||||
' TODO:P2 show a loading spinner if video is loading minimized
|
||||
' Probably only worth doing after the video player is redone
|
||||
m.top.enableUI = m.container.fullscreen
|
||||
m.top.showFullScreenHint = not m.container.fullscreen
|
||||
|
||||
@@ -169,6 +179,12 @@ function OnVideoPlayerStateChange() as void
|
||||
|
||||
state = m.top.state
|
||||
content = m.top.content
|
||||
|
||||
' Reset isSeekingPosition when started to play the video
|
||||
if state = "playing"
|
||||
m.isSeekingPosition = false
|
||||
end if
|
||||
|
||||
' If we successfully played the video, then any error that comes later is not due to a 403 (FORBIDDEN).
|
||||
' This is to reduce false positives, as we do not want retry another link if the first link is working fine.
|
||||
if state = "playing" and not m.videoPlayingSuccess
|
||||
@@ -243,6 +259,69 @@ function OnVideoFinished() as void
|
||||
end if
|
||||
end function
|
||||
|
||||
function IsLiveVideo() as boolean
|
||||
if m.top.content <> invalid
|
||||
return m.top.content.live
|
||||
end if
|
||||
return false
|
||||
end function
|
||||
|
||||
function ShowUIAndStartTimer()
|
||||
if m.showUIEnabled
|
||||
m.top.showUI = { "show": true, "trickPlaybar": true, "titleAndTime": true, "trickplayBackgroundOverlay": true, "focusTrickplayBar": false }
|
||||
m.trickplayUITimer.control = "start"
|
||||
end if
|
||||
end function
|
||||
|
||||
function HideUIAndStopTimer()
|
||||
if m.showUIEnabled
|
||||
m.top.showUI = { "show": false, "focusTrickplayBar": false }
|
||||
m.trickplayUITimer.control = "stop"
|
||||
end if
|
||||
end function
|
||||
|
||||
function HandleOKPress() as boolean
|
||||
if not m.showUIEnabled
|
||||
return false
|
||||
end if
|
||||
|
||||
handled = false
|
||||
state = m.top.state
|
||||
uiVisible = m.top.trickPlaybar.visible
|
||||
isLive = IsLiveVideo()
|
||||
LogInfo(`Handling OK button: state = ${state}, uiVisible = ${uiVisible} isLive = ${isLive}`)
|
||||
if state = "playing"
|
||||
if not uiVisible
|
||||
' Video is playing and UI is not visible, show it
|
||||
ShowUIAndStartTimer()
|
||||
else if not isLive
|
||||
' Trickplay bar is visible and video is currently played, pause it and retain the UI
|
||||
m.trickplayUITimer.control = "stop"
|
||||
m.top.control = "pause"
|
||||
ShowUIAndStartTimer()
|
||||
else
|
||||
HideUIAndStopTimer()
|
||||
end if
|
||||
handled = true
|
||||
else if state = "paused"
|
||||
' Exit early if we're in seeking mode to avoid messing up internal Video node state
|
||||
if m.isSeekingPosition
|
||||
return false
|
||||
end if
|
||||
|
||||
if not uiVisible
|
||||
' Video is paused and UI is not visible, show it
|
||||
ShowUIAndStartTimer()
|
||||
else
|
||||
' Video is currently paused with visible UI, resume it and hide UI
|
||||
HideUIAndStopTimer()
|
||||
m.top.control = "resume"
|
||||
end if
|
||||
handled = true
|
||||
end if
|
||||
return handled
|
||||
end function
|
||||
|
||||
function OnkeyEvent(key as string, press as boolean) as boolean
|
||||
if press = false
|
||||
return false
|
||||
@@ -260,6 +339,19 @@ function OnkeyEvent(key as string, press as boolean) as boolean
|
||||
m.videoQueue.closePlayer = true
|
||||
return true
|
||||
end if
|
||||
|
||||
if key = "OK"
|
||||
return HandleOKPress()
|
||||
end if
|
||||
|
||||
if key = "left" or key = "right" or key = "rewind" or key = "fastforward"
|
||||
' We're paused and one of the buttons is pressed: left, right ff, rw.
|
||||
' That means we're seeking position. Check that in HandleOKPress and exit early
|
||||
m.isSeekingPosition = true
|
||||
end if
|
||||
|
||||
' Always stop UI timer when pressing any button to avoid UI being hidden twice
|
||||
m.trickplayUITimer.control = "stop"
|
||||
return false
|
||||
end function
|
||||
|
||||
@@ -281,6 +373,8 @@ function SetupAnimation()
|
||||
end function
|
||||
|
||||
function OnFullScreenChange()
|
||||
HideUIAndStopTimer()
|
||||
|
||||
m.widthInterpolator.reverse = m.container.fullscreen
|
||||
m.heightInterpolator.reverse = m.container.fullscreen
|
||||
m.translationInterpolator.reverse = m.container.fullscreen
|
||||
@@ -312,6 +406,10 @@ function OnShowFullScreenHint() as void
|
||||
m.fullScreenHintTimer.control = "start"
|
||||
end function
|
||||
|
||||
function OnTrickplayUITimer()
|
||||
HideUIAndStopTimer()
|
||||
end function
|
||||
|
||||
function OnFullScreenHintTimer()
|
||||
showFullScreenHint = m.top.showFullScreenHint
|
||||
m.fullScreenHint.visible = showFullScreenHint
|
||||
|
||||
@@ -16,53 +16,17 @@
|
||||
<function name="Close" />
|
||||
</interface>
|
||||
<children>
|
||||
<Label
|
||||
id="chapterLabel"
|
||||
width="350"
|
||||
height="25"
|
||||
horizAlign="center"
|
||||
vertAlign="center"
|
||||
font="font:SmallestSystemFont"
|
||||
/>
|
||||
<Timer
|
||||
id="chapterLabelTimer"
|
||||
repeat="true"
|
||||
duration="0.25"
|
||||
/>
|
||||
<Animation id="minimizeAnimation"
|
||||
duration="0.3"
|
||||
optional="true">
|
||||
<FloatFieldInterpolator
|
||||
id="widthInterpolator"
|
||||
key="[0.0, 0.5, 1.0]"
|
||||
fieldToInterp="VideoPlayer.width" />
|
||||
<FloatFieldInterpolator
|
||||
id="heightInterpolator"
|
||||
key="[0.0, 0.5, 1.0]"
|
||||
fieldToInterp="VideoPlayer.height" />
|
||||
<Vector2DFieldInterpolator
|
||||
id="translationInterpolator"
|
||||
key="[0.0, 0.5, 1.0]"
|
||||
fieldToInterp="VideoPlayer.translation" />
|
||||
<Label id="chapterLabel" width="350" height="25" horizAlign="center" vertAlign="center" font="font:SmallestSystemFont" />
|
||||
<Timer id="chapterLabelTimer" repeat="true" duration="0.25" />
|
||||
<Animation id="minimizeAnimation" duration="0.3" optional="true">
|
||||
<FloatFieldInterpolator id="widthInterpolator" key="[0.0, 0.5, 1.0]" fieldToInterp="VideoPlayer.width" />
|
||||
<FloatFieldInterpolator id="heightInterpolator" key="[0.0, 0.5, 1.0]" fieldToInterp="VideoPlayer.height" />
|
||||
<Vector2DFieldInterpolator id="translationInterpolator" key="[0.0, 0.5, 1.0]" fieldToInterp="VideoPlayer.translation" />
|
||||
</Animation>
|
||||
<Rectangle
|
||||
id="fullScreenHint"
|
||||
height="26"
|
||||
color="0x000000"
|
||||
opacity="0.8"
|
||||
visible="false">
|
||||
<Label
|
||||
id="fullScreenHintLabel"
|
||||
text="Press Options (*) for full screen"
|
||||
height="26"
|
||||
color="0xFFFFFF"
|
||||
horizAlign="center"
|
||||
vertAlign="center"
|
||||
font="font:SmallestSystemFont"
|
||||
/>
|
||||
<Timer
|
||||
id="fullScreenHintTimer"
|
||||
duration="5" />
|
||||
<Rectangle id="fullScreenHint" height="26" color="0x000000" opacity="0.8" visible="false">
|
||||
<Label id="fullScreenHintLabel" text="Press Options (*) for full screen" height="26" color="0xFFFFFF" horizAlign="center" vertAlign="center" font="font:SmallestSystemFont" />
|
||||
<Timer id="fullScreenHintTimer" duration="5" />
|
||||
<Timer id="trickplayUITimer" duration="5" />
|
||||
</Rectangle>
|
||||
</children>
|
||||
</component>
|
||||
@@ -44,7 +44,8 @@
|
||||
numColumns="1"
|
||||
numRows="6"
|
||||
vertFocusAnimationStyle="floatingFocus"
|
||||
translation="[20,90]" />
|
||||
translation="[20,90]"
|
||||
focusBitmapUri="pkg:/images/focus-glow-padding-27.9.png" />
|
||||
</Rectangle>
|
||||
|
||||
<Animation id="showAnimation"
|
||||
|
||||
@@ -56,12 +56,14 @@ function SetHighlight() as void
|
||||
contentIndex = content.queueIndex
|
||||
index = m.top.index
|
||||
|
||||
if contentIndex = index
|
||||
highlighted = contentIndex = index
|
||||
|
||||
if highlighted
|
||||
' bs:disable-next-line LINT3023
|
||||
m.top.thumbnailBlendColor = "#FFFFFFFF"
|
||||
m.top.highlightUri = "pkg:/images/focus_grid.9.png"
|
||||
else
|
||||
m.top.thumbnailBlendColor = "#606060FF"
|
||||
m.top.highlightUri = ""
|
||||
end if
|
||||
|
||||
m.top.highlightVisible = highlighted
|
||||
end function
|
||||
@@ -5,7 +5,7 @@
|
||||
<field id="title" type="string" alias="titleLabel.text" />
|
||||
<field id="thumbnailUri" type="uri" alias="thumbnailPoster.uri" />
|
||||
<field id="thumbnailBlendColor" type="color" alias="thumbnailPoster.blendColor" />
|
||||
<field id="highlightUri" type="uri" alias="highlightPoster.uri" />
|
||||
<field id="highlightVisible" type="boolean" alias="highlightPoster.visible" />
|
||||
<field id="duration" type="string" alias="durationLabel.text" />
|
||||
<field id="durationRectVisible" type="boolean" alias="durationRect.visible" />
|
||||
</interface>
|
||||
@@ -36,9 +36,9 @@
|
||||
<Poster
|
||||
id="highlightPoster"
|
||||
blendColor="0xFF1C30"
|
||||
uri="pkg:/images/queue-highlight.9.png"
|
||||
width="164"
|
||||
height="94" />
|
||||
|
||||
<Label
|
||||
id="titleLabel"
|
||||
width="260"
|
||||
|
||||
@@ -77,18 +77,15 @@ namespace Http
|
||||
end if
|
||||
end if
|
||||
|
||||
registerUrl = "https://www.youtube.com/api/lounge/pairing/register_pairing_code"
|
||||
registerBody = {
|
||||
req = HttpClient.Post("https://www.youtube.com/api/lounge/pairing/register_pairing_code", "")
|
||||
req.UrlEncodedForm({
|
||||
"app": "Playlet"
|
||||
"pairing_code": pairingCode
|
||||
"screen_id": m.loungeService.screenId
|
||||
"screen_name": m.deviceName
|
||||
"device_id": m.deviceId
|
||||
}
|
||||
})
|
||||
|
||||
body = UrlUtils.GetUrlEncodedForm(registerBody)
|
||||
req = HttpClient.Post(registerUrl, body)
|
||||
req.Header("Content-Type", "application/x-www-form-urlencoded")
|
||||
res = req.Await()
|
||||
|
||||
if not res.IsSuccess()
|
||||
|
||||
@@ -17,4 +17,9 @@
|
||||
"Don't forget to like and subscribe...",
|
||||
"Shoveling coal into the server...",
|
||||
"Counting down from infinity...",
|
||||
"Unfortunately, the internet is closed today...",
|
||||
"Unfortunately, we have no ads to show you...",
|
||||
"Looking for the remote...",
|
||||
"Finding that song that goes 'La la lala la'...",
|
||||
"Waiting for the spinny thing to finish...",
|
||||
]
|
||||
|
After Width: | Height: | Size: 7.3 KiB |
|
After Width: | Height: | Size: 7.3 KiB |
|
Before Width: | Height: | Size: 292 B After Width: | Height: | Size: 292 B |
|
After Width: | Height: | Size: 1017 B |
|
Before Width: | Height: | Size: 1.1 KiB |
@@ -3,7 +3,7 @@ title=PlayletLib
|
||||
# Do not update version manually, it is auto updated from package.json
|
||||
major_version=0
|
||||
minor_version=20
|
||||
build_version=00000
|
||||
build_version=00002
|
||||
|
||||
ui_resolutions=hd
|
||||
|
||||
|
||||
@@ -211,6 +211,12 @@ namespace HttpClient
|
||||
return m
|
||||
end function
|
||||
|
||||
function UrlEncodedForm(form as object) as HttpRequest
|
||||
m.Body(UrlUtils.GetUrlEncodedForm(form))
|
||||
m.Header("Content-Type", "application/x-www-form-urlencoded")
|
||||
return m
|
||||
end function
|
||||
|
||||
function TimeoutSeconds(timeoutSeconds as integer) as HttpRequest
|
||||
m._timeoutSeconds = timeoutSeconds
|
||||
return m
|
||||
|
||||
@@ -1,30 +1,30 @@
|
||||
{
|
||||
"name": "playlet-web",
|
||||
"version": "0.20.0",
|
||||
"version": "0.20.2",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "playlet-web",
|
||||
"version": "0.20.0",
|
||||
"version": "0.20.2",
|
||||
"devDependencies": {
|
||||
"@sveltejs/vite-plugin-svelte": "^3.0.2",
|
||||
"@tailwindcss/typography": "^0.5.10",
|
||||
"@tsconfig/svelte": "^5.0.2",
|
||||
"@vitejs/plugin-legacy": "^5.3.0",
|
||||
"@vitejs/plugin-legacy": "^5.3.1",
|
||||
"autoprefixer": "^10.4.17",
|
||||
"daisyui": "^4.7.2",
|
||||
"dotenv": "^16.4.4",
|
||||
"ip": "^1.1.8",
|
||||
"dotenv": "^16.4.5",
|
||||
"ip": "^2.0.1",
|
||||
"postcss": "^8.4.35",
|
||||
"svelte": "^4.2.11",
|
||||
"svelte": "^4.2.12",
|
||||
"svelte-check": "^3.6.4",
|
||||
"svelte-preprocess": "^5.1.3",
|
||||
"tailwindcss": "^3.4.1",
|
||||
"terser": "^5.27.1",
|
||||
"terser": "^5.28.1",
|
||||
"tslib": "^2.6.2",
|
||||
"typescript": "^5.3.3",
|
||||
"vite": "^5.1.3",
|
||||
"vite": "^5.1.4",
|
||||
"vite-tsconfig-paths": "^4.3.1"
|
||||
}
|
||||
},
|
||||
@@ -1716,6 +1716,23 @@
|
||||
"node": ">=4"
|
||||
}
|
||||
},
|
||||
"node_modules/@esbuild/aix-ppc64": {
|
||||
"version": "0.20.1",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.20.1.tgz",
|
||||
"integrity": "sha512-m55cpeupQ2DbuRGQMMZDzbv9J9PgVelPjlcmM5kxHnrBdBx6REaEd7LamYV7Dm8N7rCyR/XwU6rVP8ploKtIkA==",
|
||||
"cpu": [
|
||||
"ppc64"
|
||||
],
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"os": [
|
||||
"aix"
|
||||
],
|
||||
"peer": true,
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
}
|
||||
},
|
||||
"node_modules/@esbuild/android-arm": {
|
||||
"version": "0.19.6",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.19.6.tgz",
|
||||
@@ -2390,17 +2407,17 @@
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/@vitejs/plugin-legacy": {
|
||||
"version": "5.3.0",
|
||||
"resolved": "https://registry.npmjs.org/@vitejs/plugin-legacy/-/plugin-legacy-5.3.0.tgz",
|
||||
"integrity": "sha512-BhW+WcJmEgW5G/1UQRiVQ7wz9/ZPnxqzExT9n0zAk4RlqQQ/26udIeXzdU8+03AGnaF61wmZlCspexgEnxFWMA==",
|
||||
"version": "5.3.1",
|
||||
"resolved": "https://registry.npmjs.org/@vitejs/plugin-legacy/-/plugin-legacy-5.3.1.tgz",
|
||||
"integrity": "sha512-ymCuZo8Bu7gSO85I3E/3SNnaQ64gFdVpTqxqhl8YeasJChDxN8D3IKYByC+AsxwoeO2AE59wy4PPILM/A03TIQ==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@babel/core": "^7.23.7",
|
||||
"@babel/preset-env": "^7.23.8",
|
||||
"browserslist": "^4.22.2",
|
||||
"core-js": "^3.35.0",
|
||||
"esbuild-plugin-browserslist": "^0.10.0",
|
||||
"magic-string": "^0.30.5",
|
||||
"@babel/core": "^7.23.9",
|
||||
"@babel/preset-env": "^7.23.9",
|
||||
"browserslist": "^4.23.0",
|
||||
"core-js": "^3.36.0",
|
||||
"esbuild-plugin-browserslist": "^0.11.1",
|
||||
"magic-string": "^0.30.7",
|
||||
"regenerator-runtime": "^0.14.1",
|
||||
"systemjs": "^6.14.3"
|
||||
},
|
||||
@@ -2415,6 +2432,436 @@
|
||||
"vite": "^5.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@vitejs/plugin-legacy/node_modules/@esbuild/android-arm": {
|
||||
"version": "0.20.1",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.20.1.tgz",
|
||||
"integrity": "sha512-4j0+G27/2ZXGWR5okcJi7pQYhmkVgb4D7UKwxcqrjhvp5TKWx3cUjgB1CGj1mfdmJBQ9VnUGgUhign+FPF2Zgw==",
|
||||
"cpu": [
|
||||
"arm"
|
||||
],
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"os": [
|
||||
"android"
|
||||
],
|
||||
"peer": true,
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
}
|
||||
},
|
||||
"node_modules/@vitejs/plugin-legacy/node_modules/@esbuild/android-arm64": {
|
||||
"version": "0.20.1",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.20.1.tgz",
|
||||
"integrity": "sha512-hCnXNF0HM6AjowP+Zou0ZJMWWa1VkD77BXe959zERgGJBBxB+sV+J9f/rcjeg2c5bsukD/n17RKWXGFCO5dD5A==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"os": [
|
||||
"android"
|
||||
],
|
||||
"peer": true,
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
}
|
||||
},
|
||||
"node_modules/@vitejs/plugin-legacy/node_modules/@esbuild/android-x64": {
|
||||
"version": "0.20.1",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.20.1.tgz",
|
||||
"integrity": "sha512-MSfZMBoAsnhpS+2yMFYIQUPs8Z19ajwfuaSZx+tSl09xrHZCjbeXXMsUF/0oq7ojxYEpsSo4c0SfjxOYXRbpaA==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"os": [
|
||||
"android"
|
||||
],
|
||||
"peer": true,
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
}
|
||||
},
|
||||
"node_modules/@vitejs/plugin-legacy/node_modules/@esbuild/darwin-arm64": {
|
||||
"version": "0.20.1",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.20.1.tgz",
|
||||
"integrity": "sha512-Ylk6rzgMD8klUklGPzS414UQLa5NPXZD5tf8JmQU8GQrj6BrFA/Ic9tb2zRe1kOZyCbGl+e8VMbDRazCEBqPvA==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"os": [
|
||||
"darwin"
|
||||
],
|
||||
"peer": true,
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
}
|
||||
},
|
||||
"node_modules/@vitejs/plugin-legacy/node_modules/@esbuild/darwin-x64": {
|
||||
"version": "0.20.1",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.20.1.tgz",
|
||||
"integrity": "sha512-pFIfj7U2w5sMp52wTY1XVOdoxw+GDwy9FsK3OFz4BpMAjvZVs0dT1VXs8aQm22nhwoIWUmIRaE+4xow8xfIDZA==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"os": [
|
||||
"darwin"
|
||||
],
|
||||
"peer": true,
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
}
|
||||
},
|
||||
"node_modules/@vitejs/plugin-legacy/node_modules/@esbuild/freebsd-arm64": {
|
||||
"version": "0.20.1",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.20.1.tgz",
|
||||
"integrity": "sha512-UyW1WZvHDuM4xDz0jWun4qtQFauNdXjXOtIy7SYdf7pbxSWWVlqhnR/T2TpX6LX5NI62spt0a3ldIIEkPM6RHw==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"os": [
|
||||
"freebsd"
|
||||
],
|
||||
"peer": true,
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
}
|
||||
},
|
||||
"node_modules/@vitejs/plugin-legacy/node_modules/@esbuild/freebsd-x64": {
|
||||
"version": "0.20.1",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.20.1.tgz",
|
||||
"integrity": "sha512-itPwCw5C+Jh/c624vcDd9kRCCZVpzpQn8dtwoYIt2TJF3S9xJLiRohnnNrKwREvcZYx0n8sCSbvGH349XkcQeg==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"os": [
|
||||
"freebsd"
|
||||
],
|
||||
"peer": true,
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
}
|
||||
},
|
||||
"node_modules/@vitejs/plugin-legacy/node_modules/@esbuild/linux-arm": {
|
||||
"version": "0.20.1",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.20.1.tgz",
|
||||
"integrity": "sha512-LojC28v3+IhIbfQ+Vu4Ut5n3wKcgTu6POKIHN9Wpt0HnfgUGlBuyDDQR4jWZUZFyYLiz4RBBBmfU6sNfn6RhLw==",
|
||||
"cpu": [
|
||||
"arm"
|
||||
],
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"os": [
|
||||
"linux"
|
||||
],
|
||||
"peer": true,
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
}
|
||||
},
|
||||
"node_modules/@vitejs/plugin-legacy/node_modules/@esbuild/linux-arm64": {
|
||||
"version": "0.20.1",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.20.1.tgz",
|
||||
"integrity": "sha512-cX8WdlF6Cnvw/DO9/X7XLH2J6CkBnz7Twjpk56cshk9sjYVcuh4sXQBy5bmTwzBjNVZze2yaV1vtcJS04LbN8w==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"os": [
|
||||
"linux"
|
||||
],
|
||||
"peer": true,
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
}
|
||||
},
|
||||
"node_modules/@vitejs/plugin-legacy/node_modules/@esbuild/linux-ia32": {
|
||||
"version": "0.20.1",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.20.1.tgz",
|
||||
"integrity": "sha512-4H/sQCy1mnnGkUt/xszaLlYJVTz3W9ep52xEefGtd6yXDQbz/5fZE5dFLUgsPdbUOQANcVUa5iO6g3nyy5BJiw==",
|
||||
"cpu": [
|
||||
"ia32"
|
||||
],
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"os": [
|
||||
"linux"
|
||||
],
|
||||
"peer": true,
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
}
|
||||
},
|
||||
"node_modules/@vitejs/plugin-legacy/node_modules/@esbuild/linux-loong64": {
|
||||
"version": "0.20.1",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.20.1.tgz",
|
||||
"integrity": "sha512-c0jgtB+sRHCciVXlyjDcWb2FUuzlGVRwGXgI+3WqKOIuoo8AmZAddzeOHeYLtD+dmtHw3B4Xo9wAUdjlfW5yYA==",
|
||||
"cpu": [
|
||||
"loong64"
|
||||
],
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"os": [
|
||||
"linux"
|
||||
],
|
||||
"peer": true,
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
}
|
||||
},
|
||||
"node_modules/@vitejs/plugin-legacy/node_modules/@esbuild/linux-mips64el": {
|
||||
"version": "0.20.1",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.20.1.tgz",
|
||||
"integrity": "sha512-TgFyCfIxSujyuqdZKDZ3yTwWiGv+KnlOeXXitCQ+trDODJ+ZtGOzLkSWngynP0HZnTsDyBbPy7GWVXWaEl6lhA==",
|
||||
"cpu": [
|
||||
"mips64el"
|
||||
],
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"os": [
|
||||
"linux"
|
||||
],
|
||||
"peer": true,
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
}
|
||||
},
|
||||
"node_modules/@vitejs/plugin-legacy/node_modules/@esbuild/linux-ppc64": {
|
||||
"version": "0.20.1",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.20.1.tgz",
|
||||
"integrity": "sha512-b+yuD1IUeL+Y93PmFZDZFIElwbmFfIKLKlYI8M6tRyzE6u7oEP7onGk0vZRh8wfVGC2dZoy0EqX1V8qok4qHaw==",
|
||||
"cpu": [
|
||||
"ppc64"
|
||||
],
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"os": [
|
||||
"linux"
|
||||
],
|
||||
"peer": true,
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
}
|
||||
},
|
||||
"node_modules/@vitejs/plugin-legacy/node_modules/@esbuild/linux-riscv64": {
|
||||
"version": "0.20.1",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.20.1.tgz",
|
||||
"integrity": "sha512-wpDlpE0oRKZwX+GfomcALcouqjjV8MIX8DyTrxfyCfXxoKQSDm45CZr9fanJ4F6ckD4yDEPT98SrjvLwIqUCgg==",
|
||||
"cpu": [
|
||||
"riscv64"
|
||||
],
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"os": [
|
||||
"linux"
|
||||
],
|
||||
"peer": true,
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
}
|
||||
},
|
||||
"node_modules/@vitejs/plugin-legacy/node_modules/@esbuild/linux-s390x": {
|
||||
"version": "0.20.1",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.20.1.tgz",
|
||||
"integrity": "sha512-5BepC2Au80EohQ2dBpyTquqGCES7++p7G+7lXe1bAIvMdXm4YYcEfZtQrP4gaoZ96Wv1Ute61CEHFU7h4FMueQ==",
|
||||
"cpu": [
|
||||
"s390x"
|
||||
],
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"os": [
|
||||
"linux"
|
||||
],
|
||||
"peer": true,
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
}
|
||||
},
|
||||
"node_modules/@vitejs/plugin-legacy/node_modules/@esbuild/linux-x64": {
|
||||
"version": "0.20.1",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.20.1.tgz",
|
||||
"integrity": "sha512-5gRPk7pKuaIB+tmH+yKd2aQTRpqlf1E4f/mC+tawIm/CGJemZcHZpp2ic8oD83nKgUPMEd0fNanrnFljiruuyA==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"os": [
|
||||
"linux"
|
||||
],
|
||||
"peer": true,
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
}
|
||||
},
|
||||
"node_modules/@vitejs/plugin-legacy/node_modules/@esbuild/netbsd-x64": {
|
||||
"version": "0.20.1",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.20.1.tgz",
|
||||
"integrity": "sha512-4fL68JdrLV2nVW2AaWZBv3XEm3Ae3NZn/7qy2KGAt3dexAgSVT+Hc97JKSZnqezgMlv9x6KV0ZkZY7UO5cNLCg==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"os": [
|
||||
"netbsd"
|
||||
],
|
||||
"peer": true,
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
}
|
||||
},
|
||||
"node_modules/@vitejs/plugin-legacy/node_modules/@esbuild/openbsd-x64": {
|
||||
"version": "0.20.1",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.20.1.tgz",
|
||||
"integrity": "sha512-GhRuXlvRE+twf2ES+8REbeCb/zeikNqwD3+6S5y5/x+DYbAQUNl0HNBs4RQJqrechS4v4MruEr8ZtAin/hK5iw==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"os": [
|
||||
"openbsd"
|
||||
],
|
||||
"peer": true,
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
}
|
||||
},
|
||||
"node_modules/@vitejs/plugin-legacy/node_modules/@esbuild/sunos-x64": {
|
||||
"version": "0.20.1",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.20.1.tgz",
|
||||
"integrity": "sha512-ZnWEyCM0G1Ex6JtsygvC3KUUrlDXqOihw8RicRuQAzw+c4f1D66YlPNNV3rkjVW90zXVsHwZYWbJh3v+oQFM9Q==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"os": [
|
||||
"sunos"
|
||||
],
|
||||
"peer": true,
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
}
|
||||
},
|
||||
"node_modules/@vitejs/plugin-legacy/node_modules/@esbuild/win32-arm64": {
|
||||
"version": "0.20.1",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.20.1.tgz",
|
||||
"integrity": "sha512-QZ6gXue0vVQY2Oon9WyLFCdSuYbXSoxaZrPuJ4c20j6ICedfsDilNPYfHLlMH7vGfU5DQR0czHLmJvH4Nzis/A==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"os": [
|
||||
"win32"
|
||||
],
|
||||
"peer": true,
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
}
|
||||
},
|
||||
"node_modules/@vitejs/plugin-legacy/node_modules/@esbuild/win32-ia32": {
|
||||
"version": "0.20.1",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.20.1.tgz",
|
||||
"integrity": "sha512-HzcJa1NcSWTAU0MJIxOho8JftNp9YALui3o+Ny7hCh0v5f90nprly1U3Sj1Ldj/CvKKdvvFsCRvDkpsEMp4DNw==",
|
||||
"cpu": [
|
||||
"ia32"
|
||||
],
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"os": [
|
||||
"win32"
|
||||
],
|
||||
"peer": true,
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
}
|
||||
},
|
||||
"node_modules/@vitejs/plugin-legacy/node_modules/@esbuild/win32-x64": {
|
||||
"version": "0.20.1",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.20.1.tgz",
|
||||
"integrity": "sha512-0MBh53o6XtI6ctDnRMeQ+xoCN8kD2qI1rY1KgF/xdWQwoFeKou7puvDfV8/Wv4Ctx2rRpET/gGdz3YlNtNACSA==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"os": [
|
||||
"win32"
|
||||
],
|
||||
"peer": true,
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
}
|
||||
},
|
||||
"node_modules/@vitejs/plugin-legacy/node_modules/esbuild": {
|
||||
"version": "0.20.1",
|
||||
"resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.20.1.tgz",
|
||||
"integrity": "sha512-OJwEgrpWm/PCMsLVWXKqvcjme3bHNpOgN7Tb6cQnR5n0TPbQx1/Xrn7rqM+wn17bYeT6MGB5sn1Bh5YiGi70nA==",
|
||||
"dev": true,
|
||||
"hasInstallScript": true,
|
||||
"peer": true,
|
||||
"bin": {
|
||||
"esbuild": "bin/esbuild"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"@esbuild/aix-ppc64": "0.20.1",
|
||||
"@esbuild/android-arm": "0.20.1",
|
||||
"@esbuild/android-arm64": "0.20.1",
|
||||
"@esbuild/android-x64": "0.20.1",
|
||||
"@esbuild/darwin-arm64": "0.20.1",
|
||||
"@esbuild/darwin-x64": "0.20.1",
|
||||
"@esbuild/freebsd-arm64": "0.20.1",
|
||||
"@esbuild/freebsd-x64": "0.20.1",
|
||||
"@esbuild/linux-arm": "0.20.1",
|
||||
"@esbuild/linux-arm64": "0.20.1",
|
||||
"@esbuild/linux-ia32": "0.20.1",
|
||||
"@esbuild/linux-loong64": "0.20.1",
|
||||
"@esbuild/linux-mips64el": "0.20.1",
|
||||
"@esbuild/linux-ppc64": "0.20.1",
|
||||
"@esbuild/linux-riscv64": "0.20.1",
|
||||
"@esbuild/linux-s390x": "0.20.1",
|
||||
"@esbuild/linux-x64": "0.20.1",
|
||||
"@esbuild/netbsd-x64": "0.20.1",
|
||||
"@esbuild/openbsd-x64": "0.20.1",
|
||||
"@esbuild/sunos-x64": "0.20.1",
|
||||
"@esbuild/win32-arm64": "0.20.1",
|
||||
"@esbuild/win32-ia32": "0.20.1",
|
||||
"@esbuild/win32-x64": "0.20.1"
|
||||
}
|
||||
},
|
||||
"node_modules/@vitejs/plugin-legacy/node_modules/esbuild-plugin-browserslist": {
|
||||
"version": "0.11.1",
|
||||
"resolved": "https://registry.npmjs.org/esbuild-plugin-browserslist/-/esbuild-plugin-browserslist-0.11.1.tgz",
|
||||
"integrity": "sha512-yNdZRdDBEbm0PT4q2bJBhXvnwakXG5mG8ipiwGe5SRDPnKa7L7kQm2tHuBMowBtcFz6kRtZTv5njK7PJwU+tCQ==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"debug": "^4.3.4",
|
||||
"zod": "^3.21.4"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=18"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"browserslist": "^4.21.8",
|
||||
"esbuild": "~0.20.0"
|
||||
}
|
||||
},
|
||||
"node_modules/acorn": {
|
||||
"version": "8.11.2",
|
||||
"resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.2.tgz",
|
||||
@@ -2596,9 +3043,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/browserslist": {
|
||||
"version": "4.22.2",
|
||||
"resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.22.2.tgz",
|
||||
"integrity": "sha512-0UgcrvQmBDvZHFGdYUehrCNIazki7/lUP3kkoi/r3YB2amZbFM9J43ZRkJTXBUZK4gmx56+Sqk9+Vs9mwZx9+A==",
|
||||
"version": "4.23.0",
|
||||
"resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.23.0.tgz",
|
||||
"integrity": "sha512-QW8HiM1shhT2GuzkvklfjcKDiWFXHOeFCIA/huJPwHsslwcydgk7X+z2zXpEijP98UCY7HbubZt5J2Zgvf0CaQ==",
|
||||
"dev": true,
|
||||
"funding": [
|
||||
{
|
||||
@@ -2615,8 +3062,8 @@
|
||||
}
|
||||
],
|
||||
"dependencies": {
|
||||
"caniuse-lite": "^1.0.30001565",
|
||||
"electron-to-chromium": "^1.4.601",
|
||||
"caniuse-lite": "^1.0.30001587",
|
||||
"electron-to-chromium": "^1.4.668",
|
||||
"node-releases": "^2.0.14",
|
||||
"update-browserslist-db": "^1.0.13"
|
||||
},
|
||||
@@ -2661,9 +3108,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/caniuse-lite": {
|
||||
"version": "1.0.30001579",
|
||||
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001579.tgz",
|
||||
"integrity": "sha512-u5AUVkixruKHJjw/pj9wISlcMpgFWzSrczLZbrqBSxukQixmg0SJ5sZTpvaFvxU0HoQKd4yoyAogyrAz9pzJnA==",
|
||||
"version": "1.0.30001589",
|
||||
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001589.tgz",
|
||||
"integrity": "sha512-vNQWS6kI+q6sBlHbh71IIeC+sRwK2N3EDySc/updIGhIee2x5z00J4c1242/5/d6EpEMdOnk/m+6tuk4/tcsqg==",
|
||||
"dev": true,
|
||||
"funding": [
|
||||
{
|
||||
@@ -2771,9 +3218,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/core-js": {
|
||||
"version": "3.35.1",
|
||||
"resolved": "https://registry.npmjs.org/core-js/-/core-js-3.35.1.tgz",
|
||||
"integrity": "sha512-IgdsbxNyMskrTFxa9lWHyMwAJU5gXOPP+1yO+K59d50VLVAIDAbs7gIv705KzALModfK3ZrSZTPNpC0PQgIZuw==",
|
||||
"version": "3.36.0",
|
||||
"resolved": "https://registry.npmjs.org/core-js/-/core-js-3.36.0.tgz",
|
||||
"integrity": "sha512-mt7+TUBbTFg5+GngsAxeKBTl5/VS0guFeJacYge9OmHb+m058UwwIm41SE9T4Den7ClatV57B6TYTuJ0CX1MAw==",
|
||||
"dev": true,
|
||||
"hasInstallScript": true,
|
||||
"funding": {
|
||||
@@ -2914,9 +3361,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/dotenv": {
|
||||
"version": "16.4.4",
|
||||
"resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.4.4.tgz",
|
||||
"integrity": "sha512-XvPXc8XAQThSjAbY6cQ/9PcBXmFoWuw1sQ3b8HqUCR6ziGXjkTi//kB9SWa2UwqlgdAIuRqAa/9hVljzPehbYg==",
|
||||
"version": "16.4.5",
|
||||
"resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.4.5.tgz",
|
||||
"integrity": "sha512-ZmdL2rui+eB2YwhsWzjInR8LldtZHGDoQ1ugH85ppHKwpUHL7j7rN0Ti9NCnGiQbhaZ11FpR+7ao1dNsmduNUg==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
@@ -2926,9 +3373,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/electron-to-chromium": {
|
||||
"version": "1.4.614",
|
||||
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.614.tgz",
|
||||
"integrity": "sha512-X4ze/9Sc3QWs6h92yerwqv7aB/uU8vCjZcrMjA8N9R1pjMFRe44dLsck5FzLilOYvcXuDn93B+bpGYyufc70gQ==",
|
||||
"version": "1.4.681",
|
||||
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.681.tgz",
|
||||
"integrity": "sha512-1PpuqJUFWoXZ1E54m8bsLPVYwIVCRzvaL+n5cjigGga4z854abDnFRc+cTa2th4S79kyGqya/1xoR7h+Y5G5lg==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/es6-promise": {
|
||||
@@ -2974,23 +3421,6 @@
|
||||
"@esbuild/win32-x64": "0.19.6"
|
||||
}
|
||||
},
|
||||
"node_modules/esbuild-plugin-browserslist": {
|
||||
"version": "0.10.0",
|
||||
"resolved": "https://registry.npmjs.org/esbuild-plugin-browserslist/-/esbuild-plugin-browserslist-0.10.0.tgz",
|
||||
"integrity": "sha512-rZWFcp3l+73xDiJB+Vl9UqP1VVs+L4E0lygbwJl6UTmW2qQago7DLT56hBu0vocH/TtZsAcRHj0+qHqkkB5Gww==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"debug": "^4.3.4",
|
||||
"zod": "^3.21.4"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=18"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"browserslist": "^4.21.8",
|
||||
"esbuild": "~0.19.2"
|
||||
}
|
||||
},
|
||||
"node_modules/escalade": {
|
||||
"version": "3.1.1",
|
||||
"resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz",
|
||||
@@ -3228,9 +3658,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/ip": {
|
||||
"version": "1.1.8",
|
||||
"resolved": "https://registry.npmjs.org/ip/-/ip-1.1.8.tgz",
|
||||
"integrity": "sha512-PuExPYUiu6qMBQb4l06ecm6T6ujzhmh+MeJcW9wa89PoAz5pvd4zPgN5WJV104mb6S2T1AwNIAaB70JNrLQWhg==",
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/ip/-/ip-2.0.1.tgz",
|
||||
"integrity": "sha512-lJUL9imLTNi1ZfXT+DU6rBBdbiKGBuay9B6xGSPVjUeQwaH1RIGqef8RZkUtHioLmSNpPR5M4HVKJGm1j8FWVQ==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/is-binary-path": {
|
||||
@@ -3399,9 +3829,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/magic-string": {
|
||||
"version": "0.30.5",
|
||||
"resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.5.tgz",
|
||||
"integrity": "sha512-7xlpfBaQaP/T6Vh8MO/EqXSW5En6INHEvEXQiuff7Gku0PWjU3uf6w/j9o7O+SpB5fOAkrI5HeoNgwjEO0pFsA==",
|
||||
"version": "0.30.7",
|
||||
"resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.7.tgz",
|
||||
"integrity": "sha512-8vBuFF/I/+OSLRmdf2wwFCJCz+nSn0m6DPvGH1fS/KiQoSaR+sETbov0eIk9KhEKy8CYqIkIAnbohxT/4H0kuA==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@jridgewell/sourcemap-codec": "^1.4.15"
|
||||
@@ -4174,9 +4604,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/svelte": {
|
||||
"version": "4.2.11",
|
||||
"resolved": "https://registry.npmjs.org/svelte/-/svelte-4.2.11.tgz",
|
||||
"integrity": "sha512-YIQk3J4X89wOLhjsqIW8tqY3JHPuBdtdOIkASP2PZeAMcSW9RsIjQzMesCrxOF3gdWYC0mKknlKF7OqmLM+Zqg==",
|
||||
"version": "4.2.12",
|
||||
"resolved": "https://registry.npmjs.org/svelte/-/svelte-4.2.12.tgz",
|
||||
"integrity": "sha512-d8+wsh5TfPwqVzbm4/HCXC783/KPHV60NvwitJnyTA5lWn1elhXMNWhXGCJ7PwPa8qFUnyJNIyuIRt2mT0WMug==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@ampproject/remapping": "^2.2.1",
|
||||
@@ -4364,9 +4794,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/terser": {
|
||||
"version": "5.27.1",
|
||||
"resolved": "https://registry.npmjs.org/terser/-/terser-5.27.1.tgz",
|
||||
"integrity": "sha512-29wAr6UU/oQpnTw5HoadwjUZnFQXGdOfj0LjZ4sVxzqwHh/QVkvr7m8y9WoR4iN3FRitVduTc6KdjcW38Npsug==",
|
||||
"version": "5.28.1",
|
||||
"resolved": "https://registry.npmjs.org/terser/-/terser-5.28.1.tgz",
|
||||
"integrity": "sha512-wM+bZp54v/E9eRRGXb5ZFDvinrJIOaTapx3WUokyVGZu5ucVCK55zEgGd5Dl2fSr3jUo5sDiERErUWLY6QPFyA==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@jridgewell/source-map": "^0.3.3",
|
||||
@@ -4542,9 +4972,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/vite": {
|
||||
"version": "5.1.3",
|
||||
"resolved": "https://registry.npmjs.org/vite/-/vite-5.1.3.tgz",
|
||||
"integrity": "sha512-UfmUD36DKkqhi/F75RrxvPpry+9+tTkrXfMNZD+SboZqBCMsxKtO52XeGzzuh7ioz+Eo/SYDBbdb0Z7vgcDJew==",
|
||||
"version": "5.1.4",
|
||||
"resolved": "https://registry.npmjs.org/vite/-/vite-5.1.4.tgz",
|
||||
"integrity": "sha512-n+MPqzq+d9nMVTKyewqw6kSt+R3CkvF9QAKY8obiQn8g1fwTscKxyfaYnC632HtBXAQGc1Yjomphwn1dtwGAHg==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"esbuild": "^0.19.3",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "playlet-web",
|
||||
"version": "0.20.0",
|
||||
"version": "0.20.2",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
@@ -12,20 +12,20 @@
|
||||
"@sveltejs/vite-plugin-svelte": "^3.0.2",
|
||||
"@tailwindcss/typography": "^0.5.10",
|
||||
"@tsconfig/svelte": "^5.0.2",
|
||||
"@vitejs/plugin-legacy": "^5.3.0",
|
||||
"@vitejs/plugin-legacy": "^5.3.1",
|
||||
"autoprefixer": "^10.4.17",
|
||||
"daisyui": "^4.7.2",
|
||||
"dotenv": "^16.4.4",
|
||||
"ip": "^1.1.8",
|
||||
"dotenv": "^16.4.5",
|
||||
"ip": "^2.0.1",
|
||||
"postcss": "^8.4.35",
|
||||
"svelte": "^4.2.11",
|
||||
"svelte": "^4.2.12",
|
||||
"svelte-check": "^3.6.4",
|
||||
"svelte-preprocess": "^5.1.3",
|
||||
"tailwindcss": "^3.4.1",
|
||||
"terser": "^5.27.1",
|
||||
"terser": "^5.28.1",
|
||||
"tslib": "^2.6.2",
|
||||
"typescript": "^5.3.3",
|
||||
"vite": "^5.1.3",
|
||||
"vite": "^5.1.4",
|
||||
"vite-tsconfig-paths": "^4.3.1"
|
||||
}
|
||||
}
|
||||
@@ -293,7 +293,7 @@ end sub
|
||||
' RALE_Logger__GetTime - Returns current time
|
||||
' @param {string} message - log message
|
||||
' @return {string} - current time in format: "[hours]:[minutes]:[seconds].[miliseconds]"
|
||||
function RALE_Logger__GetTime(message as String, level as Integer)
|
||||
function RALE_Logger__GetTime(_message as String, _level as Integer)
|
||||
m.dt.Mark()
|
||||
|
||||
h = RALE_Logger__getZeroNumber(m.dt.getHours())
|
||||
@@ -311,7 +311,7 @@ end function
|
||||
' RALE_Logger__GetDate - Returns current date
|
||||
' @param {string} message - log message
|
||||
' @return {string} - current date in format: "[year]-[month]-[day]"
|
||||
function RALE_Logger__GetDate(message as String, level as Integer)
|
||||
function RALE_Logger__GetDate(_message as String, _level as Integer)
|
||||
m.dt.Mark()
|
||||
y = str(m.dt.getYear()).trim()
|
||||
mm = RALE_Logger__getZeroNumber(m.dt.getMonth())
|
||||
@@ -322,14 +322,14 @@ end function
|
||||
' RALE_Logger__GetLevel - Returns current verbosity level
|
||||
' @param {string} message - log message
|
||||
' @return {integer} - verbosity level
|
||||
function RALE_Logger__GetLevel(message as String, level as Integer)
|
||||
function RALE_Logger__GetLevel(_message as String, level as Integer)
|
||||
return m.verbosityList[level]
|
||||
end function
|
||||
|
||||
' RALE_Logger__GetMessage - Returns log message (needed for formating log message)
|
||||
' @param {string} message - log message
|
||||
' @return {string} - log message
|
||||
function RALE_Logger__GetMessage(message as String, level as Integer)
|
||||
function RALE_Logger__GetMessage(message as String, _level as Integer)
|
||||
return message
|
||||
end function
|
||||
|
||||
@@ -658,7 +658,7 @@ End Function
|
||||
' @param {object} handlersMap - map that contains all RALE commands handlers
|
||||
' @param {object} config - configuration constants
|
||||
' @return {string} - connection status
|
||||
Sub SocketConnection_StartConnection(addr, messagePort, port, buffer, handlersMap, config) as String
|
||||
Sub SocketConnection_StartConnection(addr, messagePort, port, _buffer, handlersMap, config) as String
|
||||
connections = {}
|
||||
appManager = createObject("roAppManager")
|
||||
screensaverTimer = CreateObject("roTimespan")
|
||||
@@ -923,7 +923,7 @@ End Sub
|
||||
|
||||
' UIThread_showSelectorView - RALE "showSelectorView" command handler. Shows Selector (Live) View
|
||||
' @param {object} args - command arguments
|
||||
Sub UIThread_showSelectorView(args) as Object
|
||||
Sub UIThread_showSelectorView(_args) as Object
|
||||
m.showSelectorView = true
|
||||
setSelectorView(m.currentNode, type(m.currentNode), m.currentPath)
|
||||
m.logger.debug("Selector View was disabled")
|
||||
@@ -931,7 +931,7 @@ End Sub
|
||||
|
||||
' UIThread_hideSelectorView - RALE "hideSelectorView" command handler. Hides Selector (Live) View
|
||||
' @param {object} args - command arguments
|
||||
Sub UIThread_hideSelectorView(args) as Object
|
||||
Sub UIThread_hideSelectorView(_args) as Object
|
||||
m.showSelectorView = false
|
||||
setSelectorView(m.currentNode, type(m.currentNode), m.currentPath)
|
||||
m.logger.debug("Selector View was enabled")
|
||||
@@ -978,7 +978,7 @@ End Sub
|
||||
' UIThread_updateNode - RALE "updateNode" command handler. Updates selected node
|
||||
' @param {object} args - command arguments
|
||||
' @return {object} - response of command. Contains node path and data (id, type, fields, layout etc.)
|
||||
Sub UIThread_updateNode(args) as Object
|
||||
Sub UIThread_updateNode(_args) as Object
|
||||
return {
|
||||
path: m.currentPath,
|
||||
node: getNodeData(m.currentNode, m.currentPath, Invalid)
|
||||
@@ -1198,7 +1198,7 @@ Sub UIThread_removeField(args) as Object
|
||||
ownerPath.append(m.currentPath)
|
||||
ownerPath.pop()
|
||||
|
||||
owner = setInParentNode(ownerPath, inOwnerField, node)
|
||||
_owner = setInParentNode(ownerPath, inOwnerField, node)
|
||||
end if
|
||||
|
||||
m.logger.debug("Field '" + FW_AsString(field) + "' of selected node was removed")
|
||||
@@ -1227,7 +1227,7 @@ End Sub
|
||||
' UIThread_selectFocusedNode - RALE "selectFocusedNode" command handler. Select focused node
|
||||
' @param {object} args - command arguments
|
||||
' @return {object} - response of command. Contains node path and data (id, type, fields, layout etc.)
|
||||
Sub UIThread_selectFocusedNode(args) as Object
|
||||
Sub UIThread_selectFocusedNode(_args) as Object
|
||||
root = m.top.getScene()
|
||||
node = getFocusedNodeObj(root)
|
||||
if m.currentNode.IsSameNode(node) then
|
||||
@@ -1333,7 +1333,7 @@ Sub UIThread_removeRulerLine(args) as Object
|
||||
End Sub
|
||||
|
||||
' UIThread_removeRulerLine - TBD
|
||||
Sub UIThread_removeAllRulerLines(args) as Object
|
||||
Sub UIThread_removeAllRulerLines(_args) as Object
|
||||
m.guides.removeAllLines()
|
||||
return { success: true }
|
||||
End Sub
|
||||
@@ -1343,12 +1343,12 @@ End Sub
|
||||
'=======================
|
||||
|
||||
' UIThread_getRegistrySections - TBD
|
||||
Sub UIThread_getRegistrySections(args) as Object
|
||||
Sub UIThread_getRegistrySections(_args) as Object
|
||||
return getRegistrySections()
|
||||
End Sub
|
||||
|
||||
' UIThread_addRegistrySection - TBD
|
||||
Sub UIThread_clearRegistry(args) as Object
|
||||
Sub UIThread_clearRegistry(_args) as Object
|
||||
return clearRegistry()
|
||||
End Sub
|
||||
|
||||
@@ -1515,7 +1515,7 @@ Sub getFieldList(node) as Object
|
||||
|
||||
fieldList = {}
|
||||
|
||||
result = 0
|
||||
_result = 0
|
||||
if type(fields) = "roArray" then
|
||||
count = fields.count() - 1
|
||||
for i = 0 to count
|
||||
@@ -1636,7 +1636,7 @@ Sub getNodeById(rootNode, id) as Object
|
||||
return storage.node
|
||||
End Sub
|
||||
|
||||
Sub getNodeByIdCallback(node, index, parentObj, childObj, storage) as Boolean
|
||||
Sub getNodeByIdCallback(node, _index, _parentObj, _childObj, storage) as Boolean
|
||||
|
||||
if node.id = storage.id then
|
||||
storage.node = node
|
||||
@@ -1670,7 +1670,7 @@ Sub getNodeByName(rootNode, name) as Object
|
||||
return storage.node
|
||||
End Sub
|
||||
|
||||
Sub getNodeByNameCallback(node, index, parentObj, childObj, storage) as Boolean
|
||||
Sub getNodeByNameCallback(node, _index, _parentObj, _childObj, storage) as Boolean
|
||||
|
||||
if node.subtype() = storage.name then
|
||||
storage.node = node
|
||||
@@ -1916,7 +1916,7 @@ Function clearRegistry() as Object
|
||||
return { success: true }
|
||||
End Function
|
||||
|
||||
Sub clearRegistryCallback(section, sectionName, storage) as Object
|
||||
Sub clearRegistryCallback(_section, sectionName, _storage) as Object
|
||||
return removeRegistrySection(sectionName)
|
||||
End Sub
|
||||
|
||||
|
||||
@@ -84,7 +84,9 @@ export class LoggerPlugin implements CompilerPlugin {
|
||||
}
|
||||
}
|
||||
|
||||
this.generateLoggingFile(program, usedLogFunctions);
|
||||
// @ts-ignore
|
||||
const isDebug = !!program.options.debug;
|
||||
this.generateLoggingFile(program, usedLogFunctions, isDebug);
|
||||
}
|
||||
|
||||
beforeFileTranspile(event: BeforeFileTranspileEvent<BscFile>) {
|
||||
@@ -133,20 +135,20 @@ export class LoggerPlugin implements CompilerPlugin {
|
||||
}
|
||||
}
|
||||
|
||||
generateLoggingFile(program: Program, usedLogFunctions: Map<string, LogFunction>) {
|
||||
generateLoggingFile(program: Program, usedLogFunctions: Map<string, LogFunction>, isDebug: boolean) {
|
||||
const file = program.getFile(loggingFilePath);
|
||||
let content = file.fileContents;
|
||||
|
||||
content += '\n\' Start of auto-generated functions\n'
|
||||
usedLogFunctions.forEach((logFunction, newFunctionName) => {
|
||||
content += this.generateLoggingFunction(newFunctionName, logFunction.name, logFunction.argCount);
|
||||
content += this.generateLoggingFunction(newFunctionName, logFunction.name, logFunction.argCount, isDebug);
|
||||
});
|
||||
content += '\n\' End of auto-generated functions\n'
|
||||
|
||||
program.setFile(loggingFilePath, content)
|
||||
}
|
||||
|
||||
generateLoggingFunction(newFunctionName: string, level: string, argCount: number) {
|
||||
generateLoggingFunction(newFunctionName: string, level: string, argCount: number, isDebug: boolean) {
|
||||
const args: string[] = [];
|
||||
const argsParams: string[] = [];
|
||||
for (let i = 0; i < argCount; i++) {
|
||||
@@ -160,13 +162,49 @@ export class LoggerPlugin implements CompilerPlugin {
|
||||
|
||||
const func = logFunctions[level as 'LogError' | 'LogWarn' | 'LogInfo' | 'LogDebug'];
|
||||
|
||||
// https://github.com/microsoft/vscode/issues/571
|
||||
const USE_COLOR = false;
|
||||
|
||||
const RED = '[31m';
|
||||
const YELLOW = '[33m';
|
||||
const GREEN = '[32m';
|
||||
const BOLD = '[1m';
|
||||
const BOLD_RED = '[1;31m';
|
||||
const BOLD_YELLOW = '[1;33m';
|
||||
const BOLD_GREEN = '[1;32m';
|
||||
const CLEAR = '[0m';
|
||||
|
||||
let logLine = '';
|
||||
|
||||
if (isDebug && USE_COLOR) {
|
||||
switch (func.stringLevel) {
|
||||
case 'ERROR':
|
||||
logLine = `Chr(27) + "${BOLD_RED}" + "[${func.stringLevel}]" + Chr(27) + "${RED}" + ${msg} + Chr(27) + "${CLEAR}"`;
|
||||
break;
|
||||
case 'WARN':
|
||||
logLine = `Chr(27) + "${BOLD_YELLOW}" + "[${func.stringLevel}]" + Chr(27) + "${YELLOW}" + ${msg} + Chr(27) + "${CLEAR}"`;
|
||||
break;
|
||||
case 'INFO':
|
||||
logLine = `Chr(27) + "${BOLD}" + "[${func.stringLevel}]" + Chr(27) + "${CLEAR}" + ${msg}`;
|
||||
break;
|
||||
case 'DEBUG':
|
||||
logLine = `Chr(27) + "${BOLD_GREEN}" + "[${func.stringLevel}]" + Chr(27) + "${GREEN}" + ${msg} + Chr(27) + "${CLEAR}"`;
|
||||
break;
|
||||
default:
|
||||
throw new Error(`Unknown log level: ${func.stringLevel}`);
|
||||
}
|
||||
}
|
||||
else {
|
||||
logLine = `"[${func.stringLevel}]" + ${msg}`
|
||||
}
|
||||
|
||||
return `
|
||||
function ${newFunctionName}(${args.join(', ')}) as void
|
||||
logger = m.global.logger
|
||||
if logger.logLevel < ${func.level}
|
||||
return
|
||||
end if
|
||||
logger.logLine = "[${func.stringLevel}]" + ${msg}
|
||||
logger.logLine = ${logLine}
|
||||
end function
|
||||
`;
|
||||
}
|
||||
|
||||
@@ -38,19 +38,28 @@ const getEnvVars = require('./get-env-vars');
|
||||
}
|
||||
}
|
||||
|
||||
await fetch(playletServer, {
|
||||
const response = await fetch(playletServer, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
},
|
||||
body: JSON.stringify(registry),
|
||||
});
|
||||
|
||||
if (!response.ok) {
|
||||
throw new Error(`Failed to write registry: ${response.status} ${response.statusText}`);
|
||||
}
|
||||
}
|
||||
else if (output) {
|
||||
if (fs.existsSync(output)) {
|
||||
throw new Error(`File "${output}" already exists`);
|
||||
}
|
||||
const response = await fetch(playletServer);
|
||||
|
||||
if (!response.ok) {
|
||||
throw new Error(`Failed to read registry: ${response.status} ${response.statusText}`);
|
||||
}
|
||||
|
||||
const registry = await response.json();
|
||||
|
||||
for (const section in registry) {
|
||||
@@ -64,9 +73,13 @@ const getEnvVars = require('./get-env-vars');
|
||||
fs.writeFileSync(output, JSON.stringify(registry, null, 4));
|
||||
}
|
||||
else if (clear) {
|
||||
await fetch(playletServer, {
|
||||
const response = await fetch(playletServer, {
|
||||
method: 'DELETE',
|
||||
});
|
||||
|
||||
if (!response.ok) {
|
||||
throw new Error(`Failed to clear registry: ${response.status} ${response.statusText}`);
|
||||
}
|
||||
}
|
||||
else {
|
||||
console.error('No action specified');
|
||||
|
||||