diff --git a/playlet-lib/src/components/Logger/Logger.bs b/playlet-lib/src/components/Logger/Logger.bs index bf211762..45f55436 100644 --- a/playlet-lib/src/components/Logger/Logger.bs +++ b/playlet-lib/src/components/Logger/Logger.bs @@ -15,7 +15,11 @@ function Init() m.port = port - StartLogger(m.top) + #if DEBUG + StartLogger(m.top, LogLevel.Debug) + #else + StartLogger(m.top, LogLevel.Info) + #end if end function function StartLogger(logger as object, logLevel = LogLevel.Info as LogLevel) as void diff --git a/playlet-lib/src/components/MainScene.transpiled.xml b/playlet-lib/src/components/MainScene.transpiled.xml index af9f83bd..be0af11e 100644 --- a/playlet-lib/src/components/MainScene.transpiled.xml +++ b/playlet-lib/src/components/MainScene.transpiled.xml @@ -8,6 +8,7 @@ + diff --git a/playlet-lib/src/components/Services/Dash/DashManifest.bs b/playlet-lib/src/components/Services/Dash/DashManifest.bs index ba922028..3b96356c 100644 --- a/playlet-lib/src/components/Services/Dash/DashManifest.bs +++ b/playlet-lib/src/components/Services/Dash/DashManifest.bs @@ -73,11 +73,10 @@ class DashManifest end if if xml.Node("AdaptationSet", adaptationSetAttributes) - xml.Node("Role", { + xml.EmptyNode("Role", { "schemeIdUri": "urn:mpeg:dash:role:2011" "value": audioSet.acont = "original" ? "main" : "alternate" }) - xml.End() for i = 0 to audioStreams.Count() - 1 stream = audioStreams[i] @@ -100,31 +99,23 @@ class DashManifest "bandwidth": stream.bitrate }) - xml.Node("AudioChannelConfiguration", { + xml.EmptyNode("AudioChannelConfiguration", { "schemeIdUri": "urn:mpeg:dash:23003:3:audio_channel_configuration:2011" "value": `${stream.audioChannels}` }) - xml.End() - if xml.Node("BaseURL") - xml.Text(stream.url) - xml.End() - end if + xml.TextNode("BaseURL", stream.url) + + if xml.Node("SegmentBase", { "indexRange": stream.index }) + xml.EmptyNode("Initialization", { "range": stream.init }) - if xml.Node("SegmentBase", { - "indexRange": stream.index - }) - if xml.Node("Initialization", { - "range": stream.init - }) - xml.End() - end if xml.End() end if xml.End() end if end for + xml.End() end if @@ -178,14 +169,9 @@ class DashManifest xml.End() end if - if xml.Node("SegmentBase", { - "indexRange": stream.index - }) - if xml.Node("Initialization", { - "range": stream.init - }) - xml.End() - end if + if xml.Node("SegmentBase", { "indexRange": stream.index }) + xml.EmptyNode("Initialization", { "range": stream.init }) + xml.End() end if @@ -249,12 +235,11 @@ class DashManifest "mimeType": "image/jpeg" "contentType": "image" }) - xml.Node("SegmentTemplate", { + xml.EmptyNode("SegmentTemplate", { "media": url "duration": duration "startNumber": 0 }) - xml.End() if xml.Node("Representation", { "id": `thumbnails_${id}` @@ -263,11 +248,10 @@ class DashManifest "height": storyboardHeightInPixels }) - xml.Node("EssentialProperty", { + xml.EmptyNode("EssentialProperty", { "schemeIdUri": "http://dashif.org/guidelines/thumbnail_tile" "value": `${storyboardWidth}x${storyboardHeight}` }) - xml.End() xml.End() end if @@ -399,11 +383,10 @@ class DashManifest if videoStream.colorInfo.primaries <> invalid primaries = m.colorInfo.primaries[videoStream.colorInfo.primaries] if primaries <> invalid - xml.Node("EssentialProperty", { + xml.EmptyNode("EssentialProperty", { "schemeIdUri": "urn:mpeg:mpegB:cicp:ColourPrimaries" "value": primaries }) - xml.End() else LogWarn("Unknown colorInfo.primaries:", videoStream.colorInfo.primaries) end if @@ -412,11 +395,10 @@ class DashManifest if videoStream.colorInfo.transferCharacteristics <> invalid transferCharacteristics = m.colorInfo.transferCharacteristics[videoStream.colorInfo.transferCharacteristics] if transferCharacteristics <> invalid - xml.Node("EssentialProperty", { + xml.EmptyNode("EssentialProperty", { "schemeIdUri": "urn:mpeg:mpegB:cicp:TransferCharacteristics" "value": transferCharacteristics }) - xml.End() else LogWarn("Unknown colorInfo.transferCharacteristics:", videoStream.colorInfo.transferCharacteristics) end if @@ -425,11 +407,10 @@ class DashManifest if videoStream.colorInfo.matrixCoefficients <> invalid matrixCoefficients = m.colorInfo.matrixCoefficients[videoStream.colorInfo.matrixCoefficients] if matrixCoefficients <> invalid - xml.Node("EssentialProperty", { + xml.EmptyNode("EssentialProperty", { "schemeIdUri": "urn:mpeg:mpegB:cicp:MatrixCoefficients" "value": matrixCoefficients }) - xml.End() else LogWarn("Unknown colorInfo.matrixCoefficients:", videoStream.colorInfo.matrixCoefficients) end if diff --git a/playlet-lib/src/components/Web/WebServer/Http/HttpConnection.bs b/playlet-lib/src/components/Web/WebServer/Http/HttpConnection.bs index 5bfaa845..6b90ef47 100644 --- a/playlet-lib/src/components/Web/WebServer/Http/HttpConnection.bs +++ b/playlet-lib/src/components/Web/WebServer/Http/HttpConnection.bs @@ -174,7 +174,7 @@ namespace Http function SetState(newState as Http.HttpConnectionState) if m.state <> newState - LogDebug(m, "state change" + Stri(m.state) + " ->" + Stri(newState)) + LogDebug("state change" + Stri(m.state) + " ->" + Stri(newState)) m.state = newState end if end function diff --git a/playlet-lib/src/components/Web/WebServer/Http/HttpResponse.bs b/playlet-lib/src/components/Web/WebServer/Http/HttpResponse.bs index 7dfd6dbc..31cccfb8 100644 --- a/playlet-lib/src/components/Web/WebServer/Http/HttpResponse.bs +++ b/playlet-lib/src/components/Web/WebServer/Http/HttpResponse.bs @@ -58,11 +58,11 @@ namespace Http m.http_code = errcode buffer = `