1 parent
deeed05383
commit
e8fd7ee35d
13 files changed
+61
-27
No files matched your search
@@ -11,6 +11,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
|
|
||||||
- Support to pause/play while picture-in-picture
|
- Support to pause/play while picture-in-picture
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- (potentionally) a bug where many dialogs could cause an execution timeout
|
||||||
|
- Mutltiple rare crashes when component content is set before component initialization
|
||||||
|
|
||||||
## [0.13.0] - 2023-10-02
|
## [0.13.0] - 2023-10-02
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|||||||
@@ -27,7 +27,8 @@
|
|||||||
id="thumbnail"
|
id="thumbnail"
|
||||||
width="100"
|
width="100"
|
||||||
height="100"
|
height="100"
|
||||||
translation="[2,2]" />
|
translation="[2,2]"
|
||||||
|
failedBitmapUri="pkg:/images/thumbnail-missing.jpg" />
|
||||||
|
|
||||||
<Label
|
<Label
|
||||||
id="authorLabel"
|
id="authorLabel"
|
||||||
|
|||||||
@@ -4,11 +4,10 @@ function Init()
|
|||||||
end function
|
end function
|
||||||
|
|
||||||
function UpdateMaskSize()
|
function UpdateMaskSize()
|
||||||
width = m.top.poster.width
|
width = m.top.width
|
||||||
height = m.top.poster.height
|
height = m.top.height
|
||||||
|
|
||||||
maskSize = [width * GetScaleFactor(), height * GetScaleFactor()]
|
m.top.maskSize = [width * GetScaleFactor(), height * GetScaleFactor()]
|
||||||
m.top.maskGroup.maskSize = maskSize
|
|
||||||
end function
|
end function
|
||||||
|
|
||||||
' MaskGroup component do not scale with with UI resolution
|
' MaskGroup component do not scale with with UI resolution
|
||||||
|
|||||||
@@ -11,6 +11,7 @@
|
|||||||
<field id="loadStatus" type="string" alias="Poster.loadStatus" />
|
<field id="loadStatus" type="string" alias="Poster.loadStatus" />
|
||||||
|
|
||||||
<field id="maskUri" type="uri" value="pkg:/images/circle-mask-500.png" alias="MaskGroup.maskuri" />
|
<field id="maskUri" type="uri" value="pkg:/images/circle-mask-500.png" alias="MaskGroup.maskuri" />
|
||||||
|
<field id="maskSize" type="vector2d" alias="MaskGroup.maskSize" />
|
||||||
</interface>
|
</interface>
|
||||||
<children>
|
<children>
|
||||||
<MaskGroup
|
<MaskGroup
|
||||||
|
|||||||
@@ -12,9 +12,12 @@ namespace DialogUtils
|
|||||||
dialog.title = title
|
dialog.title = title
|
||||||
dialog.buttons = buttons
|
dialog.buttons = buttons
|
||||||
if large
|
if large
|
||||||
deviceInfo = CreateObject("roDeviceInfo")
|
if m._deviceDisplayWidth = invalid
|
||||||
displaySize = deviceInfo.GetDisplaySize()
|
deviceInfo = CreateObject("roDeviceInfo")
|
||||||
dialog.width = displaySize.w - 100
|
displaySize = deviceInfo.GetDisplaySize()
|
||||||
|
m._deviceDisplayWidth = displaySize.w
|
||||||
|
end if
|
||||||
|
dialog.width = m._deviceDisplayWidth - 100
|
||||||
end if
|
end if
|
||||||
m.top.getScene().dialog = dialog
|
m.top.getScene().dialog = dialog
|
||||||
return dialog
|
return dialog
|
||||||
|
|||||||
@@ -16,6 +16,7 @@
|
|||||||
<script type="text/brightscript" uri="pkg:/source/utils/StringUtils.brs" />
|
<script type="text/brightscript" uri="pkg:/source/utils/StringUtils.brs" />
|
||||||
<script type="text/brightscript" uri="pkg:/components/VideoPlayer/VideoUtils.brs" />
|
<script type="text/brightscript" uri="pkg:/components/VideoPlayer/VideoUtils.brs" />
|
||||||
<script type="text/brightscript" uri="pkg:/source/utils/FocusManagement.brs" />
|
<script type="text/brightscript" uri="pkg:/source/utils/FocusManagement.brs" />
|
||||||
|
<script type="text/brightscript" uri="pkg:/components/Dialog/DialogUtils.brs" />
|
||||||
<script type="text/brightscript" uri="pkg:/source/bslib.brs" />
|
<script type="text/brightscript" uri="pkg:/source/bslib.brs" />
|
||||||
<children>
|
<children>
|
||||||
<AppController id="AppController">
|
<AppController id="AppController">
|
||||||
|
|||||||
@@ -2,13 +2,15 @@ import "pkg:/source/utils/TimeUtils.bs"
|
|||||||
import "pkg:/source/utils/Types.bs"
|
import "pkg:/source/utils/Types.bs"
|
||||||
|
|
||||||
function Init()
|
function Init()
|
||||||
|
FindChildren()
|
||||||
|
end function
|
||||||
|
|
||||||
|
function FindChildren()
|
||||||
m.titleLabel = m.top.findNode("titleLabel")
|
m.titleLabel = m.top.findNode("titleLabel")
|
||||||
m.authorLabel = m.top.findNode("authorLabel")
|
m.authorLabel = m.top.findNode("authorLabel")
|
||||||
m.thumbnail = m.top.findNode("thumbnail")
|
m.thumbnail = m.top.findNode("thumbnail")
|
||||||
m.durationRect = m.top.FindNode("durationRect")
|
m.durationRect = m.top.FindNode("durationRect")
|
||||||
m.durationLabel = m.top.FindNode("durationLabel")
|
m.durationLabel = m.top.FindNode("durationLabel")
|
||||||
|
|
||||||
m.thumbnail.failedBitmapUri = "pkg:/images/thumbnail-missing.jpg"
|
|
||||||
end function
|
end function
|
||||||
|
|
||||||
function OnContentSet() as void
|
function OnContentSet() as void
|
||||||
@@ -18,6 +20,10 @@ function OnContentSet() as void
|
|||||||
return
|
return
|
||||||
end if
|
end if
|
||||||
|
|
||||||
|
if m.titleLabel = invalid
|
||||||
|
FindChildren()
|
||||||
|
end if
|
||||||
|
|
||||||
m.titleLabel.text = content.title
|
m.titleLabel.text = content.title
|
||||||
m.authorLabel.text = content.author
|
m.authorLabel.text = content.author
|
||||||
|
|
||||||
|
|||||||
@@ -7,7 +7,8 @@
|
|||||||
id="thumbnail"
|
id="thumbnail"
|
||||||
loadDisplayMode="scaleToZoom"
|
loadDisplayMode="scaleToZoom"
|
||||||
width="190"
|
width="190"
|
||||||
height="106">
|
height="106"
|
||||||
|
failedBitmapUri="pkg:/images/thumbnail-missing.jpg">
|
||||||
<Rectangle
|
<Rectangle
|
||||||
id="durationRect"
|
id="durationRect"
|
||||||
width="60"
|
width="60"
|
||||||
|
|||||||
@@ -1,11 +1,3 @@
|
|||||||
function Init()
|
|
||||||
m.authorLabel = m.top.FindNode("authorLabel")
|
|
||||||
m.subCountLabel = m.top.FindNode("subCountLabel")
|
|
||||||
m.videoCountLabel = m.top.FindNode("videoCountLabel")
|
|
||||||
m.thumbnail = m.top.FindNode("thumbnail")
|
|
||||||
m.thumbnail.failedBitmapUri = "pkg:/images/thumbnail-missing.jpg"
|
|
||||||
end function
|
|
||||||
|
|
||||||
function OnContentSet() as void
|
function OnContentSet() as void
|
||||||
content = m.top.itemContent
|
content = m.top.itemContent
|
||||||
|
|
||||||
@@ -14,8 +6,8 @@ function OnContentSet() as void
|
|||||||
end if
|
end if
|
||||||
|
|
||||||
' NOTE: "_author" not "author". See PlaylistContentNode.xml for explanation.
|
' NOTE: "_author" not "author". See PlaylistContentNode.xml for explanation.
|
||||||
m.authorLabel.text = content._author
|
m.top._author = content._author
|
||||||
m.subCountLabel.text = content.subCountText
|
m.top.subCountText = content.subCountText
|
||||||
m.videoCountLabel.text = content.videoCountText
|
m.top.videoCountText = content.videoCountText
|
||||||
m.thumbnail.uri = content.thumbnail
|
m.top.thumbnail = content.thumbnail
|
||||||
end function
|
end function
|
||||||
@@ -1,7 +1,11 @@
|
|||||||
<component name="ChannelRowCell" extends="Group">
|
<component name="ChannelRowCell" extends="Group">
|
||||||
<interface>
|
<interface>
|
||||||
<field id="itemContent" type="node" onChange="OnContentSet" />
|
|
||||||
<field id="type" type="string" value="channel" />
|
<field id="type" type="string" value="channel" />
|
||||||
|
<field id="_author" type="string" alias="authorLabel.text" />
|
||||||
|
<field id="subCountText" type="string" alias="subCountLabel.text" />
|
||||||
|
<field id="videoCountText" type="string" alias="videoCountLabel.text" />
|
||||||
|
<field id="thumbnail" type="uri" alias="thumbnail.uri" />
|
||||||
|
<field id="itemContent" type="node" onChange="OnContentSet" />
|
||||||
</interface>
|
</interface>
|
||||||
<children>
|
<children>
|
||||||
<LayoutGroup
|
<LayoutGroup
|
||||||
@@ -10,7 +14,8 @@
|
|||||||
<CirclePoster
|
<CirclePoster
|
||||||
id="thumbnail"
|
id="thumbnail"
|
||||||
width="196"
|
width="196"
|
||||||
height="196" />
|
height="196"
|
||||||
|
failedBitmapUri="pkg:/images/thumbnail-missing.jpg" />
|
||||||
|
|
||||||
<Label
|
<Label
|
||||||
id="authorLabel"
|
id="authorLabel"
|
||||||
|
|||||||
@@ -3,6 +3,10 @@ import "pkg:/source/utils/TimeUtils.bs"
|
|||||||
import "pkg:/source/utils/Types.bs"
|
import "pkg:/source/utils/Types.bs"
|
||||||
|
|
||||||
function Init()
|
function Init()
|
||||||
|
FindChildren()
|
||||||
|
end function
|
||||||
|
|
||||||
|
function FindChildren()
|
||||||
m.titleLabel = m.top.FindNode("titleLabel")
|
m.titleLabel = m.top.FindNode("titleLabel")
|
||||||
m.authorLabel = m.top.FindNode("authorLabel")
|
m.authorLabel = m.top.FindNode("authorLabel")
|
||||||
m.viewCountDateLabel = m.top.FindNode("viewCountDateLabel")
|
m.viewCountDateLabel = m.top.FindNode("viewCountDateLabel")
|
||||||
@@ -11,7 +15,6 @@ function Init()
|
|||||||
m.durationRect = m.top.FindNode("durationRect")
|
m.durationRect = m.top.FindNode("durationRect")
|
||||||
m.durationLabel = m.top.FindNode("durationLabel")
|
m.durationLabel = m.top.FindNode("durationLabel")
|
||||||
m.thumbnail = m.top.FindNode("thumbnail")
|
m.thumbnail = m.top.FindNode("thumbnail")
|
||||||
m.thumbnail.failedBitmapUri = "pkg:/images/thumbnail-missing.jpg"
|
|
||||||
end function
|
end function
|
||||||
|
|
||||||
function OnContentSet() as void
|
function OnContentSet() as void
|
||||||
@@ -21,6 +24,10 @@ function OnContentSet() as void
|
|||||||
return
|
return
|
||||||
end if
|
end if
|
||||||
|
|
||||||
|
if m.titleLabel = invalid
|
||||||
|
FindChildren()
|
||||||
|
end if
|
||||||
|
|
||||||
m.titleLabel.text = content.title
|
m.titleLabel.text = content.title
|
||||||
m.authorLabel.text = content.author
|
m.authorLabel.text = content.author
|
||||||
|
|
||||||
|
|||||||
@@ -10,7 +10,8 @@
|
|||||||
id="thumbnail"
|
id="thumbnail"
|
||||||
loadDisplayMode="scaleToZoom"
|
loadDisplayMode="scaleToZoom"
|
||||||
width="350"
|
width="350"
|
||||||
height="196">
|
height="196"
|
||||||
|
failedBitmapUri="pkg:/images/thumbnail-missing.jpg">
|
||||||
<Rectangle
|
<Rectangle
|
||||||
id="durationRect"
|
id="durationRect"
|
||||||
width="60"
|
width="60"
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
import "pkg:/components/Dialog/DialogUtils.bs"
|
||||||
import "pkg:/source/utils/FocusManagement.bs"
|
import "pkg:/source/utils/FocusManagement.bs"
|
||||||
import "pkg:/source/utils/StringUtils.bs"
|
import "pkg:/source/utils/StringUtils.bs"
|
||||||
|
|
||||||
@@ -6,6 +7,17 @@ namespace VideoUtils
|
|||||||
CloseVideo(false)
|
CloseVideo(false)
|
||||||
|
|
||||||
container = GetVideoContainer()
|
container = GetVideoContainer()
|
||||||
|
' There should be no reason for this to be invalid, but there was a crash report
|
||||||
|
' with this being invalid, so we'll abort playing a video and try to restore focus to the top screen
|
||||||
|
if container = invalid
|
||||||
|
LogError("VideoContainer not found! Attempting to restore focus to top screen...")
|
||||||
|
appController = m.top.getScene().findNode("AppController")
|
||||||
|
if appController <> invalid
|
||||||
|
appController@.FocusTopScreen(invalid)
|
||||||
|
end if
|
||||||
|
DialogUtils.ShowDialog(`VideoContainer not found!\nPlease try again. If the problem persist, contact Playlet authors.`, "Error playing video")
|
||||||
|
return
|
||||||
|
end if
|
||||||
videoPlayer = container.createChild("videoPlayer")
|
videoPlayer = container.createChild("videoPlayer")
|
||||||
videoPlayer.id = "VideoPlayer"
|
videoPlayer.id = "VideoPlayer"
|
||||||
videoPlayer@.BindNode(invalid)
|
videoPlayer@.BindNode(invalid)
|
||||||
|
|||||||
Reference in new issue
Block a user